HTTPD stopped; unable to restart service; received "could not bind to address 0.0.0.0:80" message
search cancel

HTTPD stopped; unable to restart service; received "could not bind to address 0.0.0.0:80" message

book

Article ID: 331334

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Unable to restart HTTPD service after unexpected failure.

service httpd status
httpd is stopped
service httpd start
Starting httpd: (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]


Environment

NCM 10.x

Cause

As per the error message, port 80 is occupied on the server by some other service or Apache service didn't shutdown gracefully/stale entry, hence Apache is not starting up.

Resolution

There are 2 ways to resolve this issue / clear the port 80 -
 
1) Manually kill the process on port 80 using the below example steps:
 
  • determine the PID of the process running on port 80
    netstat -ltnp | grep ':80'

    tcp 0 0 :::80 :::* LISTEN 4019/httpd

  • kill the process
    kill -9 4019
  • Verify the process is dead
    netstat -ltnp | grep ':80'
  • Start the httpd service
    service httpd start
 
2) Restart the server.