Search code examples
centoskill

How can I find a specified service running on a port 443 CentOS and kill it?


I am getting the following error when restarting Apache (as root):

service httpd restart

Output:

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

How can I find and kill the service?


Solution

  • Okay, it’s solved now.

    I did:

    service httpd stop
    
    • Edited the httpd config & changed the default port to 8090 (or whichever port you want to use)

    Then

    service httpd start

    • Edited the httpd config again and changed the default port to 80 just like it was in default configuration.

    I finally restarted the httpd and the problem was fixed (I don't know where the problem was, but changing the port and then again putting it back to default fixed the issue):

    service httpd restart