Help - Search - Members - Calendar
Full Version: httpd repeatedly down
The Planet Forums > Control Panels > Plesk
ukagg
Hi,

During the last 24 hours, httpd on my plesk server has gone down twice. It came back, when I reboot the server through Plesk admin login. I do not have any good knowledge. Can someone help me by analysing the following extracts of error_log, from my server:-

[Thu Apr 11 17:55:59 2002] [error] [client 216.35.116.122] File does not exist: /usr/local/psa/home/vhosts/default/htdocs/robots.txt
[Thu Apr 11 19:20:04 2002] [error] [client 65.80.22.174] File does not exist: /usr/local/psa/home/vhosts/default/htdocs/SmpDsBhgRlfa52b3a0-4d98-11d6-bfc9-444553540000
[Thu Apr 11 19:20:17 2002] [error] [client 65.80.22.174] File does not exist: /usr/local/psa/home/vhosts/default/htdocs/SmpDsBhgRlfa52b3a4-4d98-11d6-bfc9-444553540000
[Thu Apr 11 19:21:43 2002] [error] [client 65.80.22.174] File does not exist: /usr/local/psa/home/vhosts/default/htdocs/SmpDsBhgRlfa52b3a8-4d98-11d6-bfc9-444553540000
[Thu Apr 11 19:39:41 2002] [notice] caught SIGTERM, shutting down
[Thu Apr 11 19:39:45 2002] [notice] Apache/1.3.19 (Unix) mod_perl/1.24_01 mod_throttle/2.11 PHP/4.0.6 FrontPage/4.0.4.3 mod_ssl/2.8.3 OpenSSL/0.9.6b configured -- resuming normal operations
[Thu Apr 11 19:39:45 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/local/psa/apache/bin/suexec)
[Thu Apr 11 19:40:08 2002] [warn] child process 3615 still did not exit, sending a SIGTERM
[Thu Apr 11 19:40:08 2002] [warn] child process 3616 still did not exit, sending a SIGTERM
[Thu Apr 11 19:40:11 2002] [crit] (98)Address already in use: make_sock: could not bind to port 443
[Thu Apr 11 19:40:13 2002] [notice] caught SIGTERM, shutting down
[Thu Apr 11 20:44:55 2002] [notice] Apache/1.3.19 (Unix) mod_perl/1.24_01 mod_throttle/2.11 PHP/4.0.6 FrontPage/4.0.4.3 mod_ssl/2.8.3 OpenSSL/0.9.6b configured -- resuming normal operations
[Thu Apr 11 20:44:55 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/local/psa/apache/bin/suexec)

Please suggest me what is going wrong on the server, and how can I rectify that??

Thanks
Umesh
22host
You're not the only one there.
I noticed this line right at the top of your page. I have that too. Damned script kiddies!! Grr!!
[Thu Apr 11 17:55:59 2002] [error] [client 216.35.116.122] File does not exist: /usr/local/psa/home/vhosts/default/htdocs/robots.txt
From what I can gather from my server it seems to try and reboot itself when the script kiddies give it a lot of hassle.

James
ukagg
I think, the real problem lies in the following lines (damn, I am illiterate to understand these lines):-

[Thu Apr 11 19:39:41 2002] [notice] caught SIGTERM, shutting down
[Thu Apr 11 19:39:45 2002] [notice] Apache/1.3.19 (Unix) mod_perl/1.24_01 mod_throttle/2.11 PHP/4.0.6 FrontPage/4.0.4.3 mod_ssl/2.8.3 OpenSSL/0.9.6b configured -- resuming normal operations
[Thu Apr 11 19:39:45 2002] [notice] suEXEC mechanism enabled (wrapper: /usr/local/psa/apache/bin/suexec)
[Thu Apr 11 19:40:08 2002] [warn] child process 3615 still did not exit, sending a SIGTERM
[Thu Apr 11 19:40:08 2002] [warn] child process 3616 still did not exit, sending a SIGTERM
[Thu Apr 11 19:40:11 2002] [crit] (98)Address already in use: make_sock: could not bind to port 443
[Thu Apr 11 19:40:13 2002] [notice] caught SIGTERM, shutting down


Anyone for help!!!
icon_sad.gif
Rich2k
From that I don't think it's got anything to do with s'kiddies as robots.txt might simply be a search engine crawling your ip / domain.
22host
Well you have a point...
have you got a firewall up ukagg? cause i think you may find that it blocks access to port 443.

James
ukagg
No, I have not installed any firewall. I posted the same query at Plesk Forum, and someone suggested me to read:-

http://forum.plesk.com/showthread.php?s=&threadid=2409

Please comment, what you you think after reading.

Thanks
Umesh
mmoncur
Here's the deal: when you change something in PSA (i.e. add a domain) and exit, it stops and restarts the Apache server. If your server is somewhat busy with other things when you do this, the restart script doesn't work - it shuts down Apache, then tries to restart it without waiting long enough. The original Apache process hasn't quite shut down, so the new one gets the "could not bind to port 443" message.

Looking at your log, I'd say this is quite likely to be your problem.

The solution is in the Plesk Forum thread you found. I made the changes suggested there and also made a cron job that checks Apache and restarts it automatically - but after fixing the script as per that thread, Apache never stops in the first place.

All you need to do is edit the /usr/local/psa/rc.d/httpd file. Find this section:
CODE
f_strt()

{

       srv="$1"

       echo "$product: failed to start $srv"

       exit 1

}

...and add the functions from the PSA thread immediately after the above:
CODE
get_pids_byname()

{

proc_name="$1"

PIDS=`ps -axww | awk '$5 ~ "'$proc_name'$" {print $1}'`

echo $PIDS

}



wait_after_stop()

{

PIDS=`echo "$1" | tr ' ' ,`

count=${2:-50}

while [ 0$count -gt 0 ]

do

ps -p $PIDS > /dev/null 2>&1 || break

sleep 1

count=`expr $count - 1`

done

if [ 0$count -eq 0 ]; then

echo Remaining processes:

ps w -p $PIDS 2>/dev/null

return 1

fi

return 0

}


Finally, find this line:
CODE
             sleep 2
...and replace with:
CODE
             wait_after_stop "`get_pids_byname psa/apache/bin/httpd`" 50


That's it. Once you've saved that file it will kick in at the next restart and Apache shouldn't die.
dodekaedr
You are right , guys !

But it seems this problem already has been fixed with 2.5 release.

I recommend the upgrade to 2.5.
--
DODEKAEDR
ukagg
GREAT!

How did you upgraded to 2.5.... I mean do you need to pay for this upgrade? any problem faced during upgrade?

Thanks
Umesh
dodekaedr
2.5 uses the same keys as 2.0

I did a lot upgrades (Linux, FreeBSD) - only one problem had been happened under FreeBSD (FrontPage configs sendmail %r problem, which can be easily fixed).

But if it is not your own version (but rented one) - probably you must to ask your PSA owner before.

There was no problems with upgrade from 1.3.1 to 2.5. Except you must to buy the new license.
--
DODEKAEDR
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.