Thursday, 7 July 2011

Starting a Coherence Server From WLS 10.3.4 Console

Decided it might make sense to use Node Manager to stop/start my stand alone coherence servers which will be accessed by the WebLogic managed server instances as storage disabled members. The process is pretty straight forward and is shown in this blog entry below. However there is one thing to be aware of.

http://blogs.oracle.com/jamesbayer/entry/weblogic_server_1034_screencas

In my example I wanted to use Coherence 3.7 and so to do that I needed to add the following to the "Server Start" Classpath field

/u01/Middleware/coherence/370/coherence/lib/coherence.jar

Once I did that and tried to start the Coherence Server from the admin console , using node manager it failed with an error as follows.

Jul 8, 2011 4:36:25 AM> <INFO> <NodeManager> <Server output log file 
 is 
 '/u01/Middleware/domains/1034/acs_dom/servers_coherence/CoherenceServer1/logs/CoherenceServer1.out'>
 Exception in thread "Main Thread" java.lang.NoClassDefFoundError: 
 weblogic/nodemanager/server/provider/WeblogicCacheServer
 Caused by: java.lang.ClassNotFoundException: 
 weblogic.nodemanager.server.provider.WeblogicCacheServer
         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
 
The poblem here is if you leave the classpath blank in the startup properties in the console configuration, then the two minimal jars (weblogic.server.modules.coherence.server_10.3.4.0.jar and coherence.jar) that are required are added for you. Once you specify a non-empty classpath (which is what I did), then you have to explicitly include those jars plus any others you want.

So what I needed was the following.

/u01/Middleware/coherence/370/coherence/lib/coherence.jar:/u01/Middleware/1034/modules/features/weblogic.server.modules.coherence.server_10.3.4.0.jar

Once started the Log file for the coherence server exists on the file system as follows:

$DOMAIN_HOME/servers_coherence/{COH_SERVER_NAME}/logs/{COH_SERVER_NAME}.out

The PID for the server is found here, I normally add that to the log file but it's not possible when starting Coherence this way.

$DOMAIN_HOME/servers_coherence/{COH_SERVER_NAME}/data/nodemanager/{COH_SERVER_NAME}.pid

Monday, 4 July 2011

Installing WLS 10.3.4 domain across 2 Compute Nodes on Exalogic

Got a rare opportunity to access 2 compute nodes on Exalogic and I thought it would be a good opportunity to test creating a WLS domain across the 2 compute nodes. Here is some brief steps showing how this was done.

1. Create a share to be used by both compute nodes. In this demo we created one as follows.

/u01/Middleware

2. Install WLS software onto the share as shown below.

[oracle@auxlcn07 1034]$ pwd
/u01/Middleware/1034
[oracle@auxlcn07 1034]$ d
total 148
drwxr-xr-x+ 7 oracle oinstall   464 Jun 30 21:25 modules/
drwxr-xr-x+ 8 oracle oinstall     9 Jun 30 21:25 utils/
drwxr-x---+ 7 oracle oinstall     9 Jun 30 21:25 jrockit_160_22_D1.1.1-3/
-rw-r--r--+ 1 oracle oinstall   623 Jun 30 21:25 ocm.rsp
-rw-r--r--+ 1 oracle oinstall 73475 Jun 30 21:25 registry.dat
-rw-r--r--+ 1 oracle oinstall  2306 Jun 30 21:25 registry.xml
-rw-r--r--+ 1 oracle oinstall    26 Jun 30 21:25 .home
drwxr-xr-x+ 8 oracle oinstall    13 Jun 30 21:25 ./
drwxr-xr-x+ 9 oracle oinstall    11 Jun 30 21:25 wlserver_10.3/
drwxr-xr-x+ 6 oracle oinstall     9 Jun 30 21:25 coherence_3.6/
-rw-rw----+ 1 oracle oinstall   192 Jul  1 08:25 domain-registry.xml
drwxr-xr-x+ 2 oracle oinstall    12 Jul  1 17:16 logs/
drwx------+ 6 oracle oinstall     6 Jul  4 15:56 ../

3. Now we can create a PRODUCTION domain into a share in a directory as follows "/u01/Middleware/domains/1034/acs_dom". Ensure you create a machine for each compute node and ensure you place the managed servers you wish on each compute node in the domain config screens.

[oracle@auxlcn07 acs_dom]$ d
total 23
drwxr-xr-x+  4 oracle oinstall   4 Jul  1 08:25 ../
drwxr-x---+  2 oracle oinstall   3 Jul  1 08:25 autodeploy/
drwxr-x---+  2 oracle oinstall   3 Jul  1 08:25 console-ext/
drwxr-x---+  2 oracle oinstall   3 Jul  1 08:25 lib/
drwxr-x---+  2 oracle oinstall   6 Jul  1 08:25 security/
-rw-r-----+  1 oracle oinstall 650 Jul  1 08:25 startManagedWebLogic_readme.txt
drwxr-x---+  2 oracle oinstall   7 Jul  1 08:25 init-info/
-rw-r-----+  1 oracle oinstall 462 Jul  1 08:25 fileRealm.properties
-rwxr-x---+  1 oracle oinstall 252 Jul  1 08:25 startWebLogic.sh*
drwxr-x---+ 10 oracle oinstall  12 Jul  1 08:26 config/
drwxr-x---+ 12 oracle oinstall  16 Jul  1 08:29 ./
drwxr-----+  2 oracle oinstall   2 Jul  1 10:50 pending/
-rw-r-----+  1 oracle oinstall  32 Jul  1 10:50 edit.lok
drwxr-----+  2 oracle oinstall   2 Jul  1 10:50 tmp/
drwxr-----+  8 oracle oinstall   8 Jul  1 14:10 servers/
drwxr-x---+  5 oracle oinstall  11 Jul  1 15:38 bin/

Note: No need for pack/unpack given we are using a share.

4. In this demo we want to create a node manager process on each compute node sharing the same domain directory. To do this we simply create seperate directories for each on our compute nodes and copy a set of node manager files available in the default $WLS_HOME/wlserver_10.3/common/nodemanager directory.

[oracle@auxlcn07 nodemanager]$ pwd
/u01/Middleware/domains/1034/nodemanager
[oracle@auxlcn07 nodemanager]$ d
total 6
drwxr-xr-x+ 4 oracle oinstall 4 Jun 30 21:54 ./
drwxr-xr-x+ 4 oracle oinstall 4 Jul  1 08:25 ../
drwxr-xr-x+ 2 oracle oinstall 8 Jul  1 14:27 node08/
drwxr-xr-x+ 2 oracle oinstall 9 Jul  1 15:29 node07/

Example of node07 files

[oracle@auxlcn07 node07]$ pwd
/u01/Middleware/domains/1034/nodemanager/node07
[oracle@auxlcn07 node07]$ d
total 30
drwxr-xr-x+ 4 oracle oinstall     4 Jun 30 21:54 ../
-rw-r-----+ 1 oracle oinstall   130 Jul  1 08:44 nm_data.properties
-rw-r-----+ 1 oracle oinstall    77 Jul  1 11:20 nodemanager.domains
-rw-r--r--+ 1 oracle oinstall   164 Jul  1 11:28 nodemanager.properties
-rwxr-x---+ 1 oracle oinstall  4378 Jul  1 13:23 startNodeManager.sh*
-rw-r-----+ 1 oracle oinstall  1379 Jul  1 14:02 nodemanager.log.1
-rw-r-----+ 1 oracle oinstall     0 Jul  1 14:28 nodemanager.log.lck
-rw-r-----+ 1 oracle oinstall 15618 Jul  1 14:29 nodemanager.log
drwxr-xr-x+ 2 oracle oinstall     9 Jul  1 15:29 ./

nodemanager.properties example, the HOME will differ in the node08 file.

NodeManagerHome=/u01/Middleware/domains/1034/nodemanager/node07
StartScriptEnabled=true
StopScriptEnabled=true

5. Edit startNodeManager.sh to include node manager home location now it's moved
away from WLS_HOME. Example for node07.

NODEMGR_HOME="/u01/Middleware/domains/1034/nodemanager/node07"

6. Start both node managers from there directories on each compute node, example for node07.

/u01/Middleware/domains/1034/nodemanager/node07/startNodeManager.sh

7. For the ADMIN SERVER node ensure we set the following in "startWebLogic.sh".

# START WEBLOGIC

JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.security.SSL.ignoreHostnameVerification=true"

echo "starting weblogic with Java version:"

8. Start admin server, here we use node07.

/u01/Middleware/domains/1034/acs_dom/bin/startWebLogic.sh

9. Log into the admin console

10. Ensure the node manager processes are available from each machine and reachable.

11. Start all managed servers, once you ensure the node manager is reachable. I prefer to start managed servers from the command line but given we have 2 node managers on the compute nodes we can use that through the admin console. 


Example of such a setup.