Overview
* See this post for a Node Manager overview.
* See this post on how to install WebLogic and SOA Suite.
Setup Machine
Create a Machine if None Exists
* Start Admin Server with startup script.
* Login Admin Console.
* Create a new Machine type if one does not exist.
– Go to: soa_domain > Environment > Machines
Assign Machine to Managed Server
* Assign managed servers to be managed by NM to newly created machine.
– Click soa_domain > Environment > Servers > Configuration tab.
– Click on the managed server to be added to new machine.
– Assign Machine property.
Assign Machine to Admin Server
* Stop Admin Server with script.
* Go to domain config directory.
cd /opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain/config
* Backup config.xml
cp config.xml config.xml.082211
* Assign AdminServer to machine by adding <machine>LocalMachine</machine> immediately beblow the AdminServer name element:
<server> <name>AdminServer</name> <machine>LocalMachine</machine> ...
* Start AdminServer with script.
* Check that AdminServer has been successfully assigned to machine.
Set Server Specific Startup Parameters
* If you have set StartScriptEnabled to true in nodemanager.properties (see below), then the class path and JVM arguments from the script will be used first and the values you specified on the Server Startup page second.
* You can override server specific startup parameters on the Environment > Servers > my_server > Configuration > Server Start page.
* Note: use -Xnohup instead of -Xrs if you use JRockit JVM.
Setup NM
Modify nodemanager.properties
* Go to /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/nodemanager directory.
cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/nodemanager
* Edit nodemanager.properties and set the following properties to true:
CrashRecoveryEnabled=true StartScriptEnabled=true StopScriptEnabled=true PropertiesVersion=10.3
Start NM
# start NM cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/server/bin ./startNodeManager.sh
Invoke WLST and Connect to NM
# Start WLST cd /opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/bin ./wlst.sh # Connect to NM nmConnect('weblogic', 'welcome1', 'localhost', '5556', 'soa_domain', '/opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain','ssl')
Enroll Domain into Node Manager
# Connect to Admin Server: connect('weblogic','welcome1','t3://localhost:7001') # Enroll domain: nmEnroll('/opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain', '/opt/oracle/Middleware/home_11gr1/wlserver_10.3/common/nodemanager')
Setup Startup Script
Set Debug Flag to False
* In dev mode, the debug flag defaults to true in the startup script. It will cause error 202: bind failed: Address already in use error when you try to start managed servers.
cd /opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain/bin vi setDomainEnv.sh #debugFlag="true" debugFlag="false" export debugFlag
Start Servers via NM
Start Admin Server via NM
* Stop Admin Server with script.
* Start Admin Server with NM:
# Connect to NM nmConnect('weblogic', 'welcome1', 'localhost', '5556', 'soa_domain', '/opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain','ssl') # Start AdminServer nmStart('AdminServer') # Show Admin Server status nmServerStatus('AdminServer')
Start Managed Server via NM
# Connect to Admin Server connect('weblogic','welcome1','t3://localhost:7001') # Start Managed Server start('soa_server1') nmServerStatus('soa_server1')
Test Crash Recovery
* Find pid for managed server.
cd /opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain/servers/soa_server1/data/nodemanager cat cat soa_server1.pid # We got 21786 # Check process and we got one process ps -ef|grep 21786
* Kill process manually.
# Kill process kill -9 21786 # Recheck process and it should be gone
* Check auto start.
# Check soa_server1.pid and we got a new process id 24600
* Login Admin Console and you should see soa_server1 is in the state of STARTING or RUNNING.
Issues
error 202: bind failed: Address already in use
* This happened when I tried to start managed server from NM.
* It’s due to servers were started in debug mode and the debug port is already in use by Admin Server when it got started.
* See this post for more discussions.
* Fix: set debugFlag to false in setDomainEnv.sh file.
cd /opt/oracle/Middleware/home_11gr1/user_projects/domains/soa_domain/bin vi setDomainEnv.sh #debugFlag="true" debugFlag="false" export debugFlag
failed hostname verification check
* Error message:
Starting server soa_server1 .....[Security:090504]Certificate chain received from localhost - 127.0.0.1 failed hostname verification check. Certificate contained localhost.localdomain but check expected localhost
* Fix: see this post.
$ cd /opt/oracle/Middleware/wlserver_10.3/server/bin $ . ./setWLSEnv.sh $ cd /opt/oracle/Middleware/wlserver_10.3/server/lib $ cp DemoIdentity.jks DemoIdentity.jks.ori $ java utils.CertGen -cn oradev -keyfilepass DemoIdentityPassPhrase -certfile newcert -keyfile newkey Generating a certificate with common name oradev and key strength 1024 issued by CA with certificate from CertGenCA.der file and key from CertGenCAKey.der file $ java utils.ImportPrivateKey -keystore DemoIdentity.jks -storepass DemoIdentityKeyStorePassPhrase -keyfile newkey.pem -keyfilepass DemoIdentityPassPhrase -certfile newcert.pem -alias demoidentity No password was specified for the key entry Key file password will be used <Dec 1, 2012 7:19:42 PM PST> <Info> <Security> <BEA-090906> <Changing the default Random Number Generator in RSA CryptoJ from ECDRBG to FIPS186PRNG. To disable this change, specify -Dweblogic.security.allowCryptoJDefaultPRNG=true> Imported private key newkey.pem and certificate newcert.pem into keystore DemoIdentity.jks of type jks under alias demoidentity
References
* Oracle® Fusion Middleware Node Manager Administrator’s Guide for Oracle WebLogic Server 11g Release 1 (10.3.4) Part Number E13740-03
* WebLogic NodeManager Quick Start
2 Responses to WebLogic 11g: Setup Node Manage