Apache cookbook fail to start Chef

I write a cookbook on Chef.But I got an error.

 

package ‘apache2’

service ‘apache2’ do

action [:enable, :start]

end

file ‘/var/www/html/index.html’ do

content ‘<html>

<body>

<h1>Hello World</h1>

</body>

</html>’

end

 

Error:

STDERR: AH00558: apache2: Could not reliably determine the server’s fully qualified domain name, using 127.0.0.1. Set the ‘ServerName’ directive globally to suppress this message

(98)Address already in use: AH00072: make_sock: could not bind to address [::]:80

(98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:80

no listening sockets available, shutting down

AH00015: Unable to open logs

—- End output of /etc/init.d/apache2 start —-

Ran /etc/init.d/apache2 start returned 1

 

Answer:

 

Check your open port below command.

sudo netstat -ltnp | grep :80

vagrant@swarm-manager:~$ sudo netstat -ltnp | grep :80

tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      628/dockerd

Docker service is using port 80

service docker stop

And run again cookbook.Its successfully done.

Emre Özkan About Emre Özkan
I live in Istanbul/TURKEY and working with Anadolubank.,I am Unix & Backup & Storage Admin in this company. My responsibilities are IBM Power Hardware(E850,P780,P770, etc.),IBM AIX,Tivoli Storage Manager,IBM Tape Libraries,Hitachi VSP and IBM DS8100 Storage.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>