puppet icon indicating copy to clipboard operation
puppet copied to clipboard

Installing and Oracle Reponse file for 11.2.0.1 has errors

Open michaeljohnbennett opened this issue 11 years ago • 8 comments

Hi there, I have been working on these modules and have had a few issues when trying to use these modules via vagrant.

I am using vagrant 1.5.2

When its trying to copy or unzip the install zip's it gets a fork error out of memory, I'm trying to push to an ubuntu 14.04LTS instance with 2GB ram but I think its ruby running out of memory when it copies, how did you get this to work properly?

So I worked around it and copied the database files manually to the /install folder but I get the following errors when it tries to install:

Debug: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/File[/install/db_install_11.2.0.1.rsp]: The container Oradb::Installdb[112010_Linux-x86-64] will propagate my refresh event
Debug: Execinstall oracle database 112010_Linux-x86-64: Executing '/bin/sh -c 'unset DISPLAY;/install/linux.x64_11gR2_database/database/runInstaller -silent -waitforcompletion -ignoreSysPrereqs -ignorePrereq -responseFile /install/db_install_11.2.0.1.rsp''
Debug: Executing '/bin/sh -c 'unset DISPLAY;/install/linux.x64_11gR2_database/database/runInstaller -silent -waitforcompletion -ignoreSysPrereqs -ignorePrereq -responseFile /install/db_install_11.2.0.1.rsp''
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: Starting Oracle Universal Installer...
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns:
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: Checking Temp space: must be greater than 120 MB. Actual 67819 MB Passed
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: Checking swap space: must be greater than 150 MB. Actual 166 MB Passed
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: Preparing to launch Oracle Universal Installer from /tmp/OraInstall2014-08-19_05-54-56PM. Please wait ...[FATAL] [INS-10105] The given response file /install/db_install_11.2.0.1.rsp is not valid.
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: CAUSE: Syntactically incorrect response file. Either unexpected variables are specified or expected variables are not specified in the response file.
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: ACTION: Refer the latest product specific response file template
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: SUMMARY:
Notice: /Stage[main]/Cpmdb::Installoracle11g/Oradb::Installdb[112010_Linux-x86-64]/Exec[install oracle database 1120 10_Linux-x86-64]/returns: - cvc-complex-type.2.4.a: Invalid content was found starting with element 'oracle.i nstall.db.EEOptionsSelection'. One of '{"":oracle.install.option, "":INVENTORY_LOCATION, "":UNIX_GROUP_NAME, "":orac le.install.db.InstallEdition, "":ORACLE_HOME, "":oracle.install.db.DBA_GROUP, "":oracle.install.db.isCustomInstall, "":oracle.install.db.customComponents, "":oracle.install.db.config.starterdb.SID, "":oracle.install.db.config.starte rdb.memoryLimit, "":oracle.install.db.config.starterdb.enableSecuritySettings, "":oracle.install.db.config.starterdb .password.SYS, "":oracle.install.db.config.starterdb.password.SYSMAN, "":oracle.install.db.config.starterdb.password .SYSTEM, "":oracle.install.db.config.starterdb.automatedBackup.enable, "":oracle.install.db.config.starterdb.automat edBackup.osuid, "":oracle.install.db.config.starterdb.automatedBackup.ospwd, "":DECLINE_SECURITY_UPDATES, "":MYORACL

ESUPPORT_USERNAME, "":MYORACLESUPPORT_PASSWORD, "":PROXY_PORT, "":PROXY_USER}' is expected.

It looks like the response file is missing params or has not got all the params filled in. I just downloaded the files for linux.x64_11gR2_database this morning from OTN.

Has anyone any ideas on how to amend the response file or adjust the way I run the manifest?

My manifest is below which is ostensibly a copy from the readme:

oradb::installdb{ '112010_Linux-x86-64': version => '11.2.0.1', file => "linux.x64_11gR2_database",
databaseType => 'SE', eeOptionsSelection => true, eeOptionalComponents => 'oracle.rdbms.partitioning:11.2.0.1.0', oracleBase => '/oracle', oracleHome => '/oracle/product/11.2/db', createUser => true, user => 'oracle', group => 'dba', group_install => 'oinstall', group_oper => 'oper', downloadDir => '/install', zipExtract => false, }

Thanks in advance

michaeljohnbennett avatar Aug 19 '14 10:08 michaeljohnbennett

Hi,

thanks for reporting this. the 11.2.0.1 rsp errors are fixed in the latest version of oradb

Don't know if this works in ubuntu but maybe you can create a swap file

exec { "create swap file": command => "/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=8192", creates => "/var/swap.1", }

exec { "attach swap file": command => "/sbin/mkswap /var/swap.1 && /sbin/swapon /var/swap.1", require => Exec["create swap file"], unless => "/sbin/swapon -s | grep /var/swap.1", }

#add swap file entry to fstab exec {"add swapfile entry to fstab": command => "/bin/echo >>/etc/fstab /var/swap.1 swap swap defaults 0 0", require => Exec["attach swap file"], user => root, unless => "/bin/grep '^/var/swap.1' /etc/fstab 2>/dev/null", }

biemond avatar Aug 19 '14 11:08 biemond

The new file does help now thanks for that, I had to add a lot of extra pre stuff like setting up swap etc to get it to work better and that has resolved the out of memory errors when unzipping and copying.

However I try to install using this setup on an ubuntu 14.04.1LTS Server and when I start the VM I can't get the tns listener to start. I have the installdb call and it all appears to work properly but when I call lsnrctl it just blanks. Is installing oracle EE on Ubuntu a total no-no? I can get the XE edition working on a 14.04LTS desktop ok.

Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:                     
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Parsing command line arguments:                                                                                                                          
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:     Parameter "silent" = true                                                                                                                            
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:     Parameter "responsefile" = /install/netca_11.2.rsp                                                                                                   
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Done parsing command line arguments.                                                                                                                     
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Oracle Net Services Configuration:                                                                                                                       
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Configuring Listener:LISTENER                                                                                                                            
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Listener configuration complete.                                                                                                                         
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Oracle Net Listener Startup:                                                                                                                             
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:     Running Listener Control:                                                                                                                            
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:       /opt/oracle/product/11.2/db/bin/lsnrctl start LISTENER                                                                                             
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:     Listener Control complete.                                                                                                                           
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns:     Listener started successfully.                                                                                                                       
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Profile configuration complete.                                                                                                                          
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: Oracle Net Services configuration successful. The exit code is 0                                                                                         
Oradb::Net[config net8]/Exec[install oracle net config net8]/returns: executed successfully                                          
.....
Debug: Exec[listener start start listener](provider=posix): Executing check '/bin/ps -ef | grep -v grep | /bin/grep '/opt/oracle/product/11.2/db/bin/tnslsnr''
Debug: Executing '/bin/ps -ef | grep -v grep | /bin/grep '/opt/oracle/product/11.2/db/bin/tnslsnr''                                          
Debug: Exec[listener start start listener](provider=posix): Executing '/opt/oracle/product/11.2/db/bin/lsnrctl start'
Debug: Executing '/opt/oracle/product/11.2/db/bin/lsnrctl start'
Notice: Oradb::Listener[start listener]/Exec[listener start start listener]/returns: executed successfully                                                                                                                                   
Debug: Oradb::Listener[start listener]/Exec[listener start start listener]: The container Oradb::Listener[start listener] will propagate my refresh event                                                                                    
Debug: Oradb::Listener[start listener]: The container Class[Cpmdb::Installoracle11g] will propagate my refresh event                         
Debug: Exec[install oracle database cpmdb_create](provider=posix): Executing 'dbca -silent -responseFile /install/database_cpmdb_create.rsp'                                                                                                                                      
Debug: Executing 'dbca -silent -responseFile /install/database_cpmdb_create.rsp'                                                             
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: Copying database files                                                                                                                             
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: 1% complete                                                                                                                                        
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: Creating and starting Oracle instance                                                                                                              
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: Completing Database Creation                                                                                                                       
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: Completing Database Creation                                                                                                                       
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: 100% complete                                                                                                                                      
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: Look at the log file "/opt/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.                                                             
Notice: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]/returns: executed successfully                                                                                                                              
Debug: Oradb::Database[cpmdb_create]/Exec[install oracle database cpmdb_create]: The container Oradb::Database[cpmdb_create] will propagate my refresh event                                                                                 
Debug: Oradb::Database[cpmdb_create]: The container Class[Cpmdb::Installoracle11g] will propagate my refresh event                           
Debug: Exec[start oracle database start cpmdb](provider=posix): Executing check '/bin/ps -ef | grep -v grep | /bin/grep 'ora_smon_orcl''                                                                                                                                          
Debug: Executing '/bin/ps -ef | grep -v grep | /bin/grep 'ora_smon_orcl''                                                                    
Debug: Exec[start oracle database start cpmdb](provider=posix): Executing 'sqlplus /nolog <<-EOF                                             
connect / as sysdba                                                                                                                          
startup                                                                                                                                      
EOF'                                                                                                                                         
Debug: Executing 'sqlplus /nolog <<-EOF                                                                                                      
connect / as sysdba                                                                                                                          
startup                                                                                                                                      
EOF'                                                                                                                                         
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns:
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: SQL*Plus: Release 11.2.0.1.0 Production on Thu Aug 21 07:12:51 2014                                                                                   
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns:                  
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: Copyright (c) 1982, 2009, Oracle.  All rights reserved.                                                                                               
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns:                  
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: SQL> ERROR:                                                                                                                                           
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: ORA-12547: TNS:lost contact                                                                                                                           
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns:                  
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: SQL> ORA-12547: TNS:lost contact                                                                                                                      
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: SQL>        
Notice: Oradb::Dbactions[start cpmdb]/Exec[start oracle database start cpmdb]/returns: executed successfully

Thanks again for the quick reply, I have been trying to fix it unsuccessfully for the last few days now!

michaeljohnbennett avatar Aug 21 '14 08:08 michaeljohnbennett

Strange

Did you install the required packages , set ulimits and kernel parameters ( described in the oradb readme.md ), disable iptables and SElinux

maybe you try oracle 11.2.0.4 from edelivery or 12.1.0.1 from OTN because 11.2.0.1 is getting old( I heard others who had the same listener issue with 11.2.0.1) and you got a brand new OS

Thanks

biemond avatar Aug 21 '14 08:08 biemond

I don't know how to disable the iptables or SElinux elements

I'll try with 12.1.0.1 from.

I have the following two files made up to do the pre-config

class oradb::preparation{
  package {
    ["dos2unix"
    ,'alien'
    ,'autoconf'
    ,'automake'
    ,'autotools-dev'
    ,'binutils'
    ,'bzip2'
    ,'doxygen'
    ,'elfutils'
    ,'expat'
    ,'gawk'
    ,'gcc'
    ,'gcc-multilib'
    ,'g++-multilib'
    ,'ksh'
    ,'less'
    ,'lib32z1'
    ,'libaio1'
    ,'libaio-dev'
    ,'libc6-dev'
    ,'libc6-dev-i386'
    ,'libc6-i386'
    ,'libelf-dev'
    ,'libltdl-dev'
    ,'libmotif4'
    ,'libodbcinstq4-1'
    ,'libodbcinstq4-1:i386'
    ,'libpth-dev'
    ,'libpthread-stubs0-dev'
    ,'libstdc++5'
    ,'libstdc++5:i386'
    ,'lsb-cxx'
    ,'make'
    ,'openssh-server'
    ,'pdksh'
    ,'rlwrap'
    ,'rpm'
    ,'sysstat'
    ,'unixodbc'
    ,'unixodbc-dev'
    ,'unzip'
    ,'x11-utils'
    ,'zlibc']:
      ensure => installed;
  }
  ->
    exec { 'preparation output':
      path      => '/bin',
      command   => 'echo packages done!',
      logoutput => true,
    }

  exec {
    "create swapfile":
      # Needs to be 2 times the memory
      command => "/bin/dd if=/dev/zero of=/swapfile bs=1M count=4096",
      user => root,
      creates => "/swapfile";
    "set up swapfile":
      command => "/sbin/mkswap /swapfile",
      require => Exec["create swapfile"],
      user => root,
      unless => "/usr/bin/file /swapfile | grep 'swap file' 2>/dev/null";
    "enable swapfile":
      command => "/sbin/swapon /swapfile",
      require => Exec["set up swapfile"],
      user => root,
      unless => "/bin/cat /proc/swaps | grep '^/swapfile' 2>/dev/null";
    "add swapfile entry to fstab":
      command => "/bin/echo >>/etc/fstab /swapfile swap swap defaults 0 0",
      user => root,
      unless => "/bin/grep '^/swapfile' /etc/fstab 2>/dev/null";
  }    ->
    exec { 'swapfile output':
      path      => '/bin',
      command   => 'echo swapfile done!',
      logoutput => true,
    }

  file {
    "/swapfile":
      mode => 600,
      owner => root,
      group => root,
      require => Exec['create swapfile'];
  }

  #setup kernel params
  sysctl { 'kernel.msgmnb':                 ensure => 'present', permanent => 'yes', value => '65536',}
  sysctl { 'kernel.msgmax':                 ensure => 'present', permanent => 'yes', value => '65536',}
  sysctl { 'kernel.shmmax':                 ensure => 'present', permanent => 'yes', value => '2588483584',}
  sysctl { 'kernel.shmall':                 ensure => 'present', permanent => 'yes', value => '2097152',}
  sysctl { 'fs.file-max':                   ensure => 'present', permanent => 'yes', value => '6815744',}
  sysctl { 'net.ipv4.tcp_keepalive_time':   ensure => 'present', permanent => 'yes', value => '1800',}
  sysctl { 'net.ipv4.tcp_keepalive_intvl':  ensure => 'present', permanent => 'yes', value => '30',}
  sysctl { 'net.ipv4.tcp_keepalive_probes': ensure => 'present', permanent => 'yes', value => '5',}
  sysctl { 'net.ipv4.tcp_fin_timeout':      ensure => 'present', permanent => 'yes', value => '30',}
  sysctl { 'kernel.shmmni':                 ensure => 'present', permanent => 'yes', value => '4096', }
  sysctl { 'fs.aio-max-nr':                 ensure => 'present', permanent => 'yes', value => '1048576',}
  sysctl { 'kernel.sem':                    ensure => 'present', permanent => 'yes', value => '250 32000 100 128',}
  sysctl { 'net.ipv4.ip_local_port_range':  ensure => 'present', permanent => 'yes', value => '9000 65500',}
  sysctl { 'net.core.rmem_default':         ensure => 'present', permanent => 'yes', value => '262144',}
  sysctl { 'net.core.rmem_max':             ensure => 'present', permanent => 'yes', value => '4194304', }
  sysctl { 'net.core.wmem_default':         ensure => 'present', permanent => 'yes', value => '262144',}
  sysctl { 'net.core.wmem_max':             ensure => 'present', permanent => 'yes', value => '1048576',}
 }

and then I have this:

class oradb::fixlinkproblem{
    exec{"fix link problem step 1":
        command => "/bin/ln -s /usr/lib/x86_64-linux-gnu /usr/lib64",
        creates => "/usr/lib64/x86_64-linux-gnu";

        "fix link problem step 2":
        command => "/bin/ln -sf /bin/bash /bin/sh";

        "fix link problem step 3":
        command => "/bin/ln -s /usr/bin/awk /bin/awk",
        creates => "/bin/awk";

        "fix link problem step 4":
        command => "/bin/ln -s /usr/bin/rpm /bin/rpm",
        creates => "/bin/rpm";

        "fix link problem step 5":
        command => "/bin/ln -s /usr/bin/basename /bin/basename",
        creates => "/bin/basename";

        "fix link problem step 6":
        command => "/bin/ln -s /lib/x86_64-linux-gnu/libgcc_s.so.1 .",
        creates => "/lib64/libgcc_s.so.1",
        cwd => "/lib64";
    }
}

Where or how do I disable the other elements?

Do you know a stable Ubuntu version 12/13 that I could get 11.2.0.1 on if this doesn't work?

michaeljohnbennett avatar Aug 21 '14 08:08 michaeljohnbennett

and then in my main class I have this as its dependant on the oracle user being created:

class { 'limits':
     config => {
                '*'       => { 'nofile'  => { soft => '2048'   , hard => '8192',   },},
                'oracle'  => { 'nofile'  => { soft => '65536'  , hard => '65536',  },
                                'nproc'  => { soft => '2048'   , hard => '16384',  },
                                'stack'  => { soft => '10240'  ,},},
                },
     use_hiera => false,
     require                    => Oradb::Installdb['112010_Linux-x86-64']
   }

michaeljohnbennett avatar Aug 21 '14 08:08 michaeljohnbennett

When I look at this https://community.oracle.com/thread/2461988?tstart=0 you also need to do many fixes in the mk files which is hard to automate. In the end it is not supported by Oracle and probably you will get a lot of issues

biemond avatar Aug 21 '14 08:08 biemond

yeah that looks terrible... What would be the best platform/OS to build this on then? Oracle Linux or RedHat for Oracle 11.1.0.1 or 12.1.0.1?

michaeljohnbennett avatar Aug 21 '14 08:08 michaeljohnbennett

Just use CentOS 6.5 ( its opensource) or Oracle Linux 6.5 or RedHat6.5 probably fedora will also work

biemond avatar Aug 21 '14 08:08 biemond