Tuesday, July 27, 2010

Oracle Weblogic 11/12


Install Java
Download Java bin file from Oracle Java Web Site run following command to install it over Linux system.
$ sudo ./jdk-6u32-linux-x64.bin

After installation, say java got installed at following directory with JAVA_HOME as follows:
JAVA_HOME=/var/cemp/hsd/mediation/jdk1.6.0_32
Set Environment variable:
$ JAVA_HOME=/var/cemp/hsd/mediation/jdk1.6.0_32
$ PATH=/usr/local/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/opt/dell/srvadmin/bin:/home/cemp/bin:/opt/oracle/product/10.2.0/db_1/bin:.:
$ PATH=$JAVA_HOME/bin:$PATH
$ export PATH
$ echo $PATH

Install Weblogic
Download Weblogic installable from Oracle Weblogic Web Site.
$ sudo java -d64 -Djava.io.tmpdir=/logs -jar wls1036_generic.jar 
[Bold: changed the temp location to overcome root space restriction].

For example we want to install weblogic (Middleware_home) at following location:
(Middleware Home) MW_Home=/var/cemp/hsd/mediation/bea11
   1|WebLogic Server: [/var/cemp/hsd/mediation/bea11/wlserver_10.3]
   2|Oracle Coherence: [/var/cemp/hsd/mediation/bea11/coherence_3.7]

$ cd ${MW_Home}/utils/config/10.3
./setHomeDirs.sh

- - - - - - - - - - - - - - 
MW_HOME="/var/cemp/hsd/mediation/bea11"
WL_HOME="/var/cemp/hsd/mediation/bea11/wlserver_10.3"

- - - - - - - - - - - - - -

Domain Creation
Go to following directory:
$ cd ${WL_HOME}/wlserver_10.3/common/bin
 $ ./config.sh

<------------------- Fusion Middleware Configuration Wizard ------------------>
Welcome:
--------
Choose between creating and extending a domain. Based on your selection,
the Configuration Wizard guides you through the steps to generate a new or
extend an existing domain.
*   1 |Create a new WebLogic domain
       |    Create a WebLogic domain in your projects directory.
   2  |Extend an existing WebLogic domain
       |    Use this option to add new components to an existing domain and modify     

     |    configuration settings.
1. Select Domain Source: Choose Weblogic Platform components
2. Application Template Selection: Available Template
    Available Templates
    |_____Basic WebLogic Server Domain - 10.3.6.0 [wlserver_10.3]x
    |_____Basic WebLogic SIP Server Domain - 10.3.6.0 [wlserver_10.3] [2] x
    |_____WebLogic Advanced Web Services for JAX-RPC Extension - 10.3.6.0 [wlserver_10.3] [3] x
    |_____WebLogic Advanced Web Services for JAX-WS Extension - 10.3.6.0 [wlserver_10.3] [4] x

3. Edit Domain Information:
---------------------------
    |  Name     | Value  |
__|________|______ |_
  1| *Name:  | aspen   |

4.Select the target domain directory for this domain:
Target Location: "/var/cemp/hsd/mediation/bea11/user_projects/domains"

5. Configure Administrator User Name and Password:
______________________________________
      |          Name                      |    Value              |
___|_____________________|_____________ |_
   1|         *Name:                     |  weblogic          |
   2|     *User password:           | ***********    |
   3| *Confirm user password: | ***********    |

   4|      Description:                 |   asusual            |
------------------------------------------------- 
6. Domain Mode Configuration:
*  1|Development Mode
    2|Production Mode

7. Java SDK Selection:
 * 1|Sun SDK 1.6.0_32 @ /var/cemp/hsd/mediation/jdk1.6.0_32
    2|Other Java SDK

8. Select Optional Configuration: [Optional-can be configured later, but also can be configured from here]
   1|Administration Server [ ]
   2| [ ]
   3|Managed Servers, Clusters and Machines [ ]
   4|Deployments and Services [ ]
   5|JMS File Store [ ]
   6|RDBMS Security Store [ ]

Creating Domain...
0%          25%          50%          75%          100%
[------------|------------|------------|------------]
[***************************************************]
**** Domain Created Successfully! ****


This will create domain aspen
Start Weblogic & Node Manager
Domain Home: ${MW_Home}/user_projects/domainsDomain Name: aspen
Start Node Manager:
$ cd {MW_Home}/wlserver_10.3/server/bin
bin]$ nohup ./startNodeManager.sh > nohup.out &
Start WebLogic Admin Server:
$ cd ${Domain_Home}/aspen/bin
./setDomainEnv.sh
bin]$ nohup ./startWebLogic.sh > nohup.out &




JAVA_HOME=/home/aupm/neps/jdk1.6.0_33
PATH=$JAVA_HOME/bin:$PATH
export PATH

export CLASSPATH=/home/aupm/neps/weblogic_10.3.6/wlserver_10.3/server/lib/weblogic.jar:

java weblogic.WLST
connect('weblogic','weblogic123','t3://vivpfmwc03.westchester.pa.bo.comcast.net:9001')
nmEnroll('/home/aupm/neps/weblogic_10.3.6/user_projects/domains/base_domain','/home/aupm/neps/weblogic_10.3.6/wlserver_10.3/common/nodemanager') 
.
disconnect()


dumpStack()   // very useful command in times :)


Weblogic Console
http://AdminAddress:AdminPort/console 
Domain: aspen
Console User / Password: weblogic /weblogic123

0.1. Create A New Machine:A. Name: Machine1 / OS : UNIX
B. Type: SSL, Listen Address: 147.191.113.124, Listen Port: 5556, Debug Enabled: Checked


1.1. Create a New Cluster:
A. Name: Cluster-1, Messaging Mode: Unicast, Multicast Address: 239.192.0.0, Multicast Port: 7001
1.2. Create a New Server:

A. Server Name: Server-1, Server Listen Address: 147.191.113.124, Server Listen Port: 7011, Yes Make this server belong to Existing Cluster: 1.1.Name,
#1. Cluster-1 - Server-1 : Coherence
#2. Cluster-2 - Server-2 : DataSource
#3. Cluster-3 - Server-3 : Application Deployment

2.1. Create Coherence Cluster Configuration:
A. Name: Coherence-Cluster
B. Unicast Listen Address: 147.191.113.124, Unicast Listen Port: 8888, Multicast Listen Address: 231.1.1.1, Multicast Listen Port: 7777
C. Target: 1.1.Name (Cluster-1)
2.2. Create Coherence Server Configuration:

A. Name: Coherence-Server-1, Machine: 0.1.Name, Cluster: 2.1.Name, Unicast Listen Address: 147.191.113.124, Unicast Listen Port: 8888, Unicast Port Auto Adjust: Checked

Admin Port: 7001
Cluster-1-Server-1: Coherence: 7011, 7012 (https)
Cluster-2-Server-2: Coherence: 7021, 7022 (https)
Cluster-3-Server-3: Coherence: 7031, 7032(https)


${Domain_Home}/aspen/servers/Server-1
${Domain_Home}/aspen/servers/Server-2
${Domain_Home}/aspen/servers/Server-3
${Domain_Home}/aspen/servers/AdminServer
${Domain_Home}/aspen/servers/domain_bak


Common Errors
Problem 0.[Management:141266]Parsing Failure in config.xml: java.lang.AssertionError: java.lang.ClassNotFoundException: com.bea.wcp.sip.management.descriptor.beans.SipServerBean - While starting the Managed Server.
Solution: Update nodemanager.properties: ${MW_Home}/wlserver_10.3/common/nodemanager/nodemanager.properties

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
DomainsFile=/var/cemp/hsd/mediation/bea11/wlserver_10.3/common/nodemanager/nodemanager.domains
StartScriptEnabled=true
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Explanation:
You have to make sure this class is in the classpath: com.bea.wcp.sip.management.descriptor.beans.SipServerBean.
You have to edit the nodemanager.properties file and set the variable StartScriptEnabled=true instead of the default false.
The nodemanager.properties file is usually located in the directory: /wlserver_10.3/common/nodemanager. Now the nodemanager uses the start script usually startWebLogic, which calls the setDomainEnv in which the classpath for the SIP server is set. When you use the startManagedServer command the setDomainEnv is called so the classpath is set.


Problem 1: Exception in thread "main" java.lang.NoClassDefFoundError: weblogic/nodemanager/server/provider/WeblogicCacheServer
Solution 1: The process should be able to find correct classpath by default, we might hit this issue in some cases over *nix system, where we set some thing in classpath (or it's not empty), solution to this issue is set coherence.jar and coherence.server_.jar as follows:
 ${COHERENCE_HOME}/lib/coherence.jar:${COHERENCE_HOME}/modules/features/weblogic.server.modules.coherence.server_.jar: [along with other files we want to set in classpath]
Once the server started the Log file for the coherence server exists on the file system as follows: $DOMAIN_HOME/servers_coherence/{COHERENCE_SERVER_NAME}/logs/{COHERENCE_SERVER_NAME}.out
PID of the server is found here, i normally add that to the log file, but it's not possible when we start it from console.
$DOMAIN_HOME/servers_coherence/{COHERENCE_SERVER_NAME}/data/nodemanager/{COHERENCE_SERVER_NAME}.pid

Problem 2: Coherence*Web, exception on RedHat Linux, but not on windows and Debian: [weblogic.application.ModuleException: Missing Coherence jar or WebLogic Coherence Integration jar]:
Solution 2: Taking a look at the Module Exception, the coherence.jar is part of counter.war application, and the Weblogic.coherence.integration.jar is declared with the active-cache-[version].jar lib which is refrenced by MANIFEST.MF of the counter application.
The entire issue was that the MANIFEST.MF in the counter.war was named as "manifest.mf". Therefore the RedHat Linux could not recognize it simpl due to the naming issues. So make sure that manifest file name is "MANIFEST.MF" and declares to active-cache.jar which should be deployed as a lib on servers (can be bundled in Application/APP-INF/lib or 'as seperate application library deployed on same cluster')
This was solved by executing the following steps:
a) Explode the counter.war application.
b) Go to Counter.war application
c) Rename the manifest.mf to MANIFEST.MF
d) Deploy as open directory or compact back to war file and deploy.

Problem 3: Sample Configuration file for weblogic 12C
4 Managed Server on 4 Machine:
Managed Server 1:Server 1 => Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/client/tangosol-coherence-p1-override.xml -Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml
-Desp.propDir=/home/aupm/neps/usageCache/props
-Desp.logDir=/home/aupm/neps/usageCache/logs
-Dtangosol.coherence.management=all
-Dcom.sun.management.jmxremote


Coherence 1: => Classpath:
/home/aupm/neps/usageCache/UsageCacheModel-12.08-SNAPSHOT.jar:/home/aupm/neps/weblogic_10.3.6/coherence_3.7/lib/coherence.jar:/home/aupm/neps/weblogic_10.3.6/modules/features/weblogic.server.modules.coherence.server_10.3.5.0.jar:
Coherence 1: =&gt; Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/server/tangosol-coherence-p1-override.xml
-Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml
-Dtangosol.coherence.cluster=aupm_usage_service
-Dtangosol.coherence.distributed.localstorage=true


Managed Server 2:Server 2 => Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/client/tangosol-coherence-p2-override.xml -Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml
-Desp.propDir=/home/aupm/neps/usageCache/props
-Desp.logDir=/home/aupm/neps/usageCache/logs
-Dtangosol.coherence.management=local-only
-Dtangosol.coherence.management.remote=true


Coherence 2: => Classpath:
/home/aupm/neps/usageCache/UsageCacheModel-12.08-SNAPSHOT.jar:/home/aupm/neps/weblogic_10.3.6/coherence_3.7/lib/coherence.jar:/home/aupm/neps/weblogic_10.3.6/modules/features/weblogic.server.modules.coherence.server_10.3.5.0.jar:

Coherence 2 =&gt; Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/server/tangosol-coherence-p2-override.xml
-Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml
-Dtangosol.coherence.cluster=aupm_usage_service
-Dtangosol.coherence.distributed.localstorage=true


Managed Server 3:Server 3 => Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/client/tangosol-coherence-p3-override.xml -Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml -Desp.propDir=/home/aupm/neps/usageCache/props -Desp.logDir=/home/aupm/neps/usageCache/logs
-Dtangosol.coherence.management=local-only
-Dtangosol.coherence.management.remote=true


Coherence 3: => Classpath:
/home/aupm/neps/usageCache/UsageCacheModel-12.08-SNAPSHOT.jar:/home/aupm/neps/weblogic_10.3.6/coherence_3.7/lib/coherence.jar:/home/aupm/neps/weblogic_10.3.6/modules/features/weblogic.server.modules.coherence.server_10.3.5.0.jar:

Coherence 3: =&gt; Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/server/tangosol-coherence-p3-override.xml
-Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml
-Dtangosol.coherence.cluster=aupm_usage_service
-Dtangosol.coherence.distributed.localstorage=true


Managed Server 4:Server 4 => Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/client/tangosol-coherence-p4-override.xml -Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml -Desp.propDir=/home/aupm/neps/usageCache/props -Desp.logDir=/home/aupm/neps/usageCache/logs
-Dtangosol.coherence.management=local-only
-Dtangosol.coherence.management.remote=true


Coherence 4:=> Classpath:
/home/aupm/neps/usageCache/UsageCacheModel-12.08-SNAPSHOT.jar:/home/aupm/neps/weblogic_10.3.6/coherence_3.7/lib/coherence.jar:/home/aupm/neps/weblogic_10.3.6/modules/features/weblogic.server.modules.coherence.server_10.3.5.0.jar:

Coherence 4: =&gt; Arguments:
-Dtangosol.coherence.override=/home/aupm/neps/usageCache/server/tangosol-coherence-p4-override.xml
-Dtangosol.coherence.cacheconfig=/home/aupm/neps/usageCache/usage-cache-config.xml
-Dtangosol.coherence.cluster=aupm_usage_service
-Dtangosol.coherence.distributed.localstorage=true


Problem 4:




No comments:

Post a Comment