Friday, January 22, 2010

Setting up 11g SOA Suite Cluster in Windows

We will be setting it up with the latest soa suite 11.1.1.2

The very important step is that the two machine you are using should have a static ip and DNS.They should be easily accessible also because we have a shared directory in cluster where we store the logs.

the steps are like we will be installing weblogic then SOA on top of it.then we will install database.We will run the rcu script to create the schemas for SOA.Database will be installed in one system only and the other system will also point to the same database same as OC4j.

There is one important point that we have to install weblogic and SOA on both the machine and in both the machine the directory structure should be very similar.so i will suggest you to follow the screenshots till installation of SOA in both the system.

Further steps are creating SOA domain,packing it and unpacking it in another system.Creating one adminserver and two managed server.Some configurations then installing ohs as loadbalancer and you are done.But it is not as easy as it sounds.Please watch every screen shots clearly for the values mentioned.

first step is installing weblogic 10.3.2





















=============================================================================

Installing SOA on top of weblogic





























================================================================================


Installing database 11.1.0.7




























































===============================================================================================

Creating Schema for the Cluster(running rcu.bat)







































===================================================================================

Creating Cluster Domain






















































=====================================================================================
Creating boot.properties


When we try to start the weblogic server through weblogic.cmd command this ask for use and password to authenticate but in a cluster it should be provided automatically so that failover can took place.There for we create boot.properties which includes the username and password for the weblogic.Go to yopur cluster domain that you have create and create a folder structure like

server\AdminServer\security\boot.properties

here boot.properties will contain the following value

username=weblogic
password=welcome1


here welcome1 is my password for weblogic u can provide your own.Now Start the weblogic server





it won't ask for the user and password.

Now you can open the console in http://host:port/console

You can see that there are two managed servers created for you.




===========================================================================

Disable host name verification

Since we have not configured any SSL we need to disable the host name if at all we will be using SSL then we need to set it accordingly.


Do the following to disable it

Go to WebLogic Console, select Admini Server then SSL and then in bottom select Advanced.there Set Hostname Verification to None.

Similary do the same for the managed server 1 also which in our case is soa_cluster1

=====================================================================================

Setting nodemanager.properties



If you will go ahead with these setting and start your node manager for machine1 then then you will try to start your soa_cluster1 from admin console it will start but it will always go in to admin state.If you will look in to the log files it will give you errors like class not found exception :oracle.jrf.wls.JRFStartup

and lot more like that.

This happens because in our weblogic server in the following file

weblogic_home\common\nodemanager\nodemanager.properties

StartScriptEnabled is set to false

so you first stop you node manager stop your managed server then

you need to set it to true so your new value should appear like

StartScriptEnabled =true.

This is like doing your setEnv.cmd when you start your server from command console.SO once these settings are done you can start your node manager.

You can also do the same bin running the setNMProps.cmd found in SOA_HOME\common\bin folder.It also does the same work that is it sets the StartScriptEnabled =true.

Go to weblogic home\server\bin and do a startNodeManager.cmd

Now if you will go to admin console and try to start the managed server it will not go to admin state will go directly to running state.





=====================================================================================

Running the soa-createUDD.py Script

This script transform the jms destination for high availability

open a command prompt and go to

your domain/soadomain/bin/setDomainEnv.cmd




Now run the script

weblogic home/jrockit_160_05_R27.6.2-20/bin/java weblogic.WLST ORACLE_HOME/bin/soa-createUDD.py --domain_home "path till your domain" --soacluster SOA_Cluster


so in my case it is luking something like this





It will execute the script and will come up like this



Now restart the admin server and then check that you have the following module SOAJMSModuleUDDs created within JMS module and are targeted to SOAJMSServer_auto_1 and SOAJMSServer_auto_2

Similary check if there is another module UMSJMSSystemResource and is targeted to UMSJMSServer_auto_1 and UMSJMSServer_auto_2

Now once done all these checking please also check if you are able to open up the b2b and workflow console.

==================================================================================

So far we have done all the setting in machine one.Now we will doing the settings and configurations in machine2.

Go to machine 2 and you need to install weblogic 10.3.2 and SOA 11.1.1.2 there.Please keep in mind that the directory structure should be very same so for doing these steps you can just follow the screent shot that we have done for machine 1 because everything will remain the same there also.

We will be using the pack/unpack command utility of weblogic it creates a jar file.

On your first machine,open a command window and navigate to ORACLE_HOME/common/bin

then issue the following command

./pack.cmd -managed=true
-domain="path to your domain"
-template=soadomaintemplate.jar
-template_name=soa_domain_template


so in my case it is appearing like this




so as you can see it has created the teamplate.jar file in the following location
D:\oracle\Middleware\Oracle_SOA1\common\bin for me.

Now again go to the second node.

open a command prompt and navigate up to ORACLE_HOME/common/bin

and issue the following command

./unpack.cmd
-domain="your domain path"
-template=soadomaintemplate.jar

so in my case it looks like



Now it is getting created in second node also now Disable Host Name Verification for the soa_clusrter 2 Managed Server also.Same steps to be followed .Choose server ->SSL tab-->Advanced and there choose the host name to none.







You might come across a issue that your managed server in machine2 is started but its health is critical.There can be a lot of issues but in my case i found that while creating the database schema i have used local host instead of the host name for my machine so when my second machine was trying to accesst he jdbc resources it was not able to access that. SO i went to my jdbc resources and changed all the URL setting from localhost to the ip name of the machine where i have installed my db.

So the bottom line is that never use the word local host instead use the machine name or ip address.


to enable b2b engine in the second node just go to following directory

ORACLE_HOME/soa/thirdparty/edifecs


and extract XEngine there.

Now start your node manager for node 2 also and start the soa_cluster2 from admin console.you should also be able to log in to b2b and workflow console.
=======================================================================================

Installing web server(OHS) for loadbalancing.

























































Now once it is installed go to the following location in your OHS

OHS_HOME/instances/ohs_instance1/config/OHS/ohs1/mod_wl_ohs.conf


Add the following in the bottom

# SOA soa-infra app
<Location /soa-infra>
SetHandler weblogic-handler
WebLogicCluster host1:8001,host2:8001
WLLogFile /tmp/web_log.log
</Location>

# Worklist
<Location /integration/>
SetHandler weblogic-handler
WebLogicCluster host1:8001,host2:8001
WLLogFile /tmp/web_log.log
</Location>

# B2B
<Location /b2b>
SetHandler weblogic-handler
WebLogicCluster host1:8001,host2:8001
WLLogFile /tmp/web_log.log
</Location>

# UMS prefs
<Location /sdpmessaging/userprefs-ui >
SetHandler weblogic-handler
WebLogicCluster host1:8001,host2:8001
WLLogFile /tmp/web_log.log
</Location>

and restart the http server on your webhost.

Go to command prompt till following path

OHS_HOME/instances/ohs_instance1/bin

and issue a command

opmnctl restartproc ias-component=ohs1

By default ohs is installed on the 7777 port now try to access all the url using ohs host and port and you should be able to log in to the respective console.

http://webhost:7777/b2b|soa-infra etc.

This you can do by stopping one managed server at a time and checking for both the managed servers.

==========================================

Configuring JMS Persistence Store as Shared Across the Servers

You need to have a shared directory so that both the machine can access that ,This is required so that the logs will be logged to a common place so in case of fail over when one of the node goes down the other node can get all the information from the common logs and can start the process from their itself.

For this share a directory and map it to network drive,give same name to the drive in both the machine.

Now go to your admin console.go to Services, Persistence Store, Persistence_Store_Name, and then Directory.there specify a directory name that you have created in the your network mapped drive.

Again go to your admin server.

go to Environment and select each server one by one

Select the Configuration then Services tab.
There Under Default Store, in the Directory provide a new directory created in your network mapped drive.

=====================================================================

Setting the Front End HTTP Host and Port

GO to Environment > Clusters.

Select the SOA_cluster cluster.


Select HTTP tab

Set the values for the following:


Frontend Host: webhost1(since i have installed my webhost on machine 1 it will same as the domain name of my machine1)

Frontend HTTP Port: 7777

Frontend HTTPS Port: leave it blank

Save the changes and restart the server.

It sets the frontend host and port.NOw if client has to invoke the process he will be invoking it using the host and port of the webhost and the application deployed in our SOA.

======================================================

Using Oracle Coherence for Deploying Composites

Deployment of composite by default use multicasting.Multicasting enables SOA to discover all of the members of a cluster to which it deploys composites dynamically.However in 11g onwards it is recommended to use unicasting ,unicast doesn't allow to dynamically find the nodes so we must specify it explicitly in order so that if a new node joins the cluster he should be able to know how many nodes are there in the cluster and how to communicate with them.for this purpose we need to specify the address of other nodes in the server start tab of each managed server.

Go to Environment-->Server choose both the managed server one by one

Click on server start tab and you should get a window like this with a blank filed arguments



for the SOA_cluster1

provide the following details in argument

-Dtangosol.coherence.wka1=host1
-Dtangosol.coherence.wka2=host2
-Dtangosol.coherence.localhost=host1

This is because my local host in machine 1

similarly for SOA_Cluster2

-Dtangosol.coherence.wka1=host1
-Dtangosol.coherence.wka2=host2
-Dtangosol.coherence.localhost=host2

because for SOA_Cluster2 machine2 is the local host.Once done save the change and restart all the servers and your cluster is ready.

You can start deploying the process.

Here we have not covered the server migration because it need one more ip address which is not in use and is avaialbe in your network and unfortunately i don't have one.This is required because in case of failover ,when one ofyour node will crash all the configuration should be moved to another managed server this will be done through a dynamic ip to which it will be associated.But i believe for developement purpose this set up is enough.