Problem restarting httpd after certificate request
Opened this issue · 3 comments
When the script tries to restart httpd after a certificate request I have the following error:
Starting httpd: (98)Address already in use: make_sock: could not bind to address xxx.xxx.xxx.xxx:8080
no listening sockets available, shutting down
Unable to open logs
To resolve the problem I used:
lsof -i :8080
to see who was binding port 8080, and then i terminated manually the httpd processes that were listening on port 8080 using
kill -SIGTERM <pid>
I'm not sure it is strictly related with this project, but if it's not this can be helpful for other users experiencing similar problems
My server is running:
CentOS release 6.7
Vesta 0.9.8
Apache 2.2.15
nginx 1.10.0
It kind of sounds like you have something going on that's causing Apache to hang when it tries to shutdown. While I haven't seen this particular issue on any Vesta server, I have seen Apache hiccup on restarts in other environments before.
Two things you might try:
- Try doing a "service httpd stop" after you run the letsencrypt-vesta script and get an error. That should cleanly stop all Apache processes. Give it a few seconds and then do a "service httpd start" to restart it.
- You might also try changing the "service httpd restart" to "service httpd reload" in the letsencrypt-vesta script. Technically, a full Apache restart shouldn't be necessary to load the new cert; a reload of the configs should work in most cases.
Hi, thanks for your reply!
- I noticed that
service httpd restart
has this kind of problem only after the execution of letsenrcypt-vesta - After letsencrypt-vesta execution
service httpd stop
fails, so unfortunately this doesn't help - Changing
service httpd restart
inservice httpd reload
solved the problem!
+1
Please change to reload
, it solves the problem for me too. IIRC there's no need to restart the server when only changing the SSL params.