Purpose and format of hosts.nds file for eDirectory on unix platforms

  • 3115631
  • 09-Nov-2007
  • 26-Apr-2012

Environment

Novell eDirectory 8.7.3 for Solaris
Novell eDirectory 8.7.3 for Linux
Novell eDirectory 8.7.3 for AIX
Novell eDirectory 8.7.3 for HP-UX
Novell eDirectory 8.8 for Solaris
Novell eDirectory 8.8 for Linux
Novell eDirectory 8.8 for AIX
Novell eDirectory 8.8 for HP-UX


Situation

Purpose and format of hosts.nds file for eDirectory on unix platforms

-625, -626, or -622 errors in Sync

Server's network address is not getting populated with correct address.

Resolution

For eDirectory 8.7.3
eDirectory will check for the existance of a /etc/ hosts.nds file and will use the information it contains to resolve server names and partition addresses prior to querying slp. 

For eDirectory 8.8
eDirectory will look for the presence of the hosts.nds by prepending the value of the n4u.server.configdir variable.  So by default the value for n4u.server.configdir=/etc/opt/novell/eDirectory/conf.  This does not have to be the case.  Also there could be multiple instances of eDirectory with multiple n4u.server.configdir locations.  eDirectory will only find the hosts.nds if it is in the correct directory.  So a good rule of thumb is to place the hosts.nds is in the same directory the nds.conf is located in.

Another point to consider is that in eDirectory 8.8 you can choose a custom port for ncp to listen on (other than port 524).  If this is the case, it is important to add the port number after the ip address, such as <IpAddress>:<port>  When using multiple instances of edirectory on a box it is necessary to use different port numbers for ncp.

eDirectory 8.7.3 and 8.8
The hosts.nds file can be used in the absence of slp or for resolving servers and partitions on servers that are not able to register with an slpda.

eDirectory will first check for a requested object in it's local database, then it will search for a reference to the requested object in it's local database.  Next it will check the hosts.nds file to find locations of partitions where the object exists and finally it will query slp. If the first reference for a partition is down, eDirectory will automatically attempt to contact the next server in the list of the hosts.nds for that partition.  For this reason it is good to have backup server listed for each partition.

The hosts.nds can also be used to identify the addresses for the servers in the tree. This section is used when repairing servers network addresses in ndsrepair.

After making  any changes to the hosts.nds it is recommended to bounce ndsd.  Edirectory does not cache this file, but only reads it when a background process is run that relies on name resolution.  If you are currenlty experiencing issues and make a change to the hosts.nds, bounce ndsd to be sure that the background process is aware of the changes.


Examples:
Partition.        IP Address
Servername    IP Address

ACME.                             192.168.100.5:524     #(note trailing dot in tree name)
ACME.                             192.168.100.6:524
ENG.AMERICAS.ACME. 192.168.100.5:524
ENG.AMERICAS.ACME. 192.168.100.6:524
AMERICAS.ACME.         192.168.100.5:524
AMERICAS.ACME.         192.168.100.6:524

# Servers
FS1                                 192.168.100.5:524
FS2                                 192.168.100.6:524

Additional Information


Formerly known as TID# 10096901

Server names are required to be used for ndsrepair.
ndsrepair uses the server's network IP addresses to repair network addresses.

The hosts.nds file must be manually edited. It is NOT updated by eDirectory servers. If the file contains outdated entries, eDirectory applications might encounter spurious lookup errors.