Apache TomEE, pronounced "Tommy", is an all-Apache Java EE 6 Web Profile certified stack where Apache Tomcat is top dog. Apache TomEE is assembled from a vanilla Apache Tomcat zip file. We start with Apache Tomcat, add our jars and zip up the rest. The result is Tomcat with added EE features - TomEE.
I've created a minimal cookbook that sets the necessary attributes and calls the tomcat cookbook (the one we forked since the official one doesn't really work without some annoying hacks).
https://github.com/StFS/tomcat-cookbook-test
It includes a Gemfile and a Berksfile as well as a .lock files.
The test-kitchen config file (.kitchen.yml) defines two platforms (centos 7.0 and ubuntu 14.04) and a single suite that just runs the default recipe. The default recipe includes the apt cookbook (to update the packages on the ubuntu box) and then it includes the default tomcat recipe.
The attributes define a single custom instance and specify that the base instance should not be run.
Both platforms fail. The CentOS platform fails with the error message that I included in my previous mail (see below) and the Ubuntu platform fails with a similar message but not quite the same.
Here is the error message for the Ubuntu platform:
================================================================================Error executing action `create` on resource 'link[/var/lib/tomcat7-csa/webapps]'================================================================================Errno::EISDIR-------------Is a directory @ unlink_internal - /var/lib/tomcat7-csa/webappsResource Declaration:---------------------# In /tmp/kitchen/cookbooks/tomcat/providers/instance.rb80: link "#{new_resource.base}/#{name}" do81: to new_resource.instance_variable_get("@#{attr}")83: endCompiled Resource:# Declared in /tmp/kitchen/cookbooks/tomcat/providers/instance.rb:80:in `block (2 levels) in class_from_file'link("/var/lib/tomcat7-csa/webapps") doaction :createretries 0default_guard_interpreter :defaultto "/var/lib/tomcat7-csa/webapps"link_type :symbolic"
target_file "/var/lib/tomcat7-csa/webapps"declared_type :linkcookbook_name :tomcatend
So it fails in a similar way (unable to link) but for a different directory (/var/lib/tomcat7-csa/webapps) than the CentOS run (which failed on the /usr/share/tomcat/bin directory).
Again, any help with this would be greatly appreciated.
-Stefan Freyr.
From: Stefán Freyr Stefánsson < " target="_blank"> >
Sent: Friday, January 23, 2015 1:31 PM
To: " target="_blank">
Subject: [chef] Problems with Tomcat cookbookHi.
We're using the Tomcat cookbook which is stored in the opscode github account.
Well, actually we are using our own fork of that in which we've applied some of the numerous outstanding pull requests.
So this brings me to my question. It seems that the Opscode Tomcat cookbook (https://github.com/opscode-cookbooks/tomcat) isn't getting a lot of attention. It has 33 open pull requests, some of which make perfect sense (at least to me) but they don't even have a comment on them regarding whether they'll get merged or not.
There is still _some_ activity. A pull request was merged a month ago so it's not totally dead.
I also found an email on this list from last August about an organized hack session (http://lists.opscode.com/sympa/arc/chef/2014-08/msg00026.html) although it has no replies and I don't know what came out of that.
Right now we're working on setting up a non-standard instance of tomcat through this recipe and it's not really going great.
I've set the default["tomcat"]["run_base_instance"] attribute to false and I've added a block with our own Tomcat instance. However, the recipe fails when trying to configure Tomcat with the following error:
================================================================================Error executing action `create` on resource 'link[/usr/share/tomcat/bin]'================================================================================Errno::EISDIR-------------Is a directory - /usr/share/tomcat/binResource Declaration:---------------------# In /tmp/kitchen/cookbooks/tomcat/providers/instance.rb74: link "#{new_resource.base}/#{dir}" do75: to "#{node['tomcat']['base']}/#{dir}"76: end77: endCompiled Resource:------------------# Declared in /tmp/kitchen/cookbooks/tomcat/providers/instance.rb:74:in `block (2 levels) in class_from_file'link("/usr/share/tomcat/bin") doprovider Chef::Provider::Linkaction :createretries 0retry_delay 2guard_interpreter :defaultto "/usr/share/tomcat/bin"link_type :symbolictarget_file "/usr/share/tomcat/bin"cookbook_name :tomcatend
It looks like the cookbook is trying to create a link (/usr/share/tomcat/bin) which points to itself. Not only that, but the location already exists as a directory so even if it were pointing to something that made sense, it wouldn't be able to create it as it already exists.
I'll try to create a self-contained example demonstrating the problem using Test Kitchen, but in the meantime, if anybody knows what's going on here I'd appreciate any help with this.
-Stefan Freyr.
Archive powered by MHonArc 2.6.16.