martedì 24 luglio 2012

Oracle Middleware: How to autostart Middleware services with NodeManager

This post explains how to configure NodeManager in order to perform services autostart in case of failure or manually via WebLogic Server web interface.

In order to configure NodeManager we need to create a configuration file, so login to your Oracle Middleware/WebLogic machine:

[oracle@orcl /]$ cd /home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager

[oracle@orcl nodemanager]$ nano nodemanager.properties

Copy/paste the following configuration, changing "ListenAddress" and "ListenPort" according to your server configuration.

DomainsFile=/home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager/nodemanager.domains
LogLimit=0
PropertiesVersion=10.3
DomainsDirRemoteSharingEnabled=false
javaHome=/home/oracle/Oracle/Middleware/jrockit_160_24_D1.1.2-4
AuthenticationEnabled=false
NodeManagerHome=/home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager
JavaHome=/home/oracle/Oracle/Middleware/jrockit_160_24_D1.1.2-4/jre
LogLevel=INFO
DomainsFileEnabled=true
StartScriptName=startWebLogic.sh
ListenAddress=10.0.0.84
NativeVersionEnabled=true
ListenPort=5556
LogToStderr=true
SecureListener=false
LogCount=1
DomainRegistrationEnabled=false
StopScriptEnabled=false
QuitEnabled=false
LogAppend=true
StateCheckInterval=500
CrashRecoveryEnabled=true
StartScriptEnabled=true
LogFile=/home/oracle/Oracle/Middleware/wlserver_10.3/common/nodemanager/nodemanager.log
LogFormatter=weblogic.nodemanager.server.LogFormatter
ListenBacklog=50

Once this is done you can start Nodemanager:

[oracle@orcl nodemanager]$ /home/oracle/Oracle/Middleware/wlserver_10.3/server/bin/startNodeManager.sh

Now we need to configure WebLogic in order to make him communicate with NodeManager:

http://YOUR_MIDDLEWARE_SERVER_IP:7001/console

Click Machines -> Lock & Edit button -> New



Select a Name for Machine, set Unix and click Next button



Set "Type PLAIN" as we will not use SSL, "Listen Address" the IP address of your WLS machine and "Listen Port" the one configured in nodemanager.properties. Click Finish button then Activate Changes.



Click on the Machine you just created, in my case "Machine-0" then Configuration tab, Servers tab, Add button



Select an existing server to associate with NodeManager, click Finish button and then Activate Changes button.



Move to Servers tab, Control tab, select server and you will be able to control it from there.



In case of service failure it will be automatically restarted as long as Nodemanager and WebLogic Server are running.

I suggest you to add an autostart script for WebLogic and NodeManager in order to make them start automatically on boot.

Nessun commento:

Posta un commento