I'm attempting to configure my webserver, and regardless of the issues I'm having with it, I'm running into a strange error with the 'service' command.
When the httpd service is not running, i can use 'service httpd start' and it works. No issues.
when I use 'service httpd stop' It just plain fails without any other indication.
When I try to use 'service httpd restart' I get this:
Code:
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
I assume what happens is that restart just issues the stop and start command together, and when the stop command fails, the start command gives that error since the service is still running.
So to stop the service, luckily it prints the PID in a file in the logs directory. So all I have to do is open that file, read the number, then run 'kill ######' to stop the process.
Any idea why the service command would work to start the service, but not stop it? This happens regardless if I'm logged in as root, or if I su - in.