[chef] tomcat6 start failing; not much info


Chronological Thread 
  • From: Michael Hayes < >
  • To:
  • Subject: [chef] tomcat6 start failing; not much info
  • Date: Sat, 2 Nov 2013 11:46:52 -0500

Default Tomcat recipe. At the end of the recipe, it goes to start tomcat and fails:

 Expected process to exit with [0], but received '1'
   ---- Begin output of /etc/init.d/tomcat6 start ----
   STDOUT: * Starting Tomcat servlet engine tomcat6
      ...fail!
   STDERR:
   ---- End output of /etc/init.d/tomcat6 start ----
   Ran /etc/init.d/tomcat6 start returned 1

If I log into the node, I can start tomcat fine from the command line, so maybe it’s timing out on start…?

=======================================
Full recipe verbose output and stacktrace:


Recipe: tomcat::default
     * package[tomcat6] action install[2013-11-02T04:50:33+00:00] INFO: Processing package[tomcat6] action install (tomcat::default line 39)
   [2013-11-02T04:50:33+00:00] DEBUG: Platform ubuntu version 12.04 found
   [2013-11-02T04:50:33+00:00] DEBUG: package[tomcat6] checking package status for tomcat6
   tomcat6:
     Installed: 6.0.35-1ubuntu3.3
     Candidate: 6.0.35-1ubuntu3.3
     Version table:
    *** 6.0.35-1ubuntu3.3 0
           500 http://mirror.rackspace.com/ubuntu/ precise-updates/main amd64 Packages
           500 http://mirror.rackspace.com/ubuntu/ precise-security/main amd64 Packages
           100 /var/lib/dpkg/status
        6.0.35-1ubuntu3 0
           500 http://mirror.rackspace.com/ubuntu/ precise/main amd64 Packages
   [2013-11-02T04:50:33+00:00] DEBUG: package[tomcat6] current version is 6.0.35-1ubuntu3.3
   [2013-11-02T04:50:33+00:00] DEBUG: package[tomcat6] candidate version is 6.0.35-1ubuntu3.3
   [2013-11-02T04:50:33+00:00] DEBUG: package[tomcat6] is already installed - nothing to do
    (up to date)
     * package[tomcat6-admin] action install[2013-11-02T04:50:33+00:00] INFO: Processing package[tomcat6-admin] action install (tomcat::default line 39)
   [2013-11-02T04:50:33+00:00] DEBUG: Platform ubuntu version 12.04 found
   [2013-11-02T04:50:33+00:00] DEBUG: package[tomcat6-admin] checking package status for tomcat6-admin
   tomcat6-admin:
     Installed: 6.0.35-1ubuntu3.3
     Candidate: 6.0.35-1ubuntu3.3
     Version table:
    *** 6.0.35-1ubuntu3.3 0
           500 http://mirror.rackspace.com/ubuntu/ precise-updates/main amd64 Packages
           500 http://mirror.rackspace.com/ubuntu/ precise-security/main amd64 Packages
           100 /var/lib/dpkg/status
        6.0.35-1ubuntu3 0
           500 http://mirror.rackspace.com/ubuntu/ precise/main amd64 Packages
   [2013-11-02T04:50:34+00:00] DEBUG: package[tomcat6-admin] current version is 6.0.35-1ubuntu3.3
   [2013-11-02T04:50:34+00:00] DEBUG: package[tomcat6-admin] candidate version is 6.0.35-1ubuntu3.3
   [2013-11-02T04:50:34+00:00] DEBUG: package[tomcat6-admin] is already installed - nothing to do
    (up to date)
     * directory[/usr/share/tomcat6/lib/endorsed] action create[2013-11-02T04:50:34+00:00] INFO: Processing directory[/usr/share/tomcat6/lib/endorsed] action create (tomcat::default line 45)
   [2013-11-02T04:50:34+00:00] DEBUG: found target_mode == current_mode, not updating mode
   [2013-11-02T04:50:34+00:00] DEBUG: found target_uid == nil, so no owner was specified on resource, not managing owner
   [2013-11-02T04:50:34+00:00] DEBUG: found target_gid == nil, so no group was specified on resource, not managing group
    (up to date)
     * service[tomcat] action enable[2013-11-02T04:50:34+00:00] INFO: Processing service[tomcat] action enable (tomcat::default line 83)
   [2013-11-02T04:50:34+00:00] DEBUG: Platform ubuntu version 12.04 found
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] supports status, running
    * Tomcat servlet engine is not running, but pid file exists.
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 0, action stop, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 1, action stop, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 2, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 3, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 4, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 5, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 6, action stop, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: Executing /usr/sbin/update-rc.d -f tomcat6 remove
   [2013-11-02T04:50:34+00:00] DEBUG: ---- Begin output of /usr/sbin/update-rc.d -f tomcat6 remove ----
   [2013-11-02T04:50:34+00:00] DEBUG: STDOUT:  Removing any system startup links for /etc/init.d/tomcat6 ...
      /etc/rc0.d/K20tomcat6
      /etc/rc1.d/K20tomcat6
      /etc/rc2.d/S20tomcat6
      /etc/rc3.d/S20tomcat6
      /etc/rc4.d/S20tomcat6
      /etc/rc5.d/S20tomcat6
      /etc/rc6.d/K20tomcat6
   [2013-11-02T04:50:34+00:00] DEBUG: STDERR:
   [2013-11-02T04:50:34+00:00] DEBUG: ---- End output of /usr/sbin/update-rc.d -f tomcat6 remove ----
   [2013-11-02T04:50:34+00:00] DEBUG: Ran /usr/sbin/update-rc.d -f tomcat6 remove returned 0
   [2013-11-02T04:50:34+00:00] DEBUG: Executing /usr/sbin/update-rc.d tomcat6 defaults
   [2013-11-02T04:50:34+00:00] DEBUG: ---- Begin output of /usr/sbin/update-rc.d tomcat6 defaults ----
   [2013-11-02T04:50:34+00:00] DEBUG: STDOUT:  Adding system startup for /etc/init.d/tomcat6 ...
      /etc/rc0.d/K20tomcat6 -> ../init.d/tomcat6
      /etc/rc1.d/K20tomcat6 -> ../init.d/tomcat6
      /etc/rc6.d/K20tomcat6 -> ../init.d/tomcat6
      /etc/rc2.d/S20tomcat6 -> ../init.d/tomcat6
      /etc/rc3.d/S20tomcat6 -> ../init.d/tomcat6
      /etc/rc4.d/S20tomcat6 -> ../init.d/tomcat6
      /etc/rc5.d/S20tomcat6 -> ../init.d/tomcat6
   [2013-11-02T04:50:34+00:00] DEBUG: STDERR:
   [2013-11-02T04:50:34+00:00] DEBUG: ---- End output of /usr/sbin/update-rc.d tomcat6 defaults ----
   [2013-11-02T04:50:34+00:00] DEBUG: Ran /usr/sbin/update-rc.d tomcat6 defaults returned 0
   [2013-11-02T04:50:34+00:00] INFO: service[tomcat] enabled

       - enable service service[tomcat]

     * service[tomcat] action start[2013-11-02T04:50:34+00:00] INFO: Processing service[tomcat] action start (tomcat::default line 83)
   [2013-11-02T04:50:34+00:00] DEBUG: Platform ubuntu version 12.04 found
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] supports status, running
    * Tomcat servlet engine is not running, but pid file exists.
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 0, action stop, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 1, action stop, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 2, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 3, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 4, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 5, action start, priority 20
   [2013-11-02T04:50:34+00:00] DEBUG: service[tomcat] runlevel 6, action stop, priority 20
    * Starting Tomcat servlet engine tomcat6
      ...fail!

   ================================================================================
   Error executing action `start` on resource 'service[tomcat]'
   ================================================================================


   Mixlib::ShellOut::ShellCommandFailed
   ------------------------------------
   Expected process to exit with [0], but received '1'
   ---- Begin output of /etc/init.d/tomcat6 start ----
   STDOUT: * Starting Tomcat servlet engine tomcat6
      ...fail!
   STDERR:
   ---- End output of /etc/init.d/tomcat6 start ----
   Ran /etc/init.d/tomcat6 start returned 1


   Resource Declaration:
   ---------------------
   # In /root/chef-solo/cookbooks-2/tomcat/recipes/default.rb

    83: service "tomcat" do
    84:   case node["platform"]
    85:   when "centos","redhat","fedora"
    86:     service_name "tomcat#{node["tomcat"]["base_version"]}"
    87:     supports :restart => true, :status => true
    88:   when "debian","ubuntu"
    89:     service_name "tomcat#{node["tomcat"]["base_version"]}"
    90:     supports :restart => true, :reload => false, :status => true
    91:   when "smartos"
    92:     service_name "tomcat"
    93:     supports :restart => true, :reload => false, :status => true
    94:   else
    95:     service_name "tomcat#{node["tomcat"]["base_version"]}"
    96:   end
    97:   action [:enable, :start]



   Compiled Resource:
   ------------------
   # Declared in /root/chef-solo/cookbooks-2/tomcat/recipes/default.rb:83:in `from_file'

   service("tomcat") do
     action [:enable, :start]
     updated true
     supports {:restart=>true, :reload=>false, :status=>true}
     retries 0
     retry_delay 2
     service_name "tomcat6"
     enabled true
     pattern "tomcat"
     startup_type :automatic
     cookbook_name :tomcat
     recipe_name "default"
   end



   [2013-11-02T04:50:39+00:00] INFO: Running queued delayed notifications before re-raising exception
   [2013-11-02T04:50:39+00:00] DEBUG: Re-raising exception: Mixlib::ShellOut::ShellCommandFailed - service[tomcat] (tomcat::default line 83) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
   ---- Begin output of /etc/init.d/tomcat6 start ----
   STDOUT: * Starting Tomcat servlet engine tomcat6
      ...fail!
   STDERR:
   ---- End output of /etc/init.d/tomcat6 start ----
   Ran /etc/init.d/tomcat6 start returned 1
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in `invalid!'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in `error!'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/mixin/shell_out.rb:45:in `shell_out!'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider/service/init.rb:55:in `start_service'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider/service.rb:90:in `block in action_start'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/mixin/why_run.rb:52:in `call'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/mixin/why_run.rb:52:in `add_action'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider.rb:149:in `converge_by'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider/service.rb:89:in `action_start'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider.rb:114:in `run_action'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource.rb:625:in `run_action'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:49:in `run_action'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `each'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `block in converge'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection.rb:96:in `execute_each_resource'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:80:in `converge'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:433:in `converge'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:500:in `do_run'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:199:in `block in run'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:193:in `fork'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:193:in `run'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application.rb:208:in `run_chef_client'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/solo.rb:221:in `block in run_application'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/solo.rb:213:in `loop'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/solo.rb:213:in `run_application'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application.rb:66:in `run'
     /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/bin/chef-solo:25:in `<top (required)>'
     /usr/bin/chef-solo:23:in `load'
     /usr/bin/chef-solo:23:in `<main>'
   [2013-11-02T04:50:39+00:00] ERROR: Running exception handlers
   [2013-11-02T04:50:39+00:00] ERROR: Exception handlers complete
   [2013-11-02T04:50:39+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
   [2013-11-02T04:50:39+00:00] DEBUG: Mixlib::ShellOut::ShellCommandFailed: service[tomcat] (tomcat::default line 83) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
   ---- Begin output of /etc/init.d/tomcat6 start ----
   STDOUT: * Starting Tomcat servlet engine tomcat6
      ...fail!
   STDERR:
   ---- End output of /etc/init.d/tomcat6 start ----
   Ran /etc/init.d/tomcat6 start returned 1
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:251:in `invalid!'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/mixlib-shellout-1.2.0/lib/mixlib/shellout.rb:237:in `error!'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/mixin/shell_out.rb:45:in `shell_out!'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider/service/init.rb:55:in `start_service'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider/service.rb:90:in `block in action_start'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/mixin/why_run.rb:52:in `call'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/mixin/why_run.rb:52:in `add_action'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider.rb:149:in `converge_by'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider/service.rb:89:in `action_start'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/provider.rb:114:in `run_action'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource.rb:625:in `run_action'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:49:in `run_action'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `each'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:81:in `block in converge'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/resource_collection.rb:96:in `execute_each_resource'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/runner.rb:80:in `converge'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:433:in `converge'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:500:in `do_run'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:199:in `block in run'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:193:in `fork'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/client.rb:193:in `run'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application.rb:208:in `run_chef_client'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/solo.rb:221:in `block in run_application'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/solo.rb:213:in `loop'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application/solo.rb:213:in `run_application'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/lib/chef/application.rb:66:in `run'
   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.8.0/bin/chef-solo:25:in `<top (required)>'
   /usr/bin/chef-solo:23:in `load'
   /usr/bin/chef-solo:23:in `<main>'
   Chef Client failed. 3 resources updated
   [2013-11-02T04:50:39+00:00] ERROR: service[tomcat] (tomcat::default line 83) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
   ---- Begin output of /etc/init.d/tomcat6 start ----
   STDOUT: * Starting Tomcat servlet engine tomcat6
      ...fail!
   STDERR:
   ---- End output of /etc/init.d/tomcat6 start ----
   Ran /etc/init.d/tomcat6 start returned 1
   [2013-11-02T04:50:39+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
SystemExit: FAILED !!! bin/knife solo cook "> -V

------
Michael Hayes
Morris Mobile Labs, Inc.
512-300-7142




Archive powered by MHonArc 2.6.16.

§