By zahedjoy009
[root@tbcl conf]# systemctl status -l httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2017-03-27 21:28:14 BDT; 1min 3s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 5590 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 5589 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 5589 (code=exited, status=1/FAILURE)
Mar 27 21:28:14 tbcl httpd[5589]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 192.168.176.129. Set the 'ServerName' directive globally to suppress this message
Mar 27 21:28:14 tbcl httpd[5589]: (98)Address already in use: AH00072: make_sock: could not bind to address 192.168.176.129:80
Mar 27 21:28:14 tbcl httpd[5589]: no listening sockets available, shutting down
Mar 27 21:28:14 tbcl httpd[5589]: AH00015: Unable to open logs
Mar 27 21:28:14 tbcl systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Mar 27 21:28:14 tbcl kill[5590]: kill: cannot find process ""
Mar 27 21:28:14 tbcl systemd[1]: httpd.service: control process exited, code=exited status=1
Mar 27 21:28:14 tbcl systemd[1]: Failed to start The Apache HTTP Server.
Mar 27 21:28:14 tbcl systemd[1]: Unit httpd.service entered failed state.
Mar 27 21:28:14 tbcl systemd[1]: httpd.service failed.
[root@tbcl conf]# systemctl start httpd
Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
The issue is this line:
Mar 27 21:28:14 tbcl httpd[5589]: no listening sockets available, shutting down
Something else is listening on port 80/443, thus Apache fails to start as you can’t have two services listening on the same port at the same time.
You’ll want to run:
netstat -ltnp | grep ':80'
… to see what else is listening on that port and kill the process, otherwise Apache will continue to fail to start.
Once you find the process, you can either shutdown the service, or use kill -9
to kill off the process using the id
.
i.e.
kill -9 id
Where id
is the process ID. Once the process is killed off, you can then start or restart Apache and it should work.
…
As a general note, please keep in mind this community designed for DigitalOcean customers as well as potential future customers, so while we can help with general linux issues like this one, there may be some issues we can’t help with since DigitalOcean does not use VMWare.
ln -s /etc/apache2/conf-available/servername.conf /etc/apache2/conf-enabled/servername.conf
What’s the output of systemctl status httpd.service
showing as of right now?
Quick note:
<virtualHost *:80>
should be:
<VirtualHost *:80>
Capital V
.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.