Environment
eDirectory 8.8.x
NetIQ eDirectory
NetIQ eDirectory
Situation
Can not run ndsbackup
NDS Error : Connect to NDS server failed.
Resolution
Take a strace while running the ndsbackup command and look for the connection, see if it is completed or closed.
Example of running strace for ndsbackup and sending the strace output to straceoutput.log
strace ndsbackup cvf /var/opt/novell/eDirectory/backup/`date -I`_ndsbackup.bak -a admin.novell -p passstore 2> straceoutput.log
Example of a failed connection, search on connect, usually around line 5,050
connect(3, {sa_family=AF_INET, sin_port=htons(524), sin_addr=inet_addr("192.168.0.21")}, 16) = -1 EINPROGRESS (Operation now in progress)
poll([{fd=-1}, {fd=3, events=POLLIN|POLLOUT}], 2, 30000) = 1 ([{fd=3, revents=POLLIN|POLLOUT|POLLERR|POLLHUP}])
getsockopt(3, SOL_SOCKET, SO_ERROR, [8589934705], [4]) = 0
close(3)
Using the strace show above as an example
The interface eDirectory is configured for 192.168.0.21
Running ip a shows the eth0 interface is set to 192.168.0.46
Since eDirectory is trying to make a connection to an interface that does not exist the login is failing.
If the eth0 is correct, then edit the /etc/opt/novell/eDirectory/conf/nds.conf
Correct the IP Address for the following
n4u.server.interfaces=
http.server.interfaces=
https.server.interfaces=
This may or may not exist
https.server.cached-cert-dn=
Edit the nds.conf manually or use sed
Example using sed with nds.conf (bad address) 192.168.0.21 and eth0 (good address) is 192.168.0.46
sed -i 's/192.168.0.21/192.168.0.46/g' /etc/opt/novell/eDirectory/conf/nds.conf
/etc/opt/novell/eDirectory/conf/nds.conf
After making the change restart ndsd and ndsconfig upgrade
rcndsd restart
ndsconfig upgrade
If the nds.conf is correct and the network interface is incorrect
Edit /etc/sysconfig/network/ifcfg-eth0 (or appropriate interface, if eth1 then edit ifcfg-eth1)
Modify ip address for the line IPADDR
IPADDR='192.168.0.21/22'
Edit the ifcfg-eth0 manually or use sed
Example changing from 192.168.0.46 to 192.168.0.21 for the ifcfg-eht0 using sed
sed -i 's/192.168.0.46/192.168.0.21/g' /etc/sysconfig/network/ifcfg-eth0
sed -i 's/192.168.0.46/192.168.0.21/g' /etc/hosts
After making the change restart the network interaces
rcnetwork restart