HPUX Howto fix a problem with a useless error message.

Posted on August 11, 2009

The problem


rpcd won’t start:

hpux# ./Rpcd start
starting the DCE RPC Daemon
/opt/dce/sbin/rpcd
2009-08-11-16:35:01.723+00:00I----- dced FATAL dhd general main.c 880 0x77f6f5a0
Initialization (working directory) failed, status=0x00000002.
EXIT CODE: 1

Finding a solution


tusc is tool like strace on linux, and

hpux# ./tusc /opt/dce/sbin/rpcd
execve("/opt/dce/sbin/rpcd", 0x77ff0498, 0x77ff04a0) ..... = 0 [32-bit]
utssys(0x77ff2580, 0, 0) ................................. = 0
open("/usr/lib/dld.sl", O_RDONLY, 02224) ................. = 3
read(3, "02v010e0512@ ".., 128) ....... = 128
lseek(3, 128, SEEK_SET) .................................. = 128
read(3, "1004( 02ac".., 48) ........ = 48
mmap(NULL, 131244, PROT_READ|PROT_EXEC, MAP_SHARED|MAP_SHLIB, 3, 36864) = 0xc0010000
mmap(NULL, 14696, PROT_READ|PROT_WRITE|PROT_EXEC, MAP_PRIVATE|MAP_SHLIB, 3, 172032) = 0x77fec000
....
open("/opt/dcelocal/var/adm/time/dts_shared_memory_id", O_RDONLY, 0666) ERR#2 ENOENT
open("/opt/dcelocal/var/svc/routing", O_RDONLY, 0666) .... ERR#2 ENOENT
open("/opt/dce/lib/zoneinfo/localtime", O_RDONLY, 0) ..... ERR#2 ENOENT
....

The fix

hpux# cd /opt/dcelocal
hpux# ln -s /var/opt/dce var