问题
I am using weblogic 10.3.4 and have a WLST script which does the following 1. Creates a Domain 2. Create JDBC 3. Start NodeManager 4. Connect to Nodemanager 5. And Deploy my App
Below are the relevant sections of my script
templatehome = domainhome + "/wlserver/common/templates/domains/wls.jar"
readTemplate(templatehome)
create('MyDomain', 'Domain')
cd('/Security/MyDomain/User/weblogic')
cmo.setName(domainuserid)
cmo.setUserPassword(domainpwd)
writeDomain(domainlocation + '/'+ domainname)
---Some other code related to JDBC
closeTemplate()
---- Updating setDomainEnv.cmd
f = open(domainlocation+ '/' + domainname +'/bin/setDomainEnv.cmd', "a+")
f.write("set CLASSPATH=%DOMAIN_HOME%\lib\javax.el-api-2.2.4.jar;%DOMAIN_HOME%\lib\com.sun.el_2.2.0.v201105051105-com.sun.el_2.2.0.v201105051105.jar;%CLASSPATH%")
f.close()
startNodeManager()
nmConnect(domainuserid, domainpwd, 'localhost', '5556', 'MyDomain','D:/MyLoc/Tools/Weblogic/user_projects/domains/MyDomain')
nmStart('AdminServer')
connect()
deploy('myapp','my-war-location')
Please note that i am updating the SetDomainEnv.cmd in the WLST code itself.
When i run this script the domain gets created, the node manager gets started and the application gets deployed. But the Server start does not happen through startWEblogic.cmd and my updated SetDomainEnv.cmd is not called. So the question is does NodeManager use startWEblogic.cmd to start a Server? If yes then why is it not happening in my code?
回答1:
Check StartScriptEnabled and StartScriptName properties in nodemanager.properties (ex: wlserver_10.3/common/nodemanager/nodemanager.properties)
StartScriptEnabled should be set to true and StartScriptName should be set to startWebLogic.cmd. By default these values are set, if they are not then please set them and restart nodemanager for the changes to take effect.
If the above fix doesn't work, then please update the question with the nodemanager.log content.
Reference : http://docs.oracle.com/cd/E24329_01/web.1211/e21050/java_nodemgr.htm#i1068413
来源:https://stackoverflow.com/questions/12529628/does-node-manager-through-wlst-in-weblogic-10-3-4-call-startweblogic-cmd