Re: Apache2 Not starting on reboot

2012-04-30 Thread John W. Foster
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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1335795522.6312.7.ca...@beast.johnwfoster.com



Re: Apache2 Not starting on reboot

2012-04-30 Thread Camaleón
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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/jnmavr$kbo$7...@dough.gmane.org



Re: Apache2 Not starting on reboot

2012-04-30 Thread John W. Foster
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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1335796676.23734.1.ca...@beast.johnwfoster.com



Apache2 Not starting on reboot

2012-04-29 Thread John W. Foster
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


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/1335701472.11076.11.ca...@beast.johnwfoster.com



Re: Apache2 Not starting on reboot

2012-04-29 Thread paivakil
John W. Foster jfoster81...@gmail.com writes:

  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.

Is apache configured to start in the default runlevel?

(Rest is for completeness and newbies reading the list)

Check /etc/inittab for the line with initdefault in it to identify
your default runlevel - it is usually 2. 

Assuming your default runlevel is 2, there ought to be a symlink to
/etc/init.d/apache2 (or whatever) in /etc/rc2.d/ 

See the man page for update-rc.d on how to add apache to the default
runlevel. You  need to be  root to run update-rc.d

Sigh. I suddenly realise that for past several years, debian has  not
been giving me any reason to become root - except to update. 

HTH.

-- 
Mahesh T. Pai   ||
The greatest enemy of knowledge is not ignorance,
it is the illusion of knowledge.
--Stephen hawking


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/878vheoekg.fsf@nandini.nandini



Re: Apache2 Not starting on reboot

2012-04-29 Thread Camaleón
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-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/jnjgd6$5ol$9...@dough.gmane.org



Re: Apache2 Not starting on reboot

2012-04-29 Thread Bob Proulx
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


signature.asc
Description: Digital signature