2

I am new to chef. I am trying to run the cookbook weblogic that I downloaded from the CHEF supermarket.

under cookbook, I have both weblogic & java

when I run chef-solo, it is giving the error. chef::Exception::RecipeNotFound could not find recipe default for cookbook java

my solo.json has only the following: How should I modify the below to fix this? Any info would be great. thanks.

{"run_list": [ "recipe[weblogic]"]}
om-nom-nom
  • 62,329
  • 13
  • 183
  • 228
User3
  • 69
  • 1
  • 9

2 Answers2

0

The weblogic cookbook depends on the java cookbook (the java cookbook does not have any dependencies), you can see this in the weblogic metadata.rb file:

java >= 0.0.0

It's likely that the path in your cookbook_path in your solo.rb file does not contain all of the necessary cookbooks ( are both java and weblogic folders in that path )? The default recipe is part of the java cookbook, so if they are both on the path maybe you should try:

{"run_list": [ "recipe[java]", "recipe[weblogic]"]}

Alternatively you could call recipes explicitly in each like:

{"run_list": [ "recipe[java::openjdk]", "recipe[weblogic::default]"]}
Display Name is missing
  • 6,197
  • 3
  • 34
  • 46
  • Thanks for your comment. I think the java recipes are not there in my environment. Where can I get those? The weblogic cookbook download didn't actually have the java recipes (it has a depend on java). Please provide some input. – User3 Dec 17 '14 at 21:25
  • I downloaded the java cookbook and I am able go past the previous error. Now I get the following. What does this mean? – User3 Dec 17 '14 at 22:22
  • cookbook_name :weblogic recipe_name "default" end Running handlers: [2014-12-17T14:12:20-08:00] ERROR: Running exception handlers Running handlers complete ERROR: Exception handlers complete FATAL: Stacktrace dumped to /opt/chef/chef-stacktrace.out Chef Client failed. 1 resources updated in 13.602002 seconds ERROR: group[oracle] (weblogic::default line 27) had an error: Chef::Exceptions::Exec: groupmod oracle returned 10, expected FATAL:chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1) – User3 Dec 17 '14 at 22:42
  • One of the very first things the weblogic recipe does is try to create a user called 'oracle' and add that to a group called 'oracle', this is failing on your system, possibly because the group already exists. Read the weblogic/recipes/default.rb file to find out what's happening – If this answer helped, please accept it and ask a new question rather than adding more comments – Display Name is missing Dec 18 '14 at 00:34
0

I was working with the same Weblogic recipe, and came to the same error. This error says that there is no default.rb recipe under recipes/ folder.

So I created one, and voila!

The code for my default recipe was:

weblogic '12.1.3' do
  ownername 'weblogic'
  groupname 'weblogic_admin' 
end

Because, in the resources files, there are specified configurations for many Weblogic's versions. So, in the default recipe, you just need to specify the version your are installing.

Carlos B
  • 456
  • 3
  • 11