3

I'm trying to start a service on HPUX 11.31 at boot time. I generated the appropriate symlinks, but the system is not starting it up. If I run the script once the system is up, everything works as expected (but I need the service to come up at boot time by itself).

 $ ls -l /sbin/init.d/weblogic
 -rwxr-xr-x   1 oracle     oracle 3066 Sep 23 13:59 /sbin/init.d/weblogic

 $ ls -l /sbin/rc?.d/*weblogic
 lrwxr-xr-x   1 root  sys  21 Sep 23 13:38 /sbin/rc2.d/S998weblogic -> /sbin/init.d/weblogic
 lrwxr-xr-x   1 root  sys  21 Sep 23 13:38 /sbin/rc3.d/S998weblogic -> /sbin/init.d/weblogic
 lrwxr-xr-x   1 root  sys  21 Sep 23 13:38 /sbin/rc4.d/S998weblogic -> /sbin/init.d/weblogic

1 Answer 1

5

Weblogic server is picky about hwo it starts. Does the script /sbin/init.d/weblogic start WLS as user ID root, or does it do an "su" to some WLS-specific user ID? It seems to me that WLS refuses to run under the root user ID.

Another thing to try, change ownership of /sbin/init.d/weblogic to match other scripts in /sbin/init.d/.

4
  • Thanks for your answer. The script is not the problem, it runs like a charm on Linux, and the weblogic processes are spawned by the user that is supposed to run it. After a long debugging session I found the problem is HPUX and how the environment is inherited at boot time ...
    – Torian
    Commented Sep 24, 2011 at 0:02
  • Many years later, I have a question: could this be due to a SIGHUP being sent to all daemons when the init system completes startup? I'm seeing a report that nohup allows these kinds of scripts (specifically, ones that launch a JVM -- which exits when it receives a SIGHUP). Commented Nov 19, 2015 at 16:03
  • @ChristopherSchultz - HP-UX is weird, but not that weird, I hope. HP-UX started out as 4.2 or 4.3BSD ages ago, and HP just mutated it to fit their tastes and hardware. I'm reasonably certain that no init system sends a SIGHUP to all daemons when the system goes into multi-user mode.
    – user732
    Commented Nov 19, 2015 at 23:09
  • @BruceEdiger This assertion came from here and a little Googling came up with some other cases where simply using nohup with a Java process during startup would make it work. So I'm not sure what's going on. I don't have access to HP-UX, so I can't experiment with it. Commented Nov 20, 2015 at 12:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .