Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-12-2005, 12:34 PM
|
#1
|
Member
Registered: Oct 2003
Location: Nebraska
Distribution: SuSE 9.0, Redhat 9.0
Posts: 41
Rep:
|
Apache Crashes at 12:15 AM Every Time!
Hello,
I am having a problem with a RedHat 9.0 Webserver that I am running with Apache 2. Once in awhile (not every day), about every week or 2, apache will crash. The funny part is, every time it crashes, the first "Status Warning" e-mail message is sent to me at 12:15 AM. It is always exactly 12:15 AM.
The "Status Warning" message gives me this as why Apache could not be restarted:
Code:
Nov 12 00:11:00 bulldog httpd: httpd shutdown succeeded
Nov 12 00:11:00 bulldog httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
Nov 12 00:11:00 bulldog httpd: no listening sockets available, shutting down
Nov 12 00:11:00 bulldog httpd: Unable to open logs
Nov 12 00:11:00 bulldog httpd: httpd startup failed
Nov 12 00:11:00 bulldog httpd: httpd shutdown failed
Nov 12 00:11:00 bulldog httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
Nov 12 00:11:00 bulldog httpd: no listening sockets available, shutting down
Nov 12 00:11:00 bulldog httpd: Unable to open logs
Nov 12 00:11:00 bulldog httpd: httpd startup failed
Nov 12 00:15:00 bulldog httpd: httpd shutdown failed
Nov 12 00:15:01 bulldog httpd: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:443
Nov 12 00:15:01 bulldog httpd: no listening sockets available, shutting down
Nov 12 00:15:01 bulldog httpd: Unable to open logs
Nov 12 00:15:01 bulldog httpd: httpd startup failed
It is always fixed by somebody else, not me, so I can't tell you exactly what the state of the machine is when it happens. They usually fix it by rebooting the server.
I have checked root crontab and nothing is set to run around 12:15 AM, so I can't pinpoint it. Any more ideas??
Thanks.
Louie
|
|
|
11-12-2005, 06:08 PM
|
#2
|
Moderator
Registered: May 2001
Posts: 29,415
|
Seems there is already something listening on the HTTPS port when it tries to restart. Find out what it is.
Next to that check if there's any app that tries to restart httpd if it fails.
|
|
|
11-12-2005, 08:20 PM
|
#3
|
LQ Guru
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Rep:
|
Next time the server crashes, Try using netstat to determine what has the port open for listening.
netstat -alp | grep :https
or
netstat -alp | grep :443
I don't have a web server running on this box, but Here's what the output looks like for IPP (Internet priting protocol..) notice since I used the -p flag it lists the process name that has the port open ? in this case it's the cups printing daemon. you should see a similar listig for port 443 or https when you use this command.
Quote:
debian:~# netstat -alp | grep :ipp
tcp 0 0 *:ipp *:* LISTEN 9793/cupsd
udp 0 0 *:ipp *:* 9793/cupsd
|
Last edited by farslayer; 11-13-2005 at 05:02 PM.
|
|
|
11-12-2005, 09:58 PM
|
#4
|
Senior Member
Registered: Dec 2004
Location: Lee, NH
Distribution: OpenSUSE, CentOS, RHEL
Posts: 1,794
Rep:
|
If the time is the same for every single occurence there are several possibilities:
- your apache build or one of your web apps has a time-sensitive bug
- a cron job is messing things up (check crontab, /etc/cron.*/, etc)
- Someone else's box infected with worms or a trojan horse is hitting your site with malformed or malicious requests (check the logs, such things would be obvious)
There are other possibilities but check for those first.
|
|
|
11-13-2005, 08:43 PM
|
#5
|
Member
Registered: Oct 2003
Location: Nebraska
Distribution: SuSE 9.0, Redhat 9.0
Posts: 41
Original Poster
Rep:
|
Quote:
Originally posted by unSpawn
Seems there is already something listening on the HTTPS port when it tries to restart. Find out what it is.
Next to that check if there's any app that tries to restart httpd if it fails.
|
I am about 99% sure that it is Apache that has port 443 bound up. What is was doing last time I SSH'ed into it when it was crashed, there were apache processes still running (many of them, no childs, only parent processes). They would not die in the regular way however. Lets say that one of the processes had a process ID of 873 just for example. If you do "kill -HUP 873", it has no effect, if you do "kill 873", that has no effect either. If you do "killall httpd" or "killall apache", that also has no effect as it comes back saying it can't find any. However, if I do "kill -KILL 873", that finally kills it. I am not sure what the -KILL does, I just found it on the internet somewhere. After all apache processes were finally killed, then apache came back up within 1 minute.
Now, to the question about what apps try to restart apache if it is down, there are 2 of them on the server. The first one is the DirectAdmin Web Hosting Control Panel Software, and the other is a system monitoring program (I can't remember the name). Both of these monitor services on the machine and attempt to restart them when they find one down. But, since apache is still running in a semi-crashed state, it can not be restarted because the crashed form of apache is still bound to the ports.
I had not thought of some other machine sending some kind of requests to crash it, I will check the logs.
Louie
|
|
|
All times are GMT -5. The time now is 01:59 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|