biemond / biemond-oradb

Puppet Oracle Database Module
Apache License 2.0
59 stars 113 forks source link

[oracle client 11.2.0.4] opatch lspatches: Unrecognized Command #157

Open surcouf opened 7 years ago

surcouf commented 7 years ago

After successfully installed Oracle Database Client 11.2.0.4, facter showing this following syntax error :

#  facter -p oracle_database_homes
Syntax Error... Unrecognized Command or Option: 1st argument must be one of the following:
   apply
   napply
   rollback
   nrollback
   lsinventory
   lsinv
   query
   util
   prereq
   version
   -help
   -h

The command opatch doesn't recognize lspatches argument :

#  su oracle -c '${ORACLE_HOME}/OPatch/opatch lspatches'
Invoking OPatch 11.1.0.6.6

Programme d'installation des patches temporaires Oracle version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation. Tous droits réservés.

Erreur de syntaxe... Unrecognized Command or Option: 1st argument must be one of the following:
   apply
   napply
   rollback
   nrollback
   lsinventory
   lsinv
   query
   util
   prereq
   version
   -help
   -h
Please use the option 'opatch  -help' to get correct syntax

OPatch failed with error code 14
biemond commented 7 years ago

Thanks,

I will add a try / catch around. Probably it is higher opatch feature. Can you do a opatch upgrade and see if that helps.

thanks

biemond commented 7 years ago

Hi I cannot re-produce it , what client image are you using

can you check this vagrant image https://github.com/biemond/biemond-oradb-vagrant-11.2-ASM-puppet4_3/blob/master/puppet/environments/development/manifests/client.pp

[vagrant@dbclient ~]$ sudo -i
[root@dbclient ~]#
[root@dbclient ~]#
[root@dbclient ~]# facter -p oracle_database_homes

[root@dbclient ~]#
[root@dbclient ~]#

edwins-mbp:biemond-oradb-vagrant-11.2-ASM-puppet4_3 edwinbiemond$ vagrant provision dbclient
==> dbclient: Running provisioner: shell...
    dbclient: Running: inline script
==> dbclient: Running provisioner: puppet...
==> dbclient: Running Puppet with environment development...
==> dbclient: Info: Loading facts
==> dbclient: Info: Loading facts
==> dbclient: Info: Loading facts
==> dbclient: Info: Loading facts
==> dbclient: Warning: /vagrant/puppet/hiera.yaml: Use of 'hiera.yaml' version 3 is deprecated. It should be converted to version 5
==> dbclient:    (in /vagrant/puppet/hiera.yaml)
==> dbclient: Warning: Defining "data_provider": "hiera" in metadata.json is deprecated
==> dbclient:    (in /tmp/vagrant-puppet/environments/development/modules/oradb/metadata.json)
==> dbclient: Info: oradb::oracle_exists: full oracle home path /oracle/product/11.2/client
==> dbclient: Info: oradb::oracle_exists: total oracle products /oracle/product/11.2/client;
==> dbclient: Info: oradb::oracle_exists: find /oracle/product/11.2/client inside /oracle/product/11.2/client;
==> dbclient: Info: oradb::oracle_exists: found return true
==> dbclient: Notice: Compiled catalog for dbclient.example.com in environment development in 0.80 seconds
==> dbclient: Info: Applying configuration version '1490896579'
==> dbclient: Notice: Applied catalog in 3.11 seconds
edwins-mbp:biemond-oradb-vagrant-11.2-ASM-puppet4_3 edwinbiemond$
surcouf commented 7 years ago

Hi,

I'm using Oracle client 11.2.0.4 :

$ opatch lsinv Invoking OPatch 11.1.0.6.6

Oracle Interim Patch Installer version 11.1.0.6.6 Copyright (c) 2009, Oracle Corporation. All rights reserved.

Oracle Home : /opt/oracle/client/11.2.0.4 Central Inventory : /opt/oracle/oraInventory from : /etc/oraInst.loc OPatch version : 11.1.0.6.6 OUI version : 11.2.0.1.0 OUI location : /opt/oracle/client/11.2.0.4/oui Log file location : /opt/oracle/client/11.2.0.4/cfgtoollogs/opatch/opatch2017-04-10_17-56-12PM.log

Patch history file: /opt/oracle/client/11.2.0.4/cfgtoollogs/opatch/opatch_history.txt

Lsinventory Output file location : /opt/oracle/client/11.2.0.4/cfgtoollogs/opatch/lsinv/lsinventory2017-04-10_17-56-12PM.txt


Installed Top-level Products (1):

Oracle Client 11.2.0.1.0 There are 1 products installed in this Oracle Home.

There are no Interim patches installed in this Oracle Home.


OPatch succeeded.

Regards,

-- Raphaël Bordet.

biemond commented 7 years ago

So it worked for you.

thanks

surcouf commented 7 years ago

No, the facts failed to execute opatch lspatches command.

biemond commented 7 years ago

Ok,

I don't know what is going on, it works for me. maybe your oraInventory is corrupted somehow. Can you test it on a clean machine.