biemond / puppet

Puppet modules
Other
59 stars 64 forks source link

Problems with wls module #6

Closed josepedrocorreia closed 10 years ago

josepedrocorreia commented 11 years ago

Hi,

I'm trying to use Vagrant to set up a machine with JRockit and Web Logic Server up and running. Vagrant allows provisioning using Puppet, which I'm trying to do using your Puppet modules. The jrockit module is working fine, but I'm having problems with the wls module.

Here's my Puppet manifest file:

node default {

    include jrockit

    jrockit::installrockit {'jrockit-1.6.0_37':
        downloadDir   => '/tmp/',
        version       => '1.6.0_37-R28.2.5-4.1.0',
        x64           => 'true',
    }

    import 'wls-sysctl.pp'

    include wls

    wls::installwls {'wls1036':
        downloadDir            => '/tmp/',
        version                => '1036',
        fullJDKName            => 'jdk1.6.0_37',
        oracleHome             => '/opt/Oracle',
        mdwHome                => '/opt/Oracle/Middleware',
    }

}

The wls-sysctl.pp file contains the sysctl setup you advise in the README (is it necessary BTW, or just advised?)

Here's the vagrant log:

Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'ubuntu-12.04.2-x64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Creating shared folders metadata...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 7001 => 7001 (adapter 1)
[default] -- 7002 => 7002 (adapter 1)
[default] Booting VM...
[default] Waiting for VM to boot. This can take a few minutes.
[default] VM booted and ready for use!
[default] Configuring and enabling network interfaces...
[default] Mounting shared folders...
[default] -- /data
[default] -- /vagrant
[default] -- /projects
[default] -- /tmp/vagrant-puppet/manifests
[default] -- /tmp/vagrant-puppet/modules-0
[default] Running provisioner: shell...
[default] Running: inline script
stdin: is not a tty
Notice: Preparing to install into /etc/puppet/modules ...

Notice: Created target directory /etc/puppet/modules

Notice: Downloading from https://forge.puppetlabs.com ...

Notice: Installing -- do not interrupt ...

/etc/puppet/modules
└── fiddyspence-sysctl (v0.0.5)
[default] Running provisioner: puppet...
Running Puppet with default.pp...
stdin: is not a tty
Info: Loading facts in /tmp/vagrant-puppet/modules-0/wls/lib/facter/oracle_middleware_homes.rb
Info: Loading facts in /tmp/vagrant-puppet/modules-0/wls/lib/facter/oracle_middleware_homes.rb
Info: Applying configuration version '1372669970'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_fin_timeout]/value: value changed '60' to '30'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_fin_timeout]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[fs.file-max]/value: value changed '48051' to '344030'
Notice: /Stage[main]//Sysctl[fs.file-max]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[kernel.msgmnb]/value: value changed '16384' to '65536'
Notice: /Stage[main]//Sysctl[kernel.msgmnb]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[kernel.shmall]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_keepalive_intvl]/value: value changed '75' to '30'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_keepalive_intvl]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[kernel.shmmax]/value: value changed '33554432' to '2147483648'
Notice: /Stage[main]//Sysctl[kernel.shmmax]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_keepalive_time]/value: value changed '7200' to '1800'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_keepalive_time]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[kernel.msgmax]/value: value changed '8192' to '65536'
Notice: /Stage[main]//Sysctl[kernel.msgmax]/permanent: permanent changed 'no' to 'yes'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_keepalive_probes]/value: value changed '9' to '5'
Notice: /Stage[main]//Sysctl[net.ipv4.tcp_keepalive_probes]/permanent: permanent changed 'no' to 'yes'
Notice: installrockit.pp jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Notify[installrockit.pp jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/message: defined 'message' as 'installrockit.pp jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0'
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/File[/tmp/]/mode: mode changed '1777' to '0777'
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/File[/tmp/jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin]/ensure: defined content as '{md5}07cdb8b85f5393378511c5e1aa1bef35'
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/File[silent.xml ]/ensure: created
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[installjrockit]/returns: Extracting 0%....................................................................................................100%
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[installjrockit]/returns: Unable to get term attrs
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[installjrockit]/returns: Unable to get term attrs
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[installjrockit]/returns: executed successfully
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/File[/usr/java/latest]/ensure: created
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/File[/usr/java/default]/ensure: created
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[install alternatives]/returns: update-alternatives: using /usr/java/jrockit-jdk1.6.0_37-R28.2.5-4.1.0/bin/java to provide /usr/bin/java (java) in auto mode.
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[install alternatives]/returns: executed successfully
Notice: /Stage[main]//Node[default]/Jrockit::Installrockit[jrockit-1.6.0_37]/Javaexec[jdkexec jrockit-1.6.0_37 1.6.0_37-R28.2.5-4.1.0]/Exec[default alternatives]/returns: executed successfully
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/Group[dba]/ensure: created
Notice: /User[oracle]/ensure: created
Error: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/File[wls.jar 1036]: Could not evaluate: Puppet::Util::Log requires a message
Notice: wls::installwls wls1036 /opt/Oracle/Middleware does not exists
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/Notify[wls::installwls wls1036 /opt/Oracle/Middleware does not exists]/message: defined 'message' as 'wls::installwls wls1036 /opt/Oracle/Middleware does not exists'
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/Exec[create ${oracleHome} directory]/returns: executed successfully
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/File[/opt/Oracle]/owner: owner changed 'root' to 'oracle'
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/File[/opt/Oracle]/mode: mode changed '0755' to '0775'
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/File[/opt/Oracle/Middleware]/ensure: created
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/File[silent.xml 1036]/ensure: created
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/Wls::Wlsexec[installer 1036]/Exec[installwls /tmp//wls1036_generic.jar]: Dependency File[wls.jar 1036] has failures: true
Warning: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/Wls::Wlsexec[installer 1036]/Exec[installwls /tmp//wls1036_generic.jar]: Skipping because of failed dependencies
Notice: wls::installwls 1036
Notice: /Stage[main]//Node[default]/Wls::Installwls[wls1036]/Notify[wls::installwls 1036]/message: defined 'message' as 'wls::installwls 1036'
Info: Creating state file /var/lib/puppet/state/state.yaml
Notice: Finished catalog run in 52.01 seconds

It looks to me like the problem is that the WLS installation file is not being properly copied somehow. Here are the contents of my /tmp/ folder:

total 127416
drwxrwxrwx  4 root    root         4096 Jul  1 09:17 .
drwxr-xr-x 26 root    root         4096 Jul  1 09:12 ..
drwxr-xr-x  2 root    root         4096 Jul  1 09:13 hsperfdata_root
-rwxrwxrwx  1 vagrant vagrant 130439896 Jul  1 09:12 jrockit-jdk1.6.0_37-R28.2.5-4.1.0-linux-x64.bin
-rwxrwxr-x  1 oracle  dba           183 Jul  1 09:13 silent1036.xml
-rw-r--r--  1 root    root          480 Jul  1 09:12 silent.xml
drwxr-xr-x  4 root    root         4096 Jul  1 09:12 vagrant-puppet
-rwx--x--x  1 vagrant vagrant        43 Jul  1 09:12 vagrant-shell
-rwxrwxr-x  1 root    root            0 Jul  1 09:13 wls1036_generic.jar.puppettmp_3130

As you can see the wls1036_generic.jar file is empty and has some temporary extension. Any clue what might be going wrong here?

josepedrocorreia commented 11 years ago

I can confirm the problem is related to copying of the file. I made a change in your module to use a symlink rather than making a copy (I have the installer in a network drive that I mount in the Vagrant machine) and that seems to work fine.

Maybe this should also be added as an option, since there is no real need to copy the file if you have it in a common folder, and it is about 1GB large.

biemond commented 11 years ago

Hi,

Can you use this puppetDownloadMntPoint parameter and point this to the folder of the wls jar and this should copy this to /tmp else default it will look at the files folder of the wls module or you can add an location entry to fileserver.conf of the master puppet configuration

  wls::installwls {'wls1036':
    downloadDir            => '/tmp/',
    version                => '1036',
    fullJDKName            => 'jdk1.6.0_37',
    oracleHome             => '/opt/Oracle',
    mdwHome                => '/opt/Oracle/Middleware',
    puppetDownloadMntPoint => "/mnt"
  }

I use this in a masterless configuration.

Thanks

josepedrocorreia commented 11 years ago

Hi,

Both options (with puppetDownloadMntPoint and without) are giving me the same error. Both cases copy the installer to /tmp, just from different sources. What I was suggesting (and am using now) is to link the installer in /tmp rather than making any copy. This works for me.

Could the problem be arising because the copying of the file takes too long? (It's 1GB) Is there any timeout for puppet operations of something like that?

Cheers

biemond commented 11 years ago

Hi,

The only thing I can think of that I use puppet enterprise and this uses passenger which can better handle downloads, are you using puppet opensource and what is the puppet version you are using. Can you use the latest installwls manifest of the wls module and use /tmp ( not /tmp/ ) as downloaddir parameter.

Thanks

josepedrocorreia commented 11 years ago

I'm using the free version of Puppet indeed. Well, at least you know there might be a problem with this.

My installwls manifest is from June 27, so I think it's up to date. Regarding the downloadDir parameter, I tried both but still no luck.

biemond commented 11 years ago

Ok thanks,

last weekend I made some changes to support puppet 3.0 but I will also check the latest opensource puppet edition.

bbolli commented 10 years ago

Is there enough space on your /tmp filesystem? Maybe that's why the copy fails.

jarrodhroberson commented 10 years ago

I am having a problem as well trying to get these modules to run under Vagrant. I can get the first module to install fine by itself.

When I add the include wls and below, it kicks off in the middle of the installation of the jdk7 and corrupts the entire run?

I am trying to install into SLES 11 SP3 x64 if it matters.

include jdk7

jdk7::install7 { 'jdk1.7.0_40':
    version              => "7u40", 
    fullVersion          => "jdk1.7.0_40",
    alternativesPriority => 18000, 
    x64                  => true,
    downloadDir          => "/install/jdk7",
    urandomJavaFix       => false,
    sourcePath           => "puppet:///modules/jdk7/"
}

include wls

wls::installwls { 'wls1036':
    downloadDir            => '/install/wls',
    version                => '1036',
    fullJDKName            => 'jdk1.7.0_40',
    oracleHome             => '/opt/Oracle',
    mdwHome                => '/opt/Oracle/Middleware',
}

This is the output I get when I only run the include jdk7 stanza, as soon as I try and put the include wls back in it corrupts the run.

Notice: /Stage[main]//Node[default]/Jdk7::Install7[jdk1.7.0_40]/Javaexec[jdkexec jdk1.7.0_40 7u40]/Exec[default java alternatives jdk1.7.0_40]/returns: executed successfully
Notice: Finished catalog run in 29.21 seconds

And this is what I get by running the include wls separately after the include jdk7 installs successfully.

Notice: /Stage[main]//Wls::Installwls[wls1036]/Exec[installwls /install/wls/wls1036_generic.jar]/returns: executed successfully
Notice: Finished catalog run in 220.93 seconds

I really would like to get this automated and working so I can upgrade when I need to without having to repackage my virtual machine from the ground up.

biemond commented 10 years ago

hi,

you can add a require in wls install which points to jdk . can you look at example step 3 in the root of the wls module of my puppet github repos.

and please use the github puppet modules and not from force. ( github is the latest )

thanks

jarrodhroberson commented 10 years ago

Thanks for the quick response, I am using the github repo modules. I am trying to adapt that example to 1036 but not having much rapid progress.

I am struggling with getting the domain configured now.

biemond commented 10 years ago

Great,

here some more info for vagrant and weblogic. https://github.com/biemond/biemond-wls/issues/1

what do you want for template? , I can make a custom demo file for you in a few minutes.

Thanks

jarrodhroberson commented 10 years ago

I have gotten past those issues, now I am fighting with getting JDBC Connections set up programmatically. I have been trying to find the error for about 4 hours now.

vagrant@sles11sp3x64:/install> sudo puppet apply --modulepath '/tmp/vagrant-puppet/modules-0' --manifestdir /tmp/vagrant-puppet/manifests --detailed-exitcodes /tmp/vagrant-puppet/manifests/sles_11_sp3_x64.pp Notice: Compiled catalog for sles11sp3x64.rwe.nam.gm.com in environment production in 0.75 seconds Error: java -Dweblogic.security.SSL.ignoreHostnameVerification=true weblogic.WLST -skipWLSModuleScanning /install/gmomog11createJdbcDatasource.py returned 1 instead of one of [0] Error: /Stage[main]/Database_connections/Wls::Wlstexec[gmomog11]/Exec[execwlst gmomog11createJdbcDatasource.py]/returns: change from notrun to 0 failed: java -Dweblogic.security.SSL.ignoreHostnameVeri fication=true weblogic.WLST -skipWLSModuleScanning /install/gmomog11createJdbcDatasource.py returned 1 instead of one of [0] Notice: /Stage[main]/Database_connections/Wls::Wlstexec[gmomog11]/Exec[rm /install/gmomog11createJdbcDatasource.py]: Dependency Exec[execwlst gmomog11createJdbcDatasource.py] has failures: true Warning: /Stage[main]/Database_connections/Wls::Wlstexec[gmomog11]/Exec[rm /install/gmomog11createJdbcDatasource.py]: Skipping because of failed dependencies Notice: Finished catalog run in 11.34 seconds

Here is the contents of the /install/gmomog11createJdbcDatasource.py

wlsUser = 'weblogic' password = 'weblogic1' machine = 'localhost' portNumber = '7001'

dsName, jdbcDatasourceTargets,

dsJNDIName,dsDriverName,dsURL,dsUserName,dsPassword,datasourceTargetType,globalTransactionsProtocol

dsName = 'gmomm011'

jdbcDatasourceTargets = 'AdminServer'

dsJNDIName = 'jdbc/gmomm011'

dsDriverName = 'oracle.jdbc.xa.client.OracleXADataSource'

dsURL = 'jdbc:oracle:thin:@dbagent1.alfa.local:1521/ test.oracle.com'

dsUserName = 'ordermp'

dsPassword = 'stupid01'

datasourceTargetType = 'Server'

globalTransactionsProtocol = 'xxxx'

useStoreConfig = 'false'

if useStoreConfig != "true": connect(wlsUser,password,'t3://'+machine+':'+portNumber) else: connect(userConfigFile='', userKeyFile='', url='t3://'+machine+':'+portNumber)

print "datasource " +dsName

datasourceTargets=String(jdbcDatasourceTargets).split(",")

for datasourceTarget in datasourceTargets: print "Datasource Target",datasourceTarget

print "dsJNDIName " +dsJNDIName print "dsDriverName " +dsDriverName print "dsUserName " +dsUserName

edit() startEdit()

try: cd('/') cmo.createJDBCSystemResource(dsName) cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName) cmo.setName(dsName)

  cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +

'/JDBCDataSourceParams/' + dsName ) set('JNDINames',jarray.array([String('jdbc/' + dsName )], String))

  cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +

'/JDBCDriverParams/' + dsName ) cmo.setUrl(dsURL) cmo.setDriverName( dsDriverName ) cmo.setPassword(dsPassword)

  cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +

'/JDBCConnectionPoolParams/' + dsName ) cmo.setTestTableName('SQL SELECT 1 FROM DUAL') cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName + '/JDBCDriverParams/' + dsName + '/Properties/' + dsName ) cmo.createProperty('user')

  cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +

'/JDBCDriverParams/' + dsName + '/Properties/' + dsName + '/Properties/user') cmo.setValue(dsUserName)

  if globalTransactionsProtocol != "xxxx":
      cd('/JDBCSystemResources/' + dsName + '/JDBCResource/' + dsName +

'/JDBCDataSourceParams/' + dsName) cmo.setGlobalTransactionsProtocol('None')

  cd('/SystemResources/' + dsName )
  targetList = []
  for datasourceTarget in datasourceTargets:
    targetList.append( ObjectName('com.bea:Name=' + datasourceTarget +

',Type='+datasourceTargetType) )

  set('Targets',jarray.array(targetList, ObjectName))

  save()
  activate()

except: print "Unexpected error:", sys.exc_info()[0]

Jarrod Roberson 678.551.2852

biemond commented 10 years ago

Hi,

I don't see an error, can you ping and connect to the dbagent1.alfa.local server

and can you set logOuput parameter on the wlst manifest to true or manually execute this script with common/bin/wlst.sh datasourceScript

or try to create it manually in the weblogic console

Thanks

jarrodhroberson commented 10 years ago

What if I am just trying to configure the connection pools and I don't actually have connectivity yet?

On Fri, Oct 11, 2013 at 4:36 PM, Edwin Biemond notifications@github.comwrote:

Hi,

I don't see an error, can you ping and connect to the dbagent1.alfa.local server

and can you set logOuput parameter on the wlst manifest to true or manually execute this script with common/bin/wlst.sh datasourceScript

or try to create it manually in the weblogic console

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/biemond/puppet/issues/6#issuecomment-26170547 .

Jarrod Roberson 678.551.2852

biemond commented 10 years ago

ok

that explains , your py script looks ok

jarrodhroberson commented 10 years ago

Using your "example 3" template I have everything working except starting up the AdminServer so I can add datasources from Puppet. Modified to install WLS 10.3.6 instead of 12x

I am getting

Stderr from the command:

Error: java -Dweblogic.security.SSL.ignoreHostnameVerification=true weblogic.WLST -skipWLSModuleScanning /data/install/startWLSAdminServer12cstartWlsServer2.py weblogic1 returned 1 instead of one of [0] Error: /Stage[main]/Wls12c_domain_5/Wls::Wlscontrol[startWLSAdminServer12c]/Exec[execwlst startWLSAdminServer12cstartWlsServer2.py ]/returns: change from notrun to 0 failed: java -Dweblogic.security.S SL.ignoreHostnameVerification=true weblogic.WLST -skipWLSModuleScanning /data/install/startWLSAdminServer12cstartWlsServer2.py weblogic1 returned 1 instead of one of [0] Warning: /Stage[main]/Wls12c_domain_5/Orautils::Nodemanagerautostart[autostart gbrd]/File[/etc/init.d/]: Ensure set to :present but file type is directory so no content will be synced Warning: /Stage[main]/Maintenance_5/Cron[mdwlogs]: Skipping because of failed dependencies Warning: /Stage[main]/Maintenance_5/Cron[cleanwlstmp]: Skipping because of failed dependencies

I tried running this manually and it fails as well.

What do I have to do to get my AdminServer up and running from the puppet manifest?

attached is my manifest file

On Fri, Oct 11, 2013 at 4:36 PM, Edwin Biemond notifications@github.comwrote:

Hi,

I don't see an error, can you ping and connect to the dbagent1.alfa.local server

and can you set logOuput parameter on the wlst manifest to true or manually execute this script with common/bin/wlst.sh datasourceScript

or try to create it manually in the weblogic console

Thanks

— Reply to this email directly or view it on GitHubhttps://github.com/biemond/puppet/issues/6#issuecomment-26170547 .

Jarrod Roberson 678.551.2852

biemond commented 10 years ago

Hi,

I can't see your file but for starting the adminserver I will connect to the nodemanager
there is a difference between 12c and 10.3.6 , with 12c ( you used this template) you need to start the nodemanager after the domain creation and is part of the domain , in 10.3.6 it is part of the middleware home, so after the weblogic and patching install you must start the nodemanager, then create domain and startup admin which connect to the nodemanager

so please lookat the readme.md ( class wls1036osb_soa and wls_osb_soa_domain optionally remove the bsu, osb and soa part ) or example conf 2 cluster , that are the right steps.

set the defaults

Wls::Installwls { version => $wls11gVersion, fullJDKName => $jdkWls11gJDK, oracleHome => $osOracleHome, mdwHome => $osMdwHome, user => $user, group => $group,
downloadDir => $downloadDir, puppetDownloadMntPoint => $puppetDownloadMntPoint, }

Wls::Nodemanager { wlHome => $osWlHome, fullJDKName => $jdkWls11gJDK,
user => $user, group => $group, serviceName => $serviceName,
downloadDir => $downloadDir, }

Wls::Bsupatch { mdwHome => $osMdwHome, wlHome => $osWlHome, fullJDKName => $jdkWls11gJDK, user => $user, group => $group, downloadDir => $downloadDir, puppetDownloadMntPoint => $puppetDownloadMntPoint, }

install

wls::installwls{'11gPS5':}

weblogic patch 10.3.6.0.5

wls::bsupatch{'p16619891': patchId => 'L51R',
patchFile => 'p16619891_1036_Generic.zip',
require => Wls::Installwls['11gPS5'], }

nodemanager configuration and starting

wls::nodemanager{'nodemanager11g': listenPort => '5556', logDir => $logsDir, require => Wls::Bsupatch['p16619891'], }

jarrodhroberson commented 10 years ago

I have gotten to the where I try and start the nodemanager and the admin server and no matter what I do i get the following errors.

Seems the nodemanager just doesn't start.

if I do /opt/Oracle/Middleware/wlserver10.3/server/bin/startNodeManager.sh manually it works fine.

I can start the AdminServer from the domain bin/startWeblogic.sh just fine.

I can't get the puppet stuff to act right ...

Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/File[/data/install//startAdminServerstartWlsServer2.py]/ensure: created Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Initializing WebLogic Scripting Tool (WLST) ... Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Welcome to WebLogic Server Administration Scripting Shell Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Type help() for help on available commands Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Connecting to Node Manager ... Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: <Oct 16, 2013 5:59:34 PM EDT>

Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: This Exception occurred at Wed Oct 16 17:59:44 EDT 2013. Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: weblogic.nodemanager.NMConnectException: Connection refused. Could not connect to NodeManager. Check that it is running at localhost:7001. Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Problem invoking WLST - Traceback (innermost last): Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: File "/data/install/startAdminServerstartWlsServer2.py", line 12, in ? Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: File "", line 123, in nmConnect Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: File "", line 648, in raiseWLSTException Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: WLSTException: Error occured while performing nmConnect : Cannot connect to Node Manager. : Connection refused. Could not connect to NodeManager. Check that it is running at localhost:7001. Notice: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: Use dumpStack() to view the full stacktrace Notice: Finished catalog run in 278.05 seconds Stderr from the command: Error: java -Dweblogic.security.SSL.ignoreHostnameVerification=true weblogic.WLST -skipWLSModuleScanning /data/install//startAdminServerstartWlsServer2.py weblogic1 returned 1 instead of one of [0] Error: /Stage[main]/Wls1036/Wls::Wlscontrol[startAdminServer]/Exec[execwlst startAdminServerstartWlsServer2.py ]/returns: change from notrun to 0 failed: java -Dweblogic.security.SSL.ignoreHostnameVerification=true weblogic.WLST -skipWLSModuleScanning /data/install//startAdminServerstartWlsServer2.py weblogic1 returned 1 instead of one of [0] On Tue, Oct 15, 2013 at 4:45 PM, Edwin Biemond notifications@github.comwrote: > Hi, > > I can't see your file but for starting the adminserver I will connect to > the nodemanager > > there is a difference between 12c and 10.3.6 , with 12c ( you used this > template) you need to start the nodemanager after the domain creation and > is part of the domain , in 10.3.6 it is part of the middleware home, so > after the weblogic and patching install you must start the nodemanager, > then create domain and startup admin which connect to the nodemanager > > so please lookat the readme.md ( class wls1036osb_soa and > wls_osb_soa_domain optionally remove the bsu, osb and soa part ) or example > conf 2 cluster , that are the right steps. > > # set the defaults > > Wls::Installwls { > version => $wls11gVersion, > fullJDKName => $jdkWls11gJDK, > oracleHome => $osOracleHome, > mdwHome => $osMdwHome, > user => $user, > group => $group, > > downloadDir => $downloadDir, > puppetDownloadMntPoint => $puppetDownloadMntPoint, > } > > Wls::Nodemanager { > wlHome => $osWlHome, > fullJDKName => $jdkWls11gJDK, > > user => $user, > group => $group, > serviceName => $serviceName, > > downloadDir => $downloadDir, > } > > Wls::Bsupatch { > mdwHome => $osMdwHome, > wlHome => $osWlHome, > fullJDKName => $jdkWls11gJDK, > user => $user, > group => $group, > downloadDir => $downloadDir, > puppetDownloadMntPoint => $puppetDownloadMntPoint, > } > > # install > > wls::installwls{'11gPS5':} > > # weblogic patch 10.3.6.0.5 > > wls::bsupatch{'p16619891': > patchId => 'L51R', > > patchFile => 'p16619891_1036_Generic.zip', > > require => Wls::Installwls['11gPS5'], > } > > #nodemanager configuration and starting > wls::nodemanager{'nodemanager11g': > listenPort => '5556', > logDir => $logsDir, > require => Wls::Bsupatch['p16619891'], > } > > — > Reply to this email directly or view it on GitHubhttps://github.com/biemond/puppet/issues/6#issuecomment-26370595 > . ## Jarrod Roberson 678.551.2852
biemond commented 10 years ago

Hi,

weblogic.nodemanager.NMConnectException: Connection refused. Could not connect to NodeManager. Check that it is running at localhost:7001.

Or the nodemanager is not started or you are not connecting to port 5556

Ok can you paste your class configuration and paste this startAdminServerstartWlsServer2.py script

this is my start script [root@devagent30 install]# cat startOSBSOAAdminServerstartWlsServer2.py

python script wls:wlscontrol

wlsUser    = 'weblogic' 
password   = sys.argv[1]
machine    = 'localhost'
portNumber = '5556'   <----- nodemanager

domain     = 'osbSoaDomain'   <-- my domain
domainPath = '/opt/oracle/wls/Middleware11gR1/user_projects/domains/osbSoaDomain' <-- full domain path
wlsServer  = 'AdminServer'   <-- mine adminserver name

nmConnect(wlsUser,password,machine,portNumber,domain,domainPath,'ssl')

#start the WlsServer
nmStart(wlsServer)

#Ask the status of the WlsServer
nmServerStatus(wlsServer)

#disconnect from the nodemanager
nmDisconnect()
jarrodhroberson commented 10 years ago

Thanks so much for the help, I finally have gotten things installing like I need them.

I will be sending you some pull requests when I get things tidied up a little more, mostly around creating JDBC connections to things other than Oracle.

That said, the one thing I can't get to work is the orautils:nodemanagerautostart

I am trying to pass in osDomain and it just ignores what I trying to send it.

I hope I don't have to directly edit the params.pp file?

Here is the snippet from my site.pp file:

orautils::parms { osDomain => 'naowb', }

orautils::nodemanagerautostart{"autostart weblogic 1036": version => "1036", wlHome => '/opt/Oracle/Middleware/wlserver_10.3', user => 'weblogic', domain => 'naowb', }

no matter what I set osDomain to, the startWeblogicAdmin.sh and stopWeblogicAdmin.sh end up with osDomain= as the value, and the osDomainPath is incorrect as well.

Any advice?

On Thu, Oct 10, 2013 at 2:47 PM, Edwin Biemond notifications@github.comwrote:

hi,

you can add a require in wls install which points to jdk . can you look at example step 3 in the root of the wls module of my puppet github repos.

and please use the github puppet modules and not from force. ( github is the latest )

thanks

— Reply to this email directly or view it on GitHubhttps://github.com/biemond/puppet/issues/6#issuecomment-26080220 .

Jarrod Roberson 678.551.2852

biemond commented 10 years ago

Hi,

first

can you use this ( there is a difference between FMW 11g = 1111, nodemgr part of mdw home and FMW 12c = 1212, part of the domain ) so with version 1111 , no need for domain name etc.

   orautils::nodemanagerautostart{"autostart weblogic 11g":
      version    => "1111",
      wlHome   => '/opt/Oracle/Middleware/wlserver_10.3',
      user        =>  'weblogic',
   }

and indeed you need to change the params.pp and add your own machines and their values. but I will try to change it today.

thanks

biemond commented 10 years ago

and this

I fixed it

usage:

change the params.pp class so the defaults match with your environment or add extra changes based on the hostname

include orautils or override the defaults which does not match with your environment and call the class orautils with the necessary parameters

class{'orautils': osOracleHomeParam => "/opt/oracle", oraInventoryParam => "/opt/oracle/oraInventory", osDomainTypeParam => "soa" or admin , web, oim osLogFolderParam => "/data/logs", osDownloadFolderParam => "/data/install", osMdwHomeParam => "/opt/oracle/wls/Middleware11gR1", osWlHomeParam => "/opt/oracle/wls/Middleware11gR1/wlserver_10.3", oraUserParam => "oracle", osDomainParam => "osbSoaDomain", osDomainPathParam => "/opt/oracle/wls/Middleware11gR1/user_projects/domains/osbSoaDomain", nodeMgrPathParam => "/opt/oracle/wls/Middleware11gR1/wlserver_10.3/server/bin", nodeMgrPortParam => 5556, wlsUserParam => "weblogic", wlsPasswordParam => "weblogic1", wlsAdminServerParam => "AdminServer", }

biemond commented 10 years ago

Hi,

This is working for me when installing WebLogic 10.3.6 with Vagrant and I also got download errors on some big soa files

I put the wls jar in the vagrant shared folder

set the permissions in vagrant when you need to extract zip files

 config.vm.synced_folder ".", "/vagrant", :mount_options => ["dmode=777","fmode=777"]

in puppet set the 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",
  } 

and the weblogic install

 wls::installwls {'wls1036':
    downloadDir                       => '/vagrant',
    puppetDownloadMntPoint => '/vagrant',
    version                      => '1036',
    fullJDKName            => 'jdk1.6.0_37',
    oracleHome             => '/opt/Oracle',
    mdwHome                => '/opt/Oracle/Middleware',
 }

hope this helps