Vous êtes sur la page 1sur 2

Easy way to start your WebLogic Servers with the NodeManager in the background When you work with

Fusion Middleware you probably know you need to start the Web Logic Servers with the scripts located in the bin folder of your WebLogic domain and you need to start these servers in the background else these processes will be killed when you log out. On unix you can start these scripts in the backgrou nd and on Windows you can try to make some Windows services with the service uti lity of WebLogic, but you need to update the path, classpath and java parameters of this service ( in the registry) so it matches with the startup script. ( ea sy to make mistakes and memory changes can't be done from the WebLogic Console ) In this blogpost I will show you how you can start a WebLogic server from WLST i n combination with a NodeManager which is started in the background of the serve r. The first step is starting the Nodemanager once so the nodemanager.properties fi le is created. After this you can stop the nodemanager by killing the process Go to XXX\wlserver_10.3\server\bin and start startNodeManager.cmd Open the nodemanager.properties in a editor ( located in XXX\wlserver_10.3\commo n\nodemanager ) For FMW you need to change the StopScriptEnabled property to true, do the same f or StartScriptEnabled On windows there is a utility to make a service for this nodemanager. Go to XXX\wlserver_10.3\server\bin and start installNodeMgrSvc.cmd Start the service To automatically start a WebLogic Server and not prompted for a username / passw ord you need to create a boot.properties with username and password and put thi s in every server folder. Start startWebLogic.cmd , located in the bin folder of your domain and when it i s started then you can shut it down. Do the same for all the Managed Servers. st art startManagedWebLogic.cmd xxxx, where xxxx is the name of the managed servers . Go to XXX\domains\soa_domain\servers and create in every server folder a new fol der called security and create a boot.properties file and with the following content username=weblogic password=yourpassword put this file in every security folder. Next step is to set the nodemanager username and password Start your WebLogic AdminServer Go to the WebLogic Console, Domain and then open the Security tab Click on the Advanced link and set the nodemanager username and password Activate the changes and shutdown the AdminServer Now you try to start the AdminServer with WLST which connects to the NodeManager Start XXX\wlserver_10.3\common\bin\wlst.cmd you will see wls:/offline>

Connect to the NodeManager by using nmConnect nmConnect('weblogic','yourpassword','localhost','5556','your_domain','C:/XXX/use r_projects/domains/your_domain','ssl') nmConnect('weblogicadmin','Manager1','localhost','7002','PrimaveraP6EPPM','/home /oracle/weblogic/user_projects/domains/PrimaveraP6EPPM','ssl') You need to see the following Successfully Connected to Node Manager. start the AdminServer nmStart('AdminServer') Ask the status of the AdminServer nmServerStatus('AdminServer') Stop the AdminServer nmKill('AdminServer') disconnect from the nodemanager nmDisconnect() Now you can make some cmd and WLST scripts first create a start WLST script, called startDomain.wlst with the following con tent nmConnect('weblogic','yourpassword','localhost','5556','wls_domain','C:/XXX/user _projects/domains/wls_domain','ssl') nmStart('AdminServer') nmStart('soa_server1') nmDisconnect() and a cmd script startDomain.cmd call XXX\wlserver_10.3\common\bin\wlst.cmd startDomain.wlst Now you have a script what you can add to windows task schedular or an other uti lity Email ThisBlogThis!Share to TwitterShare to Facebook