tomcat6 start failing; not much info


#1

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:inerror!’
/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:instart_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:incall’
/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:inconverge_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:inrun_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:inrun_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:ineach’
/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:inblock 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:incall_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:initerate’
/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:inexecute_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:inconverge’
/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:inblock 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:inrun’
/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:inblock 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:inrun_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
[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:inerror!’
/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:instart_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:incall’
/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:inconverge_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:inrun_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:inrun_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:ineach’
/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:inblock 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:incall_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:initerate’
/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:inexecute_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:inconverge’
/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:inblock 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:inrun’
/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:inblock 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:inrun_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'
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)
FAILED !!! bin/knife solo cook root@192.237.245.188 -V
SystemExit: FAILED !!! bin/knife solo cook root@192.237.245.188 -V


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


#2

On Saturday, November 2, 2013 at 9:46 AM, Michael Hayes wrote:

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:

There’s not a lot of helpful information in this output. Doesn’t look like anything is timing out. You should look into the contents of the script to see if you can glean any insight. A common issue with java services is ENV vars not being set, so you could look at your own environment when you’re logged in to see if there’s any differences.


Daniel DeLeo


#3

Thanks I will look at that. Unfortunately, this is just calling the off-the-shelf tomcat opscode-cookbook.

On Nov 4, 2013, at 6:11 PM, Daniel DeLeo dan@kallistec.com wrote:

There’s not a lot of helpful information in this output. Doesn’t look like anything is timing out. You should look into the contents of the script to see if you can glean any insight. A common issue with java services is ENV vars not being set, so you could look at your own environment when you’re logged in to see if there’s any differences.


Daniel DeLeo


#4

I’m afraid that the built-in tomcat6 init script isn’t very good. It uses several different techniques in different parts of the script to detect if there is a running tomcat6, it has the root user create a /var/run/tomcat6.pid file owned by the tomcat6 user but leaves it empty, because only the tomcat6 daemon knows that its pid is, and if the “stop” command sent to the tomcat6 user as an “su” command does not succeed it does not go back and make sure that the daemon is dead. So the several tomcat6 “start” and “stop” steps in a row as a configuration is modified by chef can interfere with each other, because by the time the tomcat6 init script has completed, it’s not really up and running and has left in place the empty, root generated pid file and not populated it yet.

Hilarity then ensues.

This is one of the reasons I dislike the tomcat6 cookbook, and in general dislike and building software packages from source tarballs: the RPM or apt bundled tomcat packages are, generally, much better about this sort of thing.

                            Nico Kadel-Garcia

From: Michael Hayes [hayesmp@thefrontside.net]
Sent: Monday, November 04, 2013 7:47 PM
To: chef@lists.opscode.com
Subject: [chef] Re: tomcat6 start failing; not much info

Thanks I will look at that. Unfortunately, this is just calling the off-the-shelf tomcat opscode-cookbook.

On Nov 4, 2013, at 6:11 PM, Daniel DeLeo <dan@kallistec.commailto:dan@kallistec.com> wrote:

There’s not a lot of helpful information in this output. Doesn’t look like anything is timing out. You should look into the contents of the script to see if you can glean any insight. A common issue with java services is ENV vars not being set, so you could look at your own environment when you’re logged in to see if there’s any differences.


Daniel DeLeo


#5

On Mon, Nov 4, 2013 at 8:06 PM, Kadel-Garcia, Nico
NKadelGarcia-consultant@scholastic.com wrote:

I’m afraid that the built-in tomcat6 init script isn’t very good. It uses
several different techniques in different parts of the script to detect if
there is a running tomcat6, it has the root user create a
/var/run/tomcat6.pid file owned by the tomcat6 user but leaves it empty,
because only the tomcat6 daemon knows that its pid is, and if the “stop"
command sent to the tomcat6 user as an “su” command does not succeed it does
not go back and make sure that the daemon is dead. So the several tomcat6
"start” and “stop” steps in a row as a configuration is modified by chef can
interfere with each other, because by the time the tomcat6 init script has
completed, it’s not really up and running and has left in place the empty,
root generated pid file and not populated it yet.

Hilarity then ensues.

This is one of the reasons I dislike the tomcat6 cookbook, and in general
dislike and building software packages from source tarballs: the RPM or apt
bundled tomcat packages are, generally, much better about this sort of
thing.

AFAIK, the opscode tomcat cookbook uses the vendor packages (Debian/Ubuntu’s).

  • Julian


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]


#6

Yes, the “tomcat” cookbook does. I referred specifically to the tomdat6 cookbook, which does not use the RPM by default, though it pparently has hooks to do so. And even if it does use the system RPM, the tomcat6 cookbook overwrites the default init script with its own, which I consider problematic for the reasons listed below.


From: Julian C. Dunn [jdunn@aquezada.com]
Sent: Monday, November 04, 2013 11:32 PM
To: chef@lists.opscode.com
Subject: [chef] Re: RE: Re: tomcat6 start failing; not much info

On Mon, Nov 4, 2013 at 8:06 PM, Kadel-Garcia, Nico
NKadelGarcia-consultant@scholastic.com wrote:

I’m afraid that the built-in tomcat6 init script isn’t very good. It uses
several different techniques in different parts of the script to detect if
there is a running tomcat6, it has the root user create a
/var/run/tomcat6.pid file owned by the tomcat6 user but leaves it empty,
because only the tomcat6 daemon knows that its pid is, and if the “stop"
command sent to the tomcat6 user as an “su” command does not succeed it does
not go back and make sure that the daemon is dead. So the several tomcat6
"start” and “stop” steps in a row as a configuration is modified by chef can
interfere with each other, because by the time the tomcat6 init script has
completed, it’s not really up and running and has left in place the empty,
root generated pid file and not populated it yet.

Hilarity then ensues.

This is one of the reasons I dislike the tomcat6 cookbook, and in general
dislike and building software packages from source tarballs: the RPM or apt
bundled tomcat packages are, generally, much better about this sort of
thing.

AFAIK, the opscode tomcat cookbook uses the vendor packages (Debian/Ubuntu’s).

  • Julian


[ Julian C. Dunn jdunn@aquezada.com * Sorry, I’m ]
[ WWW: http://www.aquezada.com/staff/julian * only Web 1.0 ]
[ gopher://sdf.org/1/users/keymaker/ * compliant! ]
[ PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9 ]