![]() |
Apache just stopped :O!! - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Support Area (/forum-30.html) +--- Forum: Usage (/forum-34.html) +--- Thread: Apache just stopped :O!! (/thread-3747.html) Pages: 1 2 |
RE: Apache just stopped :O!! - nicolas - 09-10-2008 06:44 PM Hi, I am still investigating the issue. I have been logging all operations during logrotate and still have not found why Apache is stopping and not starting again. But I came through this file: /etc/logrotate.d/ispcp which contains: Quote:/var/log/apache2/users/*.log { Is there a particular reason for stopping and starting Apache 10 times ? RE: Apache just stopped :O!! - sci2tech - 09-11-2008 06:18 AM nicolas Wrote:Is there a particular reason for stopping and starting Apache 10 times ?Thank you for signaling this. See r1348. RE: Apache just stopped :O!! - nicolas - 09-12-2008 08:15 PM [/quote]I finally found where the error is! Apache is stopping when instructed in the /etc/logrotate.d/ispcp script, but does not start again, claiming that port 80 is already bound. Here is the error I logged: Quote:Fri Sep 12 09:08:28 CEST 2008(I have not logged the time when apache2 tries to start again... I will add it to my logs) I understand that the part of the script that does: Quote: for i in `seq 1 10`; dois not working as it should. Is it possible that the apache2.pid file gets deleted when apache2 stops, but that some requests are still being served (thus leaving the port 80 bound)? I will try to change the logrotate script from apache stop / start to "/etc/init.d/apache2 restart" and report results here (the /etc/init.d/apache2 restart script includes a 10second sleep and does a gracefull stop start). Nicolas. RE: Apache just stopped :O!! - sci2tech - 09-13-2008 12:32 AM apache does not need to be restarted anymore on logrotation if you are using ISPCP from trunk. Do not use restart because is an alias for stop... sleep 10 ... start. Better use apache reload. It did solve my problems. Do not know how apache reload is supported by other distro, thats why I did not modified to use this. RE: Apache just stopped :O!! - nicolas - 09-13-2008 01:26 AM I am not keen on moving on a trunk release yet (I prefer to wait for the next stable release, to keep things easy to update). Your solution seems to be exactly what I was looking for. I thought that "apache2 restart" was mandatory after a log rotation but it's not! Under Ubuntu the default script for logrotate.d/apache2 is: Quote: postrotate So I guess this is what should be used (at least under Ubuntu). RE: Apache just stopped :O!! - nicolas - 09-17-2008 07:32 PM This is to confirm that my problem was solved by changing the "apache2 restart" command by a "apache2 reload" in /etc/logrotate.d/apache2 and ispcp files, as it is done by default on Ubuntu. Best regards and thanks to sci2tech! RE: Apache just stopped :O!! - Wut - 10-16-2008 05:26 PM (09-17-2008 07:32 PM)nicolas Wrote: This is to confirm that my problem was solved by changing the "apache2 restart" command by a "apache2 reload" in /etc/logrotate.d/apache2 and ispcp files, as it is done by default on Ubuntu. Hi folks, I found similar problem as nicolas. I already change "apache2 restart" to "apache2 reload" in /etc/logrotate.d/apache2 but what I should do to /etc/logrotate.d/ispcp ? My system is debian so nicolas's solution may not work for mine ? RE: Apache just stopped :O!! - sci2tech - 10-16-2008 08:59 PM (10-16-2008 05:26 PM)Wut Wrote: Hi folks,Same thing. /etc/logrotate.d/apache2 Has nothing to do with ispcp because is not altered in any way by ispcp. In /etc/logrotate.d/ispcp I already did this modifications in the trunk and you should do the same with your installation. Also until ispcp will be stable (and after as well) you should always follow development to see if any modifications done in the trunk is necessary to be implemented in your version of ispcp. RE: Apache just stopped :O!! - Wut - 10-17-2008 01:40 AM (10-16-2008 08:59 PM)sci2tech Wrote:But there is no "apache2 restart" to change to "apache2 reload" in /etc/logrotate.d/ispcp ?(10-16-2008 05:26 PM)Wut Wrote: Hi folks,Same thing. /etc/logrotate.d/apache2 Has nothing to do with ispcp because is not altered in any way by ispcp. In /etc/logrotate.d/ispcp I already did this modifications in the trunk and you should do the same with your installation. Also until ispcp will be stable (and after as well) you should always follow development to see if any modifications done in the trunk is necessary to be implemented in your version of ispcp. |