the webserver (httpd) does not start up again

Hi, Help Search all services running, but the webserver (httpd) does not start up again. Help me if you can stay happy. The following error message:

Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs [FAILED]

Status: 
Closed (fixed)

Comments

Howdy -- it looks like looks like an Apache process may be stuck.

To fix it, try this -- first, log into your server as root.

Then, run these commands:

/etc/init.d/httpd stop
killall httpd
/etc/init.d/httpd start

Does Apache start up when you run those 3 commands?

Unfortunately, I had no success. The result is the following:

/etc/init.d/httpd stop Stopping httpd: [FAILED] killall httpd /etc/init.d/httpd start Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80 (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs [FAILED]

Okay, it might be really stuck then... try these commands:

killall -9 httpd

(wait a few seconds)

/etc/init.d/httpd start

Does that work?

Ok. Thanks.

killall -9 httpd /etc/init.d/httpd start Starting httpd: [ OK ]

Great, I'm glad that worked!

Unfortunately, I installed a different domain name. But it did not work one more time after the httpd. I ran the same commands, re-worked the httpd. This situation will always continue to do so? What are the causes of this situation. In addition, the "phpmyadmin" is the following warning: The mcrypt extension is missing. Please check your PHP configuration.

I've seen that occur on rare occasions, usually somehow relating to an application causing the Apache process to get "stuck".

Sometimes, changing your PHP Execution Mode can help. You can change that by going into Server Configuration -> Website Options, and changing the PHP Execution Mode on that page.

By default, it uses FCGID. You could try changing it to CGI.

I could try changing it to CGI. Unfortunately, even though I make this change and continues to this problem was repeated.

Did you change the PHP Execution Mode for all your Virtual Servers? Chances are that it's just one in particular that's causing the problem, but without knowing which one that is -- you'd probably need to change it for all of them to see if that will resolve the issue.

Yes, I change the PHP Execution Mode for all my Virtual Servers. But in this case, both the httpd stopped. Image is broken down both sites. This is not the solution. This method should be another solution!

Okay... I'm not really sure why you're seeing that behavior. We've seen that issue occur intermittently, but not as frequently as it occurs on your system.

Ideally, we'd figure out what was making Apache get stuck... but I'm not sure of a good way to do that :-)

So, in the meantime, what we can do is tell Virtualmin to kill off Apache processes when restarting Apache.

If you go into Webmin -> Servers -> Apache -> Module Config -> System Configuration, what is "Command to apply configuration" currently set to?

Order your specified topic and the following is selected:

System configuration > /etc/rc.d/init.d/httpd graceful

The same problem continues. I answer and wait for you to help me with this.

Try changing the command on that Module Config page to :

/etc/init.d/httpd stop ; killall -9 httpd ; /etc/init.d/httpd start

Unfortunately, the problem continues to httpd. I applied your typed commands. However, the "Virtualmin" stands on the Apache server and does not work after I make any transactions. I ran the commands, the Apache server is working again. This situation is repeating itself. This is like a vicious cycle. A definitive solution to this problem and must be repeated again. Waiting for your suggestions Solution ...

Please give me the answer!

Unfortunately, the problem continues to httpd. I applied your typed commands. However, the "Virtualmin" stands on the Apache server and does not work after I make any transactions. I ran the commands, the Apache server is working again. This situation is repeating itself. This is like a vicious cycle. A definitive solution to this problem and must be repeated again. Waiting for your suggestions Solution ...

The attached files on the Apache config settings!

Sorry, we're really struggling to figure out what's wrong... the issue you're seeing isn't typical, and we haven't run into that on other servers.

Can you describe an example of something you've recently done in Virtualmin where this problem with Apache came up? Does it typically occur while adding a Virtual Server, for example?

I don't see this in the files you attached, I wanted to verify that you went into Webmin -> Servers -> Apache -> Module Config -> System Configuration, and set "Command to apply configuration" to this:

/etc/init.d/httpd stop ; killall -9 httpd ; /etc/init.d/httpd start

As that really should have resolved the issue you're seeing. If it's currently set to that, one other thing you could try is to set it to wait a few seconds, maybe it's taking some time to perform that kill. You could try using this command:

/etc/init.d/httpd stop ; killall -9 httpd ; sleep 5 ;  /etc/init.d/httpd start

Let us know if that helps!

Yes, I can describe an example of something I have recently done in Virtualmin where this problem with Apache came up!

I have now added a new virtual server. Unfortunately, Apache is stopped, all the websites remained functionless ..

I could try using this command:

/etc/init.d/httpd stop ; killall -9 httpd ; sleep 5 ; /etc/init.d/httpd start

Apache re-worked. But I repeated the same problem when I add a new virtual server.

Well, what I meant was -- if you could add that command to this section of Virtualmin:

Webmin -> Servers -> Apache -> Module Config -> System Configuration, and set "Command to apply configuration"

So, when you look at "Command to apply configuration", the command should be this:

/etc/init.d/httpd stop ; killall -9 httpd ; sleep 5 ; /etc/init.d/httpd start

Then, after you add that command to "Command to apply configuration", try adding another Virtual Server, and see if that works for you.

I applied this command. But this problem continues I install a new virtual server! That is only one time, the solution can be typed command.

Is there any chance I could log onto your server to take a look?

If so, what I would need are root login details in order to log in via SSH and Virtualmin to try and determine what's going on.

If that's okay, can you email root login details to eric@virtualmin.com? Thanks!

Yes, I received a message from you a few days ago that included the same message that was here in the ticket tracker... but I haven't received anything regarding your root login details.

Hmm, it doesn't look like the "Command to apply configuration" option in Webmin's System Configuration screen was updated to use the command I offered above.

I made that change myself just now... can you try adding a new Virtual Server, and see if it properly restarts Apache?

Yup, I responded in comment #25 above, can you take a look at that, and give it another try to see if that resolves your issue?

I continued to work on a new virtual server after installing Apache. But after installing phpMyAdmin, Apache did not work again. Repeated the old problem.

Okay, I think I figured out what's causing the problem.

It looks like some non-standard Apache modules were enabled, that were causing some problems.

After disabling the non-standard modules, I'm able to restart Apache without a problem.

The mod_nss and mod_dnssd modules seemed to be both contributing to the problem -- it's rare that those are needed, were using them for something?

I also disabled auth_kerb, auth_pgsql, authz_ldap, and wsgi -- it's extremely rare that those are needed. By disabling them, it will lower the chances of having problems, Apache restarts will happen quicker, and each of your Apache processes are all about 200MB smaller.

I recommend disabling all of those, but if you were using some functionality there, I can re-enable some or all of them.

However, I think you'll continue to see these problems if you have mod_nss or mod_dnssd enabled.

Thank you very much for your help! Apache is completely solved the problem. Now you do not repeat.

Great, I'm glad that's working for you now!

Automatically closed -- issue fixed for 2 weeks with no activity.