universityofderby / chef-weblogic

Oracle Weblogic Cookbook
Apache License 2.0
3 stars 11 forks source link

Invalid Central Inventory location "/opt/oracle/inventory" (cannot read/write/execute). #6

Closed mrmarbury closed 8 years ago

mrmarbury commented 9 years ago

I try to install weblogic on RHEL6. In the last task (weblogic installation) I get the following error:

 ================================================================================
Error executing action `update` on resource 'weblogic[12.1.3]'           ================================================================================

Mixlib::ShellOut::ShellCommandFailed
------------------------------------
execute[install weblogic server 12.1.3] (mnet_weblogic::default line 156) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of java -jar /tmp/kitchen/cache/weblogic-12.1.3/fmw_12.1.3.0.0_wls.jar  -silent -responseFile /tmp/kitchen/cache/weblogic-12.1.3/silent.rsp ----
STDOUT: Launcher log file is /tmp/OraInstall2015-09-14_10-29-38AM/launcher2015-09-14_10-29-38AM.log.
Extracting files...................................
Invalid Central Inventory location "/opt/oracle/inventory" (cannot read/write/execute).
STDERR:
---- End output of java -jar /tmp/kitchen/cache/weblogic-12.1.3/fmw_12.1.3.0.0_wls.jar  -silent -responseFile /tmp/kitchen/cache/weblogic-12.1.3/silent.rsp ----
Ran java -jar /tmp/kitchen/cache/weblogic-12.1.3/fmw_12.1.3.0.0_wls.jar  -silent -responseFile /tmp/kitchen/cache/weblogic-12.1.3/silent.rsp returned 1

Cookbook Trace:
---------------
           /tmp/kitchen/cache/cookbooks/resource/files/lib/chef_resource/chef_dsl/chef_resource_extensions.rb:118:in `run_action'
           /tmp/kitchen/cache/cookbooks/resource/files/lib/chef_resource/chef_dsl/chef_resource_extensions.rb:98:in `run_action'

Resource Declaration:
---------------------
# In /tmp/kitchen/cache/cookbooks/mnet_weblogic/recipes/default.rb

            18: weblogic node['mnet_weblogic']['version'] do
            19:   ownername node['mnet_weblogic']['user'][0]
            20:   groupname node['mnet_weblogic']['group'][0]
            21: end

           Compiled Resource:
           ------------------
           weblogic("") do
             # Declared in /tmp/kitchen/cache/cookbooks/mnet_weblogic/recipes/default.rb:18:in `from_file'
             version   "12.1.3"
             ownername "weblogic"
             groupname "weblogic_admin"
           end

When I login to the system, become user weblogic and execute the command by hand:

java -jar /tmp/kitchen/cache/weblogic-12.1.3/fmw_12.1.3.0.0_wls.jar  -silent -responseFile /tmp/kitchen/cache/weblogic-12.1.3/silent.rsp

Installation succeeds.

Do you have any suggestions regarding what might be missing here? User Weblogic is in the dba group.

Cheers, Stefan

damacus commented 9 years ago

Does the resource look like this?

weblogic "12.1.3" do
  ownername "weblogic"
  groupname "weblogic_admin"
end

and does it work when used like:

weblogic "12.1.3" do
  ownername "weblogic"
  groupname "dba"
end
mrmarbury commented 9 years ago

yes and yes. I currently use the second one as a workaround. I would like to use the first one though. I might just override the attribute that sets dba then, don't I?

damacus commented 9 years ago

OK I might have got to the bottom of it. It looks like a bit of interaction between weblogic resource and oracle inventory.

There's a new branch called welogic_admin (because typing is hard...) Could you run a kitchen test weblogic-server-12-1-3-weblogic-admin-centos-66 for me please as I don't currently have access to the weblogic 12.1.3 binary from where I am?

You'll notice I've (as you suggested) overridden the node attributes that oracle-inventory is reading.