Closed josepedrocorreia closed 10 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.
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
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
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
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.
Ok thanks,
last weekend I made some changes to support puppet 3.0 but I will also check the latest opensource puppet edition.
Is there enough space on your /tmp filesystem? Maybe that's why the copy fails.
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.
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
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.
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
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'
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
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
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
ok
that explains , your py script looks ok
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
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.
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, }
wls::installwls{'11gPS5':}
wls::bsupatch{'p16619891':
patchId => 'L51R',
patchFile => 'p16619891_1036_Generic.zip',
require => Wls::Installwls['11gPS5'],
}
wls::nodemanager{'nodemanager11g': listenPort => '5556', logDir => $logsDir, require => Wls::Bsupatch['p16619891'], }
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>
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
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()
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
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
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", }
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
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:
The
wls-sysctl.pp
file contains thesysctl
setup you advise in the README (is it necessary BTW, or just advised?)Here's the vagrant log:
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:As you can see the
wls1036_generic.jar
file is empty and has some temporary extension. Any clue what might be going wrong here?