LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   HTTPD in Centos6 won't start im getting crazy (https://www.linuxquestions.org/questions/linux-server-73/httpd-in-centos6-wont-start-im-getting-crazy-4175528237/)

ESER666 12-14-2014 08:54 AM

HTTPD in Centos6 won't start im getting crazy
 
Hello , so yesterday i received my dedicated server as usual i installed httpd

i get this error

[root@host ~]# strace -f -o apache.trace /usr/sbin/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 also try to change HTTPD port but same error i try to reboot or reinstall package but still same error

httpd start but not show online and the log show me this

[Sun Dec 14 09:01:08 2014] [notice] Apache/2.2.15 (Unix) DAV/2 configured -- resuming normal operations
[Sun Dec 14 09:04:34 2014] [notice] caught SIGTERM, shutting down
[Sun Dec 14 09:04:34 2014] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Sun Dec 14 09:04:34 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Dec 14 09:04:34 2014] [notice] Digest: done

i also try to disable SELinux :s

btmiller 12-14-2014 11:15 AM

Sounds like something is already listening on port 80. What does "netstat -tpan" show?

ESER666 12-14-2014 11:25 AM

Thanks BTmiller for your reply i was forgot to do setenforce 0 and now is working.

btmiller 12-14-2014 07:49 PM

Well turning off SELinux is one way to solve the problem, but it would be better to edit your SELinux policy so that httpd has the necessary authorization to bind to port 80. Simply disabling security features is usually not a smart policy, although it can be useful in a pinch to verify that the security policy is indeed to problem.

John VV 12-14-2014 11:16 PM

Quote:

setenforce 0 and now is working.
on a server DO NOT turn off SE !!!!
for setting up and testing set it to "permissive"
and read the selinuxtroubleshooter WARNINGS
and fix them
then set SE to "Enforcing "


How did you install Apache ?
if from source ,then i take it you did not install the apache SE policies via yum

please do so


PS.
now that it is set to "off" when you turn it back on
the entire drive array will need to be relabeled
if this is say 10 TiB or larger

that will take all day ( and then some) to finish


All times are GMT -5. The time now is 10:55 AM.