FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 04-29-2012, 01:40 PM
Camaleón
 
Default Apache2 Not starting on reboot

On Sun, 29 Apr 2012 07:11:12 -0500, John W. Foster wrote:

> My last upgrade of Debian stable on my production server produced an
> error that is causing issues. Apache2 is not automatically restarting as
> it should when the system is rebooted.

It does not start just when system is rebooted or neither it does when
booted from a cold start? Because the latter would be even more
strange :-)

> This is a nightly occurrence and is required for hardware testing
> reasons. Anyone have any ideas as to what might be happening? I have
> checked the error log & see nothing that looks suspect. Webmin shows
> that the Apache server is setup to start on bootup. It seems to run
> fine after I manually restart the server after the reboot.

A success manual start up discards a syntax problem at the config
files... Mmmm, this is a shoot in the dark but you can try to disable
paralel booting and see how it goes (this can be done by setting
"CONCURRENCY=none" into "/etc/default/rcS" file).

If that makes any difference, then you can start to think in how to
restore the functionality without disturbing the Apache booting.

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jnjgd6$5ol$9@dough.gmane.org">http://lists.debian.org/jnjgd6$5ol$9@dough.gmane.org
 
Old 04-29-2012, 08:09 PM
Bob Proulx
 
Default Apache2 Not starting on reboot

John W. Foster wrote:
> My last upgrade of Debian stable on my production server produced an
> error that is causing issues. Apache2 is not automatically restarting as
> it should when the system is rebooted.

The other suggestions were good. Additionally I would want to see if
there are errors from 'insserv' which creates the symlinks used for
the concurrent boot system. And I would want to see what symlinks
exist before and after.

$ find /etc/rc?.d -name '*apache2'
/etc/rc0.d/K02apache2
/etc/rc1.d/K02apache2
/etc/rc2.d/S27apache2
/etc/rc3.d/S27apache2
/etc/rc4.d/S27apache2
/etc/rc5.d/S27apache2
/etc/rc6.d/K02apache2

You are probably missing one of the 'S*apache2 symlinks'. The exact
number isn't important and will be different on different systems due
to 'insserv' creating them based upon the current system topography.

# insserv -v
insserv: creating .depend.boot
insserv: creating .depend.start
insserv: creating .depend.stop

That is from a fresh installation system. You may have other output.
In particular if there are errors then you will see them there. If
there is an error then you would want to know about it and repair it.

It could be that for some reason a symlink was removed from your
system. If so then the tools will assume that you did it
intentionally and will preserve that change until you change it
again. That isn't an error. It would be an error to do otherwise.

> Webmin shows that the Apache server is setup to start on bootup.

If you are using webmin I know that it can make configuration changes.
It could be that a webmin command (perhaps by slip of the mouse) made
this as an intentional configuration change. Intentional even if by
mouse slip and not by actual intent but the result would be same.

To reset everything to package defaults you can remove all of the
rc?.d symlinks and then install them again.

$ find /etc/rc?.d -name '*apache2'
/etc/rc0.d/K02apache2
/etc/rc1.d/K02apache2
/etc/rc2.d/S27apache2
/etc/rc3.d/S27apache2
/etc/rc4.d/S27apache2
/etc/rc5.d/S27apache2
/etc/rc6.d/K02apache2

Then to remove them:

# find /etc/rc?.d -name '*apache2' -delete

Then to install them again all three of these do the same thing but in
different ways. Pick one of them. Use whichever you feel most
comfortable with doing.

1.
# update-rc.d apache2 defaults 91 09
update-rc.d: using dependency based boot sequencing

2.
# dpkg-reconfigure apache2.2-common

3.
# apt-get install --reinstall apache2.2-common

Then verify that the symlinks are on your system.

$ find /etc/rc?.d -name '*apache2'

Bob
 
Old 04-30-2012, 02:18 PM
"John W. Foster"
 
Default Apache2 Not starting on reboot

On Sun, 2012-04-29 at 07:11 -0500, John W. Foster wrote:
> My last upgrade of Debian stable on my production server produced an
> error that is causing issues. Apache2 is not automatically restarting as
> it should when the system is rebooted. This is a nightly occurrence and
> is required for hardware testing reasons. Anyone have any ideas as to
> what might be happening? I have checked the error log & see nothing that
> looks suspect. Webmin shows that the Apache server is setup to start on
> bootup. It seems to run fine after I manually restart the server after
> the reboot.
> thanks!
> frosty


Thanks for the suggestions. I tried them all & none worked. Sorry...
However I did some research outside this list & arrived at a solution
that was posted by another user on another list. I'm putting it up here
just so it will appear in our archives.


> Thanks to investigation done by Faheem Mitha and discussion on the
> comments below, a full answer to this question has worked out.
>
> Read Faheem's answer for full details
> http://unix.stackexchange.com/questions/12597/missing-init-d-apache2-file/12748#12748
>
> For humor value, here are the cliff notes:
>
> The short version is that init scripts are considered conf files, and
> apt-get is too polite to touch conf files that have been user-modified
> in any way, even to restore deleted on reinstall after a uninstall.
> Before you say "duh of course", check out the gymnastics you have to
> do. I quote:
>
> After asking the dpkg list (and being told off for it) +
> further fiddling, the following works. Be careful with this.
> It will replace all your modified config files with the
> version from the package.
>
> apt-get -o Dpkg::Options::="--force-confnew" -o
> Dpkg::Options::="--force-confask" install --reinstall
> apache2.2-common
>
> I don't know why you needed me to tell you this. It's the
> first thing you should have thought of. :-) – Faheem Mitha
>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1335795522.6312.7.camel@beast.johnwfoster.com">htt p://lists.debian.org/1335795522.6312.7.camel@beast.johnwfoster.com
 
Old 04-30-2012, 02:37 PM
"John W. Foster"
 
Default Apache2 Not starting on reboot

On Mon, 2012-04-30 at 09:18 -0500, John W. Foster wrote:
> On Sun, 2012-04-29 at 07:11 -0500, John W. Foster wrote:
> > My last upgrade of Debian stable on my production server produced an
> > error that is causing issues. Apache2 is not automatically restarting as
> > it should when the system is rebooted. This is a nightly occurrence and
> > is required for hardware testing reasons. Anyone have any ideas as to
> > what might be happening? I have checked the error log & see nothing that
> > looks suspect. Webmin shows that the Apache server is setup to start on
> > bootup. It seems to run fine after I manually restart the server after
> > the reboot.
> > thanks!
> > frosty
>
>
> Thanks for the suggestions. I tried them all & none worked. Sorry...
> However I did some research outside this list & arrived at a solution
> that was posted by another user on another list. I'm putting it up here
> just so it will appear in our archives.
>
>
> > Thanks to investigation done by Faheem Mitha and discussion on the
> > comments below, a full answer to this question has worked out.
> >
> > Read Faheem's answer for full details
> > http://unix.stackexchange.com/questions/12597/missing-init-d-apache2-file/12748#12748
> >
> > For humor value, here are the cliff notes:
> >
> > The short version is that init scripts are considered conf files, and
> > apt-get is too polite to touch conf files that have been user-modified
> > in any way, even to restore deleted on reinstall after a uninstall.
> > Before you say "duh of course", check out the gymnastics you have to
> > do. I quote:
> >
> > After asking the dpkg list (and being told off for it) +
> > further fiddling, the following works. Be careful with this.
> > It will replace all your modified config files with the
> > version from the package.
> >
> > apt-get -o Dpkg::Options::="--force-confnew" -o
> > Dpkg::Options::="--force-confask" install --reinstall
> > apache2.2-common
> >
> > I don't know why you needed me to tell you this. It's the
> > first thing you should have thought of. :-) – Faheem Mitha
> >
>
>

Only problem is: now none of my websites work. Only the "localhost"
basic is working. I will get it squared away but beware of the solution
above.
Thanks!
frosty


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 1335796676.23734.1.camel@beast.johnwfoster.com">ht tp://lists.debian.org/1335796676.23734.1.camel@beast.johnwfoster.com
 
Old 04-30-2012, 03:26 PM
Camaleón
 
Default Apache2 Not starting on reboot

On Mon, 30 Apr 2012 09:18:42 -0500, John W. Foster wrote:

> Thanks for the suggestions. I tried them all & none worked. Sorry...
> However I did some research outside this list & arrived at a solution
> that was posted by another user on another list. I'm putting it up here
> just so it will appear in our archives.
>
>
>> Thanks to investigation done by Faheem Mitha and discussion on the
>> comments below, a full answer to this question has worked out.
>>
>> Read Faheem's answer for full details
>> http://unix.stackexchange.com/questions/12597/missing-init-d-apache2-file/12748#12748

(...)

Mmm... so you mean the init script for apache2 was missed in your case
and thus making apache not to boot?

If that was the problem, I wonder if by reinjecting the service with
"insserv apache2" could have also made the job :-?

Greetings,

--
Camaleón


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: jnmavr$kbo$7@dough.gmane.org">http://lists.debian.org/jnmavr$kbo$7@dough.gmane.org
 

Thread Tools




All times are GMT. The time now is 02:53 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org