This is a discussion on Why wont servers start at boot, but will manually? within the Sun Solaris Administration forums, part of the Solaris Operating System category; --> I have an SS20 with Solaris 9, configured with both ssh and apache servers. If the machine is rebooted, ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| I have an SS20 with Solaris 9, configured with both ssh and apache servers. If the machine is rebooted, neither server will start automatically, but instead I need to log onto the console and type # /etc/init.d/sshd start # /etc/init.d/apache start and they run as expected. What I can't understand is why these don't start at boot, despite the fact there are /etc/rc3.d/S50apache and /etc/rc3.d/S89sshd files, which are links to the files in /etc/init.d I assusme the machine is going to run level 3 (but how can I be sure?), since network connections work okay. The files in /etc/init.d are owned by root:sys with 744 permissions Any ideas? |
| |||
| * Who cares anyway <sorry_no_known_address@hotmail.com> wrote: I do. Get a name. [..] > I assusme the machine is going to run level 3 (but how can I be > sure?), since network connections work okay. grep initdefault /etc/inittab - Sebastian -- Sebastian Jaenicke Disce aut discede! whois pgpkey-C81115B1 -h whois.ripe.net|perl -ne's-^certif: *--&&print' |
| |||
| sorry_no_known_address@hotmail.com (Who cares anyway) wrote in message news:<7e8b9873.0407030638.581f40b@posting.google.c om>... > I have an SS20 with Solaris 9, configured with both ssh and apache > servers. If the machine is rebooted, neither server will start > automatically, but instead I need to log onto the console and type > > # /etc/init.d/sshd start > # /etc/init.d/apache start > > and they run as expected. > > What I can't understand is why these don't start at boot, despite the > fact there are /etc/rc3.d/S50apache and /etc/rc3.d/S89sshd files, > which are links to the files in /etc/init.d > > I assusme the machine is going to run level 3 (but how can I be > sure?), since network connections work okay. > > The files in /etc/init.d are owned by root:sys with 744 permissions > > > Any ideas? As someone suggested, I did a grep on /etc/inittab and see it is indeed run level 3. So any suggestions as to why a machine goes there, but the sshd and apache servers not started? |
| |||
| >> On 3 Jul 2004 15:03:57 -0700, >> sorry_no_known_address@hotmail.com (Who cares anyway) said: > sorry_no_known_address@hotmail.com (Who cares anyway) wrote > in message > news:<7e8b9873.0407030638.581f40b@posting.google.c om>... >> I have an SS20 with Solaris 9, configured with both ssh and >> apache servers. If the machine is rebooted, neither server >> will start automatically, but instead I need to log onto >> the console and type >> >> # /etc/init.d/sshd start # /etc/init.d/apache start >> >> and they run as expected. >> >> What I can't understand is why these don't start at boot, >> despite the fact there are /etc/rc3.d/S50apache and >> /etc/rc3.d/S89sshd files, which are links to the files in >> /etc/init.d >> >> I assusme the machine is going to run level 3 (but how can >> I be sure?), since network connections work okay. >> >> The files in /etc/init.d are owned by root:sys with 744 >> permissions >> >> >> Any ideas? > As someone suggested, I did a grep on /etc/inittab and see > it is indeed run level 3. So any suggestions as to why a > machine goes there, but the sshd and apache servers not > started? Do a "who -r" just to make sure about the run-level. Try adding "set -x" to the top of the /etc/init.d scripts listed above. That way you can see what commands are being run in the script and where the problem might lie. Also have a look at what other scripts run *after* the problematic ones to see if you've created some unacknowledged dependency. hth t |
| |||
| Who cares anyway wrote: > I have an SS20 with Solaris 9, configured with both ssh and apache > servers. If the machine is rebooted, neither server will start > automatically, but instead I need to log onto the console and type > > # /etc/init.d/sshd start > # /etc/init.d/apache start > > and they run as expected. > > What I can't understand is why these don't start at boot, despite the > fact there are /etc/rc3.d/S50apache and /etc/rc3.d/S89sshd files, > which are links to the files in /etc/init.d > > I assusme the machine is going to run level 3 (but how can I be > sure?), since network connections work okay. > > The files in /etc/init.d are owned by root:sys with 744 permissions > > > Any ideas? Be sure not to use anything else than Bourne shell syntax. Because, I do believe that the rc scripts are executed in a bourne shell at system boot. Even if your rc scripts have '#!/usr/bin/ksh', the init scripts are called from /etc/rc? like 'sh rc.script' or '. rc.script', if i recall right. That would make them work when you log in and execute them by hand yourself, as the #! is interpreted, when you just call on them directly, ie /etc/rc3.d/S50apache. /0la |
| |||
| "0la 0." <mail_less@127.0.0.1> wrote in message news:<AXHFc.4195$dx3.33298@newsb.telia.net>... > Who cares anyway wrote: > > I have an SS20 with Solaris 9, configured with both ssh and apache > > servers. If the machine is rebooted, neither server will start > > automatically, but instead I need to log onto the console and type > > > > # /etc/init.d/sshd start > > # /etc/init.d/apache start > > > > and they run as expected. > > > > What I can't understand is why these don't start at boot, despite the > > fact there are /etc/rc3.d/S50apache and /etc/rc3.d/S89sshd files, > > which are links to the files in /etc/init.d > > > > I assusme the machine is going to run level 3 (but how can I be > > sure?), since network connections work okay. > > > > The files in /etc/init.d are owned by root:sys with 744 permissions > > > > > > Any ideas? > > Be sure not to use anything else than Bourne shell syntax. Because, I do > believe that the rc scripts are executed in a bourne shell at system > boot. Even if your rc scripts have '#!/usr/bin/ksh', the init scripts > are called from /etc/rc? like 'sh rc.script' or '. rc.script', if i > recall right. > > That would make them work when you log in and execute them by hand > yourself, as the #! is interpreted, when you just call on them directly, > ie /etc/rc3.d/S50apache. > > /0la You *may* have put me on the right track there. I see all Sun scripts except sysid.net call /sbin/sh, *not* /bin/sh, whereas my scripts called /bin/sh. I can't see why this should matter, but perhaps it does. However, I'm not near the machine now, and so will not reboot it, because if it fails to correct the problem, the web server will be down. I'll wait until I am physically close to the machine before doing a reboot. Dr. David Kirkby |
| |||
| sorry_no_known_address@hotmail.com (Who cares anyway) wrote in message news:<7e8b9873.0407030638.581f40b@posting.google.c om>... > I have an SS20 with Solaris 9, configured with both ssh and apache > servers. If the machine is rebooted, neither server will start > automatically, but instead I need to log onto the console and type > > # /etc/init.d/sshd start > # /etc/init.d/apache start > > and they run as expected. > > What I can't understand is why these don't start at boot, despite the > fact there are /etc/rc3.d/S50apache and /etc/rc3.d/S89sshd files, > which are links to the files in /etc/init.d I have solved this now. The problem was that the scripts called /bin/sh, when in fact they needed to call /sbin/sh. Changing the first line of the scripts from #!/bin/sh to #!/sbin/sh solved it. I'm not sure why the statically linked sh should be needed, but it seems to be. /usr is mounted read-only, but I don't see why that should affect things. Anyway, the problem seems to have gone. Now both servers start at boot okay. Dr. David Kirkby |
| |||
| On Mon, 05 Jul 2004 06:57:37 -0700, Who cares anyway wrote: >> > I assusme the machine is going to run level 3 (but how can I be >> > sure?), since network connections work okay. The /etc/inittab will tell you what the default runlevel is upon bootup. If you want to double-check a server after its up, use 'who -r' to see the current run-level. --Dave |
| ||||
| Who cares anyway (sorry_no_known_address@hotmail.com) wrote: : I have solved this now. The problem was that the scripts called : /bin/sh, when in fact they needed to call /sbin/sh. Changing the first : line of the scripts from : #!/bin/sh : to : #!/sbin/sh : solved it. I'm not sure why the statically linked sh should be needed, : but it seems to be. I don't have access to a Solaris 9 machine, but this sounds definitely different from preceding versions of Solaris. If you look at (say) /etc/rc3 on a Solaris 8 machine you can see that it 'dots' an /etc/rc3.d/S... script if its name ends with .sh; otherwise, it '/sbin/sh's it. In either case, the #!... line in the script itself is just a comment. I would be interested to hear what the Solaris 9 set-up in the /etc/rc3 etc files is when you get a chance to look. -- +-- ///\ Ian Durkacz ------------------------------------------+ | C-oo Department of Automatic Control & Systems Engineering | | \ > The University of Sheffield, Sheffield, England | +--- \_v email: i.durkacz@sheffield.ac.uk ---------------------+ |