ispCP - Board - Support
Ubuntu 10.04.1 - After reboot apache won't start - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Support Area (/forum-30.html)
+--- Forum: System Setup & Installation (/forum-32.html)
+--- Thread: Ubuntu 10.04.1 - After reboot apache won't start (/thread-12638.html)



Ubuntu 10.04.1 - After reboot apache won't start - claussit - 01-10-2011 07:47 PM

Hello ,

I install ispcp 1.0.7 on ubuntu 10.04.1 LTS and everything goes well , but apache does not start after reboot . Even if I tried to start it manually did not work , and what is strange is that there is no error in / etc/init.d/apache2 restart, but the right side I see no "OK" and return to console . The only way I managed to start apache was by regenerate the config files (http://isp-control.net/documentation/howto/ispcp/regenerate_config) . Apache does not start only in case of reboot , and reading the log I have not yet figured out what could be the problem . Does anyone have any idea where could be the problem?
Thanks!


RE: Ubuntu 10.04.1 - After reboot apache won't start - delboy711 - 01-10-2011 09:21 PM

Check to see if /etc/init.d/apache2 has become a zero byte file with a copy of the original file renamed.
I get this problem about once a week, as apparently have other users.
As yet I do not know the cause.


RE: Ubuntu 10.04.1 - After reboot apache won't start - claussit - 01-10-2011 10:48 PM

Thank you. You're right . /etc/init.d/apache2 is an empty file and I found /etc/init.d/apache2.1 which I guess is the original file . Probably the only option we have , until someone finds the problem , is to put something in cron to copy the original file over the empty file , with a range of ..... each as desired . Thanks again delboy711 .


RE: Ubuntu 10.04.1 - After reboot apache won't start - Kommius - 01-11-2011 07:41 AM

(01-10-2011 10:48 PM)claussit Wrote:  Thank you. You're right . /etc/init.d/apache2 is an empty file and I found /etc/init.d/apache2.1 which I guess is the original file . Probably the only option we have , until someone finds the problem , is to put something in cron to copy the original file over the empty file , with a range of ..... each as desired . Thanks again delboy711 .

Funny, I get the same problem too... my /etc/init.d/apache file is completely empty and I am at file "apache2.4" lol.. Help!


RE: Ubuntu 10.04.1 - After reboot apache won't start - claussit - 01-11-2011 05:45 PM

Put a command in cron to copy original file over the empty file . Choose an interval that suits the problem . Maybe someone with experience will find the problem .


RE: Ubuntu 10.04.1 - After reboot apache won't start - Kommius - 01-15-2011 09:14 PM

(01-11-2011 05:45 PM)claussit Wrote:  Put a command in cron to copy original file over the empty file . Choose an interval that suits the problem . Maybe someone with experience will find the problem .

More info on the bug here :

https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/392532

Here's a HowTo on how to restore the original file :

Code:
cd /tmp

aptitude download apache2.2-common

dpkg --extract apache2.2-common_*.deb apache2.2-common

sudo cp apache2.2-common/etc/init.d/apache2 /etc/init.d



RE: Ubuntu 10.04.1 - After reboot apache won't start - hubsif - 01-15-2011 10:44 PM

I'm running ispcp on gentoo and had the same problems: apache file got zipped every saturday, new /etc/init.d/apache2 file was empty.

I found the cause: It's due to a misconfigured logrotate / logrotate bug.

Despite others I had the files "apache2" and "ispcp" in /etc/logrotate.d/. Both of them set the rotation of "/var/log/apache2/*.log" which caused logrotate to do weird things: It misinterpreted the config and thought the script-line "/etc/init.d/apache2 reload [...]" is the next entry and therefore rotated /etc/init.d/apache2.
If you delete one of these files everything works fine again.

In short: remove "/etc/logrotate.d/apache2" (or similar)!

hubsif.


RE: Ubuntu 10.04.1 - After reboot apache won't start - delboy711 - 01-20-2011 10:31 PM

(01-15-2011 10:44 PM)hubsif Wrote:  I found the cause: It's due to a misconfigured logrotate / logrotate bug.

Thanks for that hubsif. It happened again today so I have implemented your fix. Just to be sure I have also chmodded /etc/init.d/apache2 to permissions 550