ispCP - Board - Support
apache is not restarting - 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 is not restarting (/thread-11459.html)



apache is not restarting - chani - 08-22-2010 12:01 PM

Hello,

as soon as i add a domain, a subdomain or remove a domain or subdomain i get a mail, telling me that "Apache config file is corrupted. Please check before restarting Apache server!!!" - I tried to track down the issue, so the mail is telling me "A critical error just was encountered while executing function restart_httpd() in /var/www/ispcp/engine/ispcp-serv-mngr". Alright - Looking into this file to restart_httpd shows me that there is just the exit code of apache2ctl restart checked:

Code:
alia:/# apache2ctl configtest
Syntax OK
alia:/# echo $?
0

I also checked that the CMD_HTTPD is correctly defined in /etc/ispcp/ispcp.conf. Any ideas how i can find out what's causing this? Due to this bug, ispcp is nearly unusable (i have to restart the apache manually everytime someone's adding a subdomain or domain)


running /var/www/ispcp/engine# ./ispcp-rqst-mngr with DEBUGGING gives:

Code:
DEBUG: push_el() sub_name: mngr_start_up(), msg: Starting...
DEBUG: push_el() sub_name: lock_system(), msg: Starting...
DEBUG: push_el() sub_name: lock_system(), msg: Ending...
DEBUG: push_el() sub_name: del_file(), msg: Starting...
DEBUG: push_el() sub_name: del_file(), msg: Ending...
DEBUG: push_el() sub_name: get_conf(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Ending...
DEBUG: push_el() sub_name: setup_main_vars(), msg: Starting...
DEBUG: push_el() sub_name: decrypt_db_password(), msg: Starting...
DEBUG: push_el() sub_name: decrypt_db_password(), msg: Ending...
DEBUG: push_el() sub_name: setup_main_vars(), msg: Ending...
DEBUG: push_el() sub_name: get_conf(), msg: Ending...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: mngr_start_up(), msg: Ending...
DEBUG: push_el() sub_name: mngr_engine(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: doSQL(), msg: Starting...
DEBUG: push_el() sub_name: doSQL(), msg: Ending...
DEBUG: push_el() sub_name: sys_command(), msg: Starting...
DEBUG: push_el() sub_name: sys_command(), msg: ERROR: External command '/var/www/ispcp/engine/ispcp-serv-mngr 1 0 0 0 0 1>/var/log/ispcp/ispcp-serv-mngr.stdout 2>/var/log/ispcp/ispcp-serv-mngr.stderr' returned '1' status !
DEBUG: pop_el() sub_name: sys_command(), msg: ERROR: External command '/var/www/ispcp/engine/ispcp-serv-mngr 1 0 0 0 0 1>/var/log/ispcp/ispcp-serv-mngr.stdout 2>/var/log/ispcp/ispcp-serv-mngr.stderr' returned '1' status !
DEBUG: push_el() sub_name: get_el_error(), msg: Starting...
DEBUG: push_el() sub_name: get_file(), msg: Starting...
....

Those two Errors might cause it?


RE: apache is not restarting - pgentoo - 08-22-2010 02:19 PM

Check your apache error log for clues...


RE: apache is not restarting - chani - 08-22-2010 06:30 PM

(08-22-2010 02:19 PM)pgentoo Wrote:  Check your apache error log for clues...

i did. Nothing in it, all fine.


RE: apache is not restarting - Nuxwin - 08-22-2010 08:43 PM

Hello chani ;

What Distro and ispCP version you use ?


RE: apache is not restarting - chani - 08-29-2010 07:50 AM

debian lenny, ispcp 1.5 (i did the security fixes manually)

the only change to a normal system is, that i'm using runit as sysv replacement (i also tried to replace the start/stop/restart things in ispcp-serv-mngr because i thought this might be the case, but the problem still exists.
nevermind. runit was the cause.


RE: apache is not restarting - Nuxwin - 08-29-2010 03:55 PM

Hello ;

Maybe a race condition. Marc (Kilburn) and me are currently working on a similar problem.

It would be nice if you give me temporary access to your machine so that I can perform some tests (And maybe fix it at the same time).

Regards;


RE: apache is not restarting - chani - 10-27-2010 04:42 AM

(08-29-2010 03:55 PM)Nuxwin Wrote:  Hello ;

Maybe a race condition. Marc (Kilburn) and me are currently working on a similar problem.

It would be nice if you give me temporary access to your machine so that I can perform some tests (And maybe fix it at the same time).

Regards;

Hello,

just to close this one - i solved the issue, its not related to ispcp; it was in fact my own fault. I was trying to replace sysvinit with runit, so i changed the specific parts in ispcp. However, runit is designed in a way, that it's restarting "crashed" (thus also killed, or restarted by an sysvinit script) applications automatic. So while ispcp was shutting down the apache, runit detected that its not running and was starting it again, then ispcp couldnt start it because it was running already...

Maybe it would be a good thing to make it possible to add functionality with different init-systems to ispcp, might be a lot of work though, there's upstart, systemd, runit, sysvinit and some more. I just hoped to use runit because its very stable and well, if something crashes like the apache, it gets restarted automatically, etc bla bla.

However - Not an ispcp bug. :-)