Unable to create socket for port '0'

Document ID : KB000030756
Last Modified Date : 14/02/2018
Show Technical Document Details

The likely cause of this error is not having SETUID available and set on both specific files contained in NH_HOME as well as the mount point that $NH_HOME resides on. You can check this by running the commands below:

find -H $NH_HOME -user root -perm -4000 -exec ls -ldb {} \;
mount

Here are example outputs of each taking from a 6.3.2.07 Red Hat Enterprise Linux system (notice the s in the permissions section.  This is the setuid bit. -r-sr-xr-x):

$ find -H $NH_HOME -user root -perm -4000 -exec ls -ldb {} \;

-r-sr-xr-x 1 root ehealth 100236 Dec 11 2014 /ehealth/bin/nhHaSetup
-r-sr-xr-x 1 root ehealth 3324899 Dec 11 2014 /ehealth/bin/sys/nhiPoller
-r-sr-xr-x 1 root ehealth 4843386 Dec 11 2014 /ehealth/bin/sys/nhiDbMaint
-r-sr-xr-x 1 root ehealth 2120214 Dec 11 2014 /ehealth/bin/sys/nhiDiscover
-r-sr-xr-x 1 root ehealth 34927 Dec 11 2014 /ehealth/bin/sys/nhiGetOsLogs
-r-sr-xr-x 1 root ehealth 101486 Dec 11 2014 /ehealth/bin/sys/nhiItgPing
-r-sr-xr-x 1 root ehealth 14466 Dec 11 2014 /ehealth/bin/sys/nhiActivateUtils
-r-sr-xr-x 1 root ehealth 1915460 Dec 11 2014 /ehealth/bin/sys/nhiTrapServerCmu
-r-sr-xr-x 1 root ehealth 9622 Dec 11 2014 /ehealth/bin/nhHttpd
-r-sr-xr-x 1 root ehealth 155629 Dec 11 2014 /ehealth/modules/cndc/bin/FtpCollector
-r-sr-xr-x 1 root ehealth 57588 Dec 11 2014 /ehealth/web/cgi-bin/nhSignalHttpd

$ mount

/dev/mapper/vg_rhas6u5x64-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/tmp on /tmp type none (rw,bind)
/var/tmp on /var/tmp type none (rw,bind)
/home on /home type none (rw,bind)
none on /sys/kernel/config type configfs (rw)

A mountpoint is capable of setuid unless it states it is not. See the below example for a mount output that shows this, notice the "nosuid" value set:

$ mount

/dev/mapper/ rhas6u5x64-lv_root on / type ext4 (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/sda1 on /boot type ext4 (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
/tmp on /tmp type none (rw,noexec,nosuid,nodev,bind)
/dev/mapper/ rhas6u5x64-lv_root on /ehealth type ext4 (rw,nosuid,nodev,user_xattr,acl)
/var/tmp on /var/tmp type none (rw,bind)

Solution: 

Have the administrator of the system enable suid for the eHealth mount point.