biemond / biemond-oradb-vagrant-12.1-CDB

puppet oracle database 12c with CDB and pluggable databases
0 stars 1 forks source link

Fails with 12.1.0.2 #1

Open blackbadgerltd opened 8 years ago

blackbadgerltd commented 8 years ago

Vagrant 1.8.1 with VirtualBox 5.0.14, and validated oracle zip files gives:

==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Oracle Net Services configuration successful. The exit code is 0 ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: executed successfully ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/File[/var/tmp/install/database_oraDb.rsp]/ensure: created ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/File[/var/tmp/install/dbtemplate_12.1_oraDb.dbt]/ensure: created ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: Creating and starting Oracle instance ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: 1% complete ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: 4% complete ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: Creating database files ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: 8% complete ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: Creating data dictionary views ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: 9% complete ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: DBCA Operation failed. ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: Look at the log file "/oracle/cfgtoollogs/dbca/cdb/cdb.log" for further details. ==> dbcdb: Error: /oracle/product/12.1/db/bin/dbca -silent -createDatabase -templateName /var/tmp/install/dbtemplate_12.1_oraDb.dbt -gdbname cdb.example.com -createAsContainerDatabase true -responseFile NO_VALUE -sysPassword Welcome01 -systemPassword Welcome01 -dbsnmpPassword Welcome01 -asmsnmpPassword Welcome01 -storageType FS -emConfiguration NONE returned 1 instead of one of [0] ==> dbcdb: Error: /Stage[main]/Oradb_cdb/Oradb::Database[oraDb]/Exec[oracle database oraDb]/returns: change from notrun to 0 failed: /oracle/product/12.1/db/bin/dbca -silent -createDatabase -templateName /var/tmp/install/dbtemplate_12.1_oraDb.dbt -gdbname cdb.example.com -createAsContainerDatabase true -responseFile NO_VALUE -sysPassword Welcome01 -systemPassword Welcome01 -dbsnmpPassword Welcome01 -asmsnmpPassword Welcome01 -storageType FS -emConfiguration NONE returned 1 instead of one of [0] ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Dbactions[start oraDb]/Db_control[instance control start oraDb]: Dependency Exec[oracle database oraDb] has failures: true ==> dbcdb: Warning: /Stage[main]/Oradb_cdb/Oradb::Dbactions[start oraDb]/Db_control[instance control start oraDb]: Skipping because of failed dependencies ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Autostartdatabase[autostart oracle]/Exec[set dbora cdb:/oracle/product/12.1/db]: Dependency Exec[oracle database oraDb] has failures: true ==> dbcdb: Warning: /Stage[main]/Oradb_cdb/Oradb::Autostartdatabase[autostart oracle]/Exec[set dbora cdb:/oracle/product/12.1/db]: Skipping because of failed dependencies ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database_pluggable[pdb1]/Exec[dbca pdb execute pdb1]: Dependency Exec[oracle database oraDb] has failures: true ==> dbcdb: Warning: /Stage[main]/Oradb_cdb/Oradb::Database_pluggable[pdb1]/Exec[dbca pdb execute pdb1]: Skipping because of failed dependencies ==> dbcdb: Notice: /Stage[main]/Oradb_cdb/Oradb::Database_pluggable[pdb2]/Exec[dbca pdb execute pdb2]: Dependency Exec[oracle database oraDb] has failures: true ==> dbcdb: Warning: /Stage[main]/Oradb_cdb/Oradb::Database_pluggable[pdb2]/Exec[dbca pdb execute pdb2]: Skipping because of failed dependencies ==> dbcdb: Notice: Finished catalog run in 159.95 seconds The SSH command responded with a non-zero exit status. Vagrant assumes that this means the command failed. The output for this command should be in the log above. Please read the output to determine what went wrong.

Any help greatly appreciated, thanks

biemond commented 8 years ago

strange it is working for me.

Did you change something, like memory? also 159 seconds is really fast. and can you check this log /oracle/cfgtoollogs/dbca/cdb/cdb.log

blackbadgerltd commented 8 years ago

Hi, thanks for the quick reply,

The speed is because i ran the oradb_os then snapshotted after the first time the run failed (vagrant snapshot), and just ran it a few more times with the oradb_cdb included.

The log file contains:

Database Configuration Assistant failed to detect options for this Oracle Installation. 
ORA-12547: TNS:lost contact

Due to this failure some Database Configuration Assistant features will not be available. Do you want to continue?

Unique database identifier check passed.

/ has enough space. Required space is 11370 MB , available space is 58674 MB.
File Validations Successful.
Creating and starting Oracle instance
ORA-12547: TNS:lost contact

DBCA_PROGRESS : 1%
DBCA_PROGRESS : 4%
Creating database files
ORA-12547: TNS:lost contact

DBCA_PROGRESS : 8%
Creating data dictionary views
ORA-12547: TNS:lost contact

DBCA_PROGRESS : 9%
Error while executing "/oracle/product/12.1/db/rdbms/admin/catalog.sql". Refer to "/oracle/cfgtoollogs/dbca/cdb/catalog0.log" for more details. Error in Process: /oracle/product/12.1/db/perl/bin/perl
DBCA_PROGRESS : DBCA Operation failed.

And /oracle/product/12.1/db/rdbms/admin/catalog.sql is empty.

Running the command on its own (as output by puppet) generates the same issue.

The listener appear to be running, but any of the ORACLE_* environment variables appear to not be set when logging in as oracle (or anyone else).

'/oracle/product/12.1/db/network/admin/listener.ora '

listener.ora Network Configuration File: /oracle/product/12.1/db/network/admin/listener.ora

Generated by Oracle configuration tools.


LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = dbcdb.example.com)(PORT = 1521))
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
  )

let me know anything else you may need, cheers

rstyczynski commented 8 years ago

I was stopped by the same problem. After running the setup manually, I've found that installation is affected by two issues. One is missing libjavavm12.a file, and another is segmentation fault in perl. Problems seem to be known, and are described here: https://laszlo.co.hu/2015/12/29/install-issue-oracle-12c-grid-on-oracle-linux-7-2/

As I have no idea how to fix it properly, I've added two quite dirty modifications to installdb.pp:

CHANGE#1:

exec { "install oracle database ${title}": command => "/bin/sh -c ' unset DISPLAY; ${download_dir}/${file}/database/runInstaller -silent -waitforcompletion -ignoreSysPrereqs -ignorePrereq -responseFile ${download_dir}/db_install_${version}.rsp; mv ${oracle_home}/javavm/jdk/jdk6/lib/libjavavm12.a /tmp rm -f -R ${oracle_home}/*; mkdir ${oracle_home}/lib; mv /tmp/libjavavm12.a ${oracle_home}/lib; chown oracle ${oracle_home}/lib/libjavavm12.a; rm /oracle/oraInventory/ContentsXML/inventory.xml; ${download_dir}/${file}/database/runInstaller -silent -force -waitforcompletion -ignoreSysPrereqs -ignorePrereq -responseFile ${download_dir}/db_install_${version}.rsp; ' ", creates => "${oracle_home}/dbs", environment => ["USER=${user}","LOGNAME=${user}"], timeout => 0, returns => [6,0], path => $execPath, user => $user, group => $group_install, cwd => $oracle_base, logoutput => true, require => [Oradb::Utils::Dborainst["database orainst ${version}"], File["${download_dir}/db_install_${version}.rsp"]], }

CHANGE#2:

` exec { "recompiling PERL...": command => "/bin/sh -c ' cd ~ rm -rf perl mkdir perl cd perl/ curl -O http://www.cpan.org/src/5.0/perl-5.14.1.tar.gz tar -xvzf perl-5.14.1.tar.gz

cd ${oracle_home} mv perl/ perl.OLD mkdir perl cd /home/oracle/perl/perl-5.14.1 ./Configure -des -Dprefix=${oracle_home}/perl -Doptimize=-O3 -Dusethreads -Duseithreads -Duserelocatableinc ; make clean ; make ; make install cd ${oracle_home}/perl rm -rf lib/ man/ cp -r ../perl.OLD/lib/ . cp -r ../perl.OLD/man/ . cp ../perl.OLD/bin/dbilogstrip bin/ cp ../perl.OLD/bin/dbiprof bin/ cp ../perl.OLD/bin/dbiproxy bin/ cp ../perl.OLD/bin/ora_explain bin/ ' ", environment => ["USER=${user}","LOGNAME=${user}"], timeout => 0, returns => [0], path => $execPath, user => $user, group => $group_install, cwd => $oracle_base, logoutput => false, require => Exec["install oracle database ${title}"], }`

installdb.pp.txt