ndsd does not start automatically after rebooting the server on systemd OS

  • 7024817
  • 15-Sep-2020
  • 19-Oct-2020

Environment

Novell eDirectory 9.x, up to 9.2.2, for Linux on systemd OS

Situation

After the reboot, "ndsd" did not start automatically.

The 'ndsd.log' contains the below error:

Sep 08 17:30:53  Path of NetIQ eDirectory configuration file /etc/opt/novell/eDirectory/conf/nds.conf
Sep 08 17:30:54  Incorrect interface parameter: 192.168.00.253
Sep 08 17:30:54  Unable to get interfaces from system.  Service will not be available
Sep 08 17:30:55  Could not bind 127.0.0.1:524 Address family not supported by protocol

ndsd will start manually by using the command 'ndsmanage startall'.
ndsd needs to be started manually every time the server is rebooted.

Resolution

The eDirectory startup script can be either configured for ndsd to start only after the network is available, or a delay can be added to allow all the server processes to complete before ndsd start.

Steps for configuring ndsd to wait for the network to be available:

  1. As 'root', open a terminal and edit the file '/usr/lib/systemd/system/ndsdtmpl-etc-opt-novell-eDirectory-conf-nds.conf@.service' 
  1. Modify the "[Unit]" section to add the below parameters, highlighted in blue:

[Unit]
Description=eDirectory service for %I
Wants=network-online.target
After=network.target local-fs.target network-online.target

  1. Stop eDirectory via command 'ndsmanage stopall'.
  1. Now restart the server. This should start ndsd automatically.


Steps for configuring a 30 seconds delay before ndsd starts:

  1. As 'root', open a terminal and edit the file '/usr/lib/systemd/system/ndsdtmpl-etc-opt-novell-eDirectory-conf-nds.conf@.service'
  1. Modify the "[Service]" section to add the below parameters, highlighted in yellow:

[Service]
Type=forking
RemainAfterExit=no
PIDFile=/var/opt/novell/eDirectory/data/ndsd.pid
LimitCORE=infinity
EnvironmentFile=%I
EnvironmentFile=-//etc/opt/novell/eDirectory/conf/env_idm
EnvironmentFile=-//etc/opt/novell/eDirectory/conf/env_custom
ExecStartPre=-/bin/sleep 30
ExecStartPre=-//opt/novell/eDirectory/sbin/pre_ndsd_start_custom
ExecStartPre=-//opt/novell/eDirectory/sbin/pre_ndsd_start_factory

  1. Stop eDirectory via command 'ndsmanage stopall'
  1. Now restart the server. This should start ndsd automatically.
    If it still does not start, continue to increment the sleep time by 30 seconds, e.g. try "
    sleep 60" next. Please note that, depending of the version of systemd/OS installed on the server, a too high value may lead to a timeout and the service would not start.

Cause

The cause of the issue here is that the network interface is not configured with an IP by the time eDirectory starts.

Additional Information

Notes:

- From eDirectory 9.2.3, the systemd startup script is configured by default to wait for the network to become available before ndsd starts.

- Configuring a delay in the startup script will delay every start of eDirectory, during system boot as well as when restarting the service manually.

- Other parameters can be added to the startup script, such as for automatic restart of eDirectory when a failure is detected. For further information, you may refer to the documentation of systemd.It is possible to verify the contents of the .service file, to ensure all parameter names are correct, via command "systemd-analyze verify [filename]".

The below example points to the incorrect case of the parameter "restart=on-failure", for which the first letter should be uppercase "Restart=on-failure":

[root@edir1 handt001]# systemd-analyze verify /etc/systemd/system/multi-user.target.wants/ndsdtmpl-etc-opt-novell-eDirectory-conf-nds.conf@-etc-opt-novell-eDirectory-conf-env.service

Configuration file /usr/lib/systemd/system/novell-tomcat8-service.service is marked executable. Please remove executable permission bits. Proceeding anyway.[/usr/lib/systemd/system/ndsdtmpl-etc-opt-novell-eDirectory-conf-nds.conf@.service:21]Unknown lvalue 'restart' in section 'Service'

[Service]
Type=forking
RemainAfterExit=no
PIDFile=/var/opt/novell/eDirectory/data/ndsd.pid
LimitCORE=infinity
EnvironmentFile=%I
EnvironmentFile=-//etc/opt/novell/eDirectory/conf/env_idm
EnvironmentFile=-//etc/opt/novell/eDirectory/conf/env_custom
ExecStartPre=-//opt/novell/eDirectory/sbin/pre_ndsd_start_custom
ExecStartPre=-//opt/novell/eDirectory/sbin/pre_ndsd_start_factory
ExecStart=/opt/novell/eDirectory/sbin/ndsdwrapper
ExecStartPost=-//opt/novell/eDirectory/sbin/post_ndsd_start_custom
ExecStartPost=-//opt/novell/eDirectory/sbin/post_ndsd_start_factory
ExecStopPost=-//opt/novell/eDirectory/sbin/post_ndsd_stop_custom
ExecStopPost=-//opt/novell/eDirectory/sbin/post_ndsd_stop_factory
TimeoutStopSec=180

restart=on-failure
RestartSec=10s

Feedback service temporarily unavailable. For content questions or problems, please contact Support.