Getting error while running word press cookbook


#1

HI ,

I’m getting below error while running wordpress cookbook.

Note: This error intermediate yestaday I ran 2 times it’s went successful but today I’m facing this issue. please help to resolve this issue.

Chef-server : 12
Chef-clent : 11.16.4
wordpress - 2.1.3

  • service[apache2] action restart

    ================================================================================
    Error executing action restart on resource ‘service[apache2]’

    Mixlib::ShellOut::ShellCommandFailed

    Expected process to exit with [0], but received ‘1’
    ---- Begin output of /sbin/service httpd restart ----
    STDOUT: Stopping httpd: [ OK ]
    Starting httpd: [FAILED]
    STDERR: (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
    ---- End output of /sbin/service httpd restart ----
    Ran /sbin/service httpd restart returned 1

    Resource Declaration:

    In /var/chef/cache/cookbooks/apache2/recipes/default.rb

    24: service 'apache2' do
    25:   service_name node['apache']['package']
    26:   case node['platform_family']
    27:   when 'rhel'
    28:     reload_command '/sbin/service httpd graceful'
    29:   when 'debian'
    30:     provider Chef::Provider::Service::Debian
    31:   when 'arch'
    32:     service_name 'httpd'
    33:   end
    34:   supports [:start, :restart, :reload, :status]
    

    Compiled Resource:

    Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:24:in `from_file’

    service(“apache2”) do
    action [:enable, :start]
    updated true
    supports {:restart=>true, :reload=>true, :status=>true, :start=>true}
    retries 0
    retry_delay 2
    guard_interpreter :default
    service_name "httpd"
    enabled true
    running true
    pattern "apache2"
    reload_command "/sbin/service httpd graceful"
    cookbook_name "apache2"
    recipe_name "default"
    only_if "/usr/sbin/httpd -t"
    end

Running handlers:
[2014-10-31T06:01:40+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-10-31T06:01:40+00:00] ERROR: Exception handlers complete
[2014-10-31T06:01:40+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 117 resources updated in 310.667384885 seconds
[2014-10-31T06:01:40+00:00] ERROR: service[apache2] (apache2::default line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of /sbin/service httpd restart ----
STDOUT: Stopping httpd: [ OK ]
Starting httpd: [FAILED]
STDERR: (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
---- End output of /sbin/service httpd restart ----
Ran /sbin/service httpd restart returned 1
[2014-10-31T06:01:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Regards,
PullaReddy
TechOps


#2

The relevant error is here:

---- Begin output of /sbin/service httpd restart ----

STDOUT: Stopping httpd: [ OK ]

Starting httpd: [FAILED]

STDERR: (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
http://0.0.0.0/

no listening sockets available, shutting down


Is there something else listening on port 80?

Looks like this is the restart as part of the apache2 cookbook. Is this
recipe included in your WordPress cookbook or are you calling it
separately?

-Mobile Galen
On Oct 31, 2014 7:09 AM, “Malli Pulla Reddy” mpreddy@jamcracker.com wrote:

HI ,

I’m getting below error while running wordpress cookbook.

Note: This error intermediate yestaday I ran 2 times it’s went successful
but today I’m facing this issue. please help to resolve this issue.

Chef-server : 12

Chef-clent : 11.16.4

wordpress - 2.1.3

  • service[apache2] action restart

================================================================================

 Error executing action `restart` on resource 'service[apache2]'


================================================================================



 Mixlib::ShellOut::ShellCommandFailed

 ------------------------------------

 Expected process to exit with [0], but received '1'

 ---- Begin output of /sbin/service httpd restart ----

 STDOUT: Stopping httpd: [  OK  ]

 Starting httpd: [FAILED]

 STDERR: (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

 ---- End output of /sbin/service httpd restart ----

 Ran /sbin/service httpd restart returned 1



 Resource Declaration:

 ---------------------

 # In /var/chef/cache/cookbooks/apache2/recipes/default.rb



  24: service 'apache2' do

  25:   service_name node['apache']['package']

  26:   case node['platform_family']

  27:   when 'rhel'

  28:     reload_command '/sbin/service httpd graceful'

  29:   when 'debian'

  30:     provider Chef::Provider::Service::Debian

  31:   when 'arch'

  32:     service_name 'httpd'

  33:   end

  34:   supports [:start, :restart, :reload, :status]



 Compiled Resource:

 ------------------

 # Declared in

/var/chef/cache/cookbooks/apache2/recipes/default.rb:24:in `from_file’

 service("apache2") do

   action [:enable, :start]

   updated true

   supports {:restart=>true, :reload=>true, :status=>true,

:start=>true}

   retries 0

   retry_delay 2

   guard_interpreter :default

   service_name "httpd"

   enabled true

   running true

   pattern "apache2"

   reload_command "/sbin/service httpd graceful"

   cookbook_name "apache2"

   recipe_name "default"

   only_if "/usr/sbin/httpd -t"

 end

Running handlers:

[2014-10-31T06:01:40+00:00] ERROR: Running exception handlers

Running handlers complete

[2014-10-31T06:01:40+00:00] ERROR: Exception handlers complete

[2014-10-31T06:01:40+00:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out

Chef Client failed. 117 resources updated in 310.667384885 seconds

[2014-10-31T06:01:40+00:00] ERROR: service[apache2] (apache2::default line
24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to
exit with [0], but received ‘1’

---- Begin output of /sbin/service httpd restart ----

STDOUT: Stopping httpd: [ OK ]

Starting httpd: [FAILED]

STDERR: (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

---- End output of /sbin/service httpd restart ----

Ran /sbin/service httpd restart returned 1

[2014-10-31T06:01:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)

Regards,

PullaReddy

TechOps


#3

http using port 80
yes apahce recipe included in wordpress.
From: Galen Emery [mailto:galen@getchef.com]
Sent: Friday, October 31, 2014 3:49 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Getting error while running word press cookbook

The relevant error is here:

---- Begin output of /sbin/service httpd restart ----

STDOUT: Stopping httpd: [ OK ]

Starting httpd: [FAILED]

STDERR: (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:80http://0.0.0.0/

no listening sockets available, shutting down


Is there something else listening on port 80?

Looks like this is the restart as part of the apache2 cookbook. Is this recipe included in your WordPress cookbook or are you calling it separately?

-Mobile Galen
On Oct 31, 2014 7:09 AM, “Malli Pulla Reddy” <mpreddy@jamcracker.commailto:mpreddy@jamcracker.com> wrote:
HI ,

I’m getting below error while running wordpress cookbook.

Note: This error intermediate yestaday I ran 2 times it’s went successful but today I’m facing this issue. please help to resolve this issue.

Chef-server : 12
Chef-clent : 11.16.4
wordpress - 2.1.3

  • service[apache2] action restart

    ================================================================================
    Error executing action restart on resource ‘service[apache2]’

    Mixlib::ShellOut::ShellCommandFailed

    Expected process to exit with [0], but received ‘1’
    ---- Begin output of /sbin/service httpd restart ----
    STDOUT: Stopping httpd: [ OK ]
    Starting httpd: [FAILED]
    STDERR: (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:80http://0.0.0.0:80
    no listening sockets available, shutting down
    Unable to open logs
    ---- End output of /sbin/service httpd restart ----
    Ran /sbin/service httpd restart returned 1

    Resource Declaration:

    In /var/chef/cache/cookbooks/apache2/recipes/default.rb

    24: service 'apache2' do
    25:   service_name node['apache']['package']
    26:   case node['platform_family']
    27:   when 'rhel'
    28:     reload_command '/sbin/service httpd graceful'
    29:   when 'debian'
    30:     provider Chef::Provider::Service::Debian
    31:   when 'arch'
    32:     service_name 'httpd'
    33:   end
    34:   supports [:start, :restart, :reload, :status]
    

    Compiled Resource:

    Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:24:in `from_file’

    service(“apache2”) do
    action [:enable, :start]
    updated true
    supports {:restart=>true, :reload=>true, :status=>true, :start=>true}
    retries 0
    retry_delay 2
    guard_interpreter :default
    service_name "httpd"
    enabled true
    running true
    pattern "apache2"
    reload_command "/sbin/service httpd graceful"
    cookbook_name "apache2"
    recipe_name "default"
    only_if "/usr/sbin/httpd -t"
    end

Running handlers:
[2014-10-31T06:01:40+00:00] ERROR: Running exception handlers
Running handlers complete
[2014-10-31T06:01:40+00:00] ERROR: Exception handlers complete
[2014-10-31T06:01:40+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
Chef Client failed. 117 resources updated in 310.667384885 seconds
[2014-10-31T06:01:40+00:00] ERROR: service[apache2] (apache2::default line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’
---- Begin output of /sbin/service httpd restart ----
STDOUT: Stopping httpd: [ OK ]
Starting httpd: [FAILED]
STDERR: (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:80http://0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
---- End output of /sbin/service httpd restart ----
Ran /sbin/service httpd restart returned 1
[2014-10-31T06:01:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Regards,
PullaReddy
TechOps


#4

Hi Paulla,

As per the logs shared, the port 80 is already used by some service. please
check for port 80.

Thanks & Regards,
Sachin Gupta

On Fri, Oct 31, 2014 at 11:38 AM, Malli Pulla Reddy mpreddy@jamcracker.com
wrote:

HI ,

I’m getting below error while running wordpress cookbook.

Note: This error intermediate yestaday I ran 2 times it’s went successful
but today I’m facing this issue. please help to resolve this issue.

Chef-server : 12

Chef-clent : 11.16.4

wordpress - 2.1.3

  • service[apache2] action restart

================================================================================

 Error executing action `restart` on resource 'service[apache2]'


================================================================================



 Mixlib::ShellOut::ShellCommandFailed

 ------------------------------------

 Expected process to exit with [0], but received '1'

 ---- Begin output of /sbin/service httpd restart ----

 STDOUT: Stopping httpd: [  OK  ]

 Starting httpd: [FAILED]

 STDERR: (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

 ---- End output of /sbin/service httpd restart ----

 Ran /sbin/service httpd restart returned 1



 Resource Declaration:

 ---------------------

 # In /var/chef/cache/cookbooks/apache2/recipes/default.rb



  24: service 'apache2' do

  25:   service_name node['apache']['package']

  26:   case node['platform_family']

  27:   when 'rhel'

  28:     reload_command '/sbin/service httpd graceful'

  29:   when 'debian'

  30:     provider Chef::Provider::Service::Debian

  31:   when 'arch'

  32:     service_name 'httpd'

  33:   end

  34:   supports [:start, :restart, :reload, :status]



 Compiled Resource:

 ------------------

 # Declared in

/var/chef/cache/cookbooks/apache2/recipes/default.rb:24:in `from_file’

 service("apache2") do

   action [:enable, :start]

   updated true

   supports {:restart=>true, :reload=>true, :status=>true,

:start=>true}

   retries 0

   retry_delay 2

   guard_interpreter :default

   service_name "httpd"

   enabled true

   running true

   pattern "apache2"

   reload_command "/sbin/service httpd graceful"

   cookbook_name "apache2"

   recipe_name "default"

   only_if "/usr/sbin/httpd -t"

 end

Running handlers:

[2014-10-31T06:01:40+00:00] ERROR: Running exception handlers

Running handlers complete

[2014-10-31T06:01:40+00:00] ERROR: Exception handlers complete

[2014-10-31T06:01:40+00:00] FATAL: Stacktrace dumped to
/var/chef/cache/chef-stacktrace.out

Chef Client failed. 117 resources updated in 310.667384885 seconds

[2014-10-31T06:01:40+00:00] ERROR: service[apache2] (apache2::default line
24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to
exit with [0], but received ‘1’

---- Begin output of /sbin/service httpd restart ----

STDOUT: Stopping httpd: [ OK ]

Starting httpd: [FAILED]

STDERR: (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

---- End output of /sbin/service httpd restart ----

Ran /sbin/service httpd restart returned 1

[2014-10-31T06:01:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError:
Chef run process exited unsuccessfully (exit code 1)

Regards,

PullaReddy

TechOps


#5

Can you look at the output from the apache logs? Perhaps the service provider thinks it is successfully shut down when it is not.

-T

On Oct 31, 2014, at 5:58 AM, Sachin Gupta guptasachin1112mrt@gmail.com wrote:

Hi Paulla,

As per the logs shared, the port 80 is already used by some service. please check for port 80.

Thanks & Regards,
Sachin Gupta

On Fri, Oct 31, 2014 at 11:38 AM, Malli Pulla Reddy <mpreddy@jamcracker.com mailto:mpreddy@jamcracker.com> wrote:
HI ,

I’m getting below error while running wordpress cookbook.

Note: This error intermediate yestaday I ran 2 times it’s went successful but today I’m facing this issue. please help to resolve this issue.

Chef-server : 12

Chef-clent : 11.16.4

wordpress - 2.1.3

  • service[apache2] action restart

    ================================================================================

    Error executing action restart on resource ‘service[apache2]’

    ================================================================================

    Mixlib::ShellOut::ShellCommandFailed


    Expected process to exit with [0], but received ‘1’

    ---- Begin output of /sbin/service httpd restart ----

    STDOUT: Stopping httpd: [ OK ]

    Starting httpd: [FAILED]

    STDERR: (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 http://0.0.0.0/
    no listening sockets available, shutting down

    Unable to open logs

    ---- End output of /sbin/service httpd restart ----

    Ran /sbin/service httpd restart returned 1

    Resource Declaration:


    In /var/chef/cache/cookbooks/apache2/recipes/default.rb

    24: service 'apache2' do
    
    25:   service_name node['apache']['package']
    
    26:   case node['platform_family']
    
    27:   when 'rhel'
    
    28:     reload_command '/sbin/service httpd graceful'
    
    29:   when 'debian'
    
    30:     provider Chef::Provider::Service::Debian
    
    31:   when 'arch'
    
    32:     service_name 'httpd'
    
    33:   end
    
    34:   supports [:start, :restart, :reload, :status]
    

    Compiled Resource:


    Declared in /var/chef/cache/cookbooks/apache2/recipes/default.rb:24:in `from_file’

    service(“apache2”) do

     action [:enable, :start]
    
     updated true
    
     supports {:restart=>true, :reload=>true, :status=>true, :start=>true}
    
     retries 0
    
     retry_delay 2
    
     guard_interpreter :default
    
     service_name "httpd"
    
     enabled true
    
     running true
    
     pattern "apache2"
    
     reload_command "/sbin/service httpd graceful"
    
     cookbook_name "apache2"
    
     recipe_name "default"
    
     only_if "/usr/sbin/httpd -t"
    

    end

Running handlers:

[2014-10-31T06:01:40+00:00] ERROR: Running exception handlers

Running handlers complete

[2014-10-31T06:01:40+00:00] ERROR: Exception handlers complete

[2014-10-31T06:01:40+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out

Chef Client failed. 117 resources updated in 310.667384885 seconds

[2014-10-31T06:01:40+00:00] ERROR: service[apache2] (apache2::default line 24) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received ‘1’

---- Begin output of /sbin/service httpd restart ----

STDOUT: Stopping httpd: [ OK ]

Starting httpd: [FAILED]

STDERR: (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 http://0.0.0.0/
no listening sockets available, shutting down

Unable to open logs

---- End output of /sbin/service httpd restart ----

Ran /sbin/service httpd restart returned 1

[2014-10-31T06:01:40+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

Regards,

PullaReddy

TechOps