[chef] Re: Re: Re: Re: tomcat6 errors


Chronological Thread 
  • From: Ran Tavory < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: tomcat6 errors
  • Date: Tue, 7 Sep 2010 16:41:53 +0300
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=Vdfg7AZ1ZRGv6foY/lefQn06I7I8+NCYfbYt1KFbxr+/gFA3Nu7wVL+hGvVfSLHkvA v1FFHHMvoAC6TPGuKg6lURPTxeG9CrEWvRry6IzPvaDyACEf/baP2sWmQE+qC97R3zCr a83tDBPquVCYI7QA3+WoaCgfMTXKkuh5LKHg4=

Sorry, I forgot the attach the log from the most recent run on centos. This run was relatively successful, but didn't end well...

 ERROR: Re-raising exception: Chef::Exceptions::Exec - /sbin/service tomcat6 restart returned 1, expected 0

Full log here: http://pastebin.com/RTVhgxrS

On Tue, Sep 7, 2010 at 4:35 PM, Ran Tavory < "> > wrote:
I still haven't been able to get ubuntu to work, but I moved on to test centos and I see other errors...

First I see this error:
/tmp/chef-solo/cookbooks/tomcat6/attributes/default.rb:45:in `from_file': undefined method `[]' for nil:NilClass (NoMethodError)

default.rb line 45 is this:
set_unless[:tomcat6][:with_snmp]        = !languages[:java][:runtime][:name].match(/^OpenJDK/)

If I comment out this line (I don't care that much about snmp now) then things start to move but eventually I get this error:
/usr/lib/ruby/gems/1.8/gems/chef-0.9.8/bin/../lib/chef/mixin/command.rb:184:in `handle_command_failures': /sbin/service tomcat6 restart returned 1, expected 0 (Chef::Exceptions::Exec)

So I figured out the problem was in this line at tomcat6/files/default/tomcat6:
NAME="$(/usr/bin/basename $0)"
looks like basename is installed somewhere else, at least on centos (it's on /bin/basename).
When I changed this to just $(basename $0) the installation script finished but still tomcat wasn't installed properly.

~]# /etc/init.d/tomcat6 start
Starting tomcat6: lock file found but no process running for
pid 19454, continuing
                                                           [  OK  ]
~]# /etc/init.d/tomcat6 stop
~]#                                           [  FAILED  ]


Maybe it's b/c I made a mess, I don't know I was trying to get this workin... still couldn't get tomcat6 installed (this time CentOS release 5.5 (Final))

help, thanks


On Tue, Sep 7, 2010 at 9:46 AM, Ran Tavory < " target="_blank"> > wrote:
so what should I put in templates/dtomcat.erb?

I get this when I run:
ERROR: Re-raising exception: Chef::Exceptions::FileNotFound - cookbook tomcat6 does not contain file templates/dtomcat6.erb

On Mon, Sep 6, 2010 at 5:35 PM, Charles Sullivan < " target="_blank"> > wrote:
It wasn't tested well with Ubuntu and makes some assumptions that are only true on other distributions. 

The following needs to be at the very top of the recipe for Ubuntu.  Note that the template and cookbook_file resources were moved from another section of the recipe for order of operations purposes. 

https://gist.github.com/a435155e5f35bc7526a4

Let me know if that doesn't work for you.  I also modified my Tomcat cookbook to use 'jsvc' so that Tomcat would daemonize properly.  If you don't, you'll have to start Tomcat outside of your chef run or manage it with something like 'runit'.

--Charlie



On Mon, Sep 6, 2010 at 8:22 AM, Ran Tavory < " target="_blank"> > wrote:

Ubuntu 10.4

On Sep 6, 2010 4:10 PM, "Charles Sullivan" < " target="_blank"> > wrote:
> What distro are you using?
>
> Sent from my iPhone
>
> On Sep 6, 2010, at 6:09 AM, Ran Tavory < " target="_blank"> > wrote:
>
>> It looks like maybe the tomcat6 cookbook is broken http://cookbooks.opscode.com/cookbooks/tomcat6
>> When I run it I see No such file or directory - /etc/init.d/tomcat6
>> status
>> So it looks like the cookbook is attempting to check tomcat's status
>> before tomcat is installed and so it fails.
>> The full log is here http://pastebin.com/g5u6C9s0
>>
>> I'm a newbe so, you know, if it's my bad let me know....
>> --
>> /Ran
>>




--



--
/Ran




--
/Ran




--
/Ran




Archive powered by MHonArc 2.6.16.

§