Wednesday, July 27, 2022

Add OACORE servers in R12.2

Oracle Doc ID 1905593.1 (Managing Configuration of Oracle HTTP Server and Web Application Services in Oracle E-Business Suite Release 12.2) gives steps on adding oacore process to the instance. See "4.4.1 Adding a new managed server".

Addition of managed servers needs to be done on the RUN file system when there is no active ADOP cycle. During the next adop prepare, the Configuration Change Detector identifies that the addition has been made and the managed servers are automatically synced up from the run file system to the patch file system. The synchronization also gets done when fs_clone is executed.

Most likely, adding CPU and memory to the server are needed to support additional oacore.

1. Backup $CONTEXT_FILE
2. Backup two conf files (in below path or similar. Many conf files resides in this folder)
$ cd  $IAS_ORACLE_HOME/instances/EBS_web_OHS1/config/OHS/EBS_web
mod_wl_ohs.conf
apps.conf

3. Check ADOP session
$ hostname
master_node.domain.com
$ echo $TWO_TASK
EBSDEV

$ adop -status
Enter the APPS password:
Connected.
==============================================================
ADOP (C.Delta.12)
Session Id: 5
Command: status
Output: $NE_BASE/EBSapps/log/adop/5/20220X08_115941/adzdshowstatus.out
===============================================================
Node Name       Node Type  Phase           Status          Started              Finished             Elapsed
--------------- ---------- --------------- --------------- -------------------- -------------------- ------------
2nd_node            slave    FS_CLONE        COMPLETED       2022/02/17 23:05:12  2022/02/18 00:01:37  0:56:25
3rd_node            slave     FS_CLONE        COMPLETED       2022/02/17 23:05:12  2022/02/17 23:59:02  0:53:50
naster_node      master    FS_CLONE        COMPLETED       2022/02/17 23:05:12  2022/02/17 23:39:21  0:34:09

4. Identify port numbers (and how many OACORE server(s) on each node)
$ grep -i oacore_server_ports $RUN_BASE/inst/apps/$CONTEXT_NAME/appl/admin/$CONTEXT_NAME.xml
<oacore_server_ports oa_var="s_oacore_server_ports">oacore_server1:7206</oacore_server_ports>

$ grep -i oacore_server_ports $PATCH_BASE/inst/apps/$CONTEXT_NAME/appl/admin/EBSDEV*.xml
<oacore_server_ports oa_var="s_oacore_server_ports">oacore_server1:7207</oacore_server_ports>

Port 7206 is used for RUN file system and 7207 is used for PATCH file system. Port 7208 is free and is chosen for the new oacore. Also oacore_server1 is running on master node and oacore_server2 is running on 2nd node. Name oacore_server3 as the new server.

5.  Add a new managed server. This will create a managed server and add a new entry to the context file for starting and stopping the new managed server via the adstrtal and adstpall scripts:

$ echo $FILE_EDITION
run
$ echo $APPL_TOP
/u02/app/EBSPROD/fs1/EBSapps/appl    

$ echo $CONTEXT_FILE
$ perl $AD_TOP/patch/115/bin/adProvisionEBS.pl \
        ebs-create-managedserver -contextfile=$CONTEXT_FILE \
        -managedsrvname=oacore_server3 -servicetype=oacore \
        -managedsrvport=7208 -logfile=$APPLRGF/TXK/addMS_oacoreserver3_2022.log
Enter the APPS Schema password:
Enter the WebLogic AdminServer password:

The logfile for this session is located at $APPLRGF/TXK/addMS_oacoreserver3_2022.log
ManagedServer oacore_server3 created successfully.

Note: use the real path and file name for $CONTEXT_FILE in above line

$  egrep -i "Error|Failed|Warning|ORA-" $APPLRGF/TXK/addMS_oacoreserver3_2022.log
Warning: An insecure protocol was used to connect to the
*** ALL THE FOLLOWING FILES ARE REQUIRED FOR RESOLVING RUNTIME ERRORS
Warning: An insecure protocol was used to connect to the

$ grep -i s_oacore_nodes $CONTEXT_FILE
       <oacore_nodes oa_var="s_oacore_nodes">master_node.aetna.com:7206</oacore_nodes>

$ grep -i oacore_server_ports $CONTEXT_FILE
  <oacore_server_ports oa_var="s_oacore_server_ports">oacore_server1:7206,oacore_server3:7208</oacore_server_ports>

By the way, it does not add anything to PATCH file system.
$ grep -i oacore_server_ports $PATCH_BASE/inst/apps/$CONTEXT_NAME/appl/admin/EBSDEV*.xml
<oacore_server_ports oa_var="s_oacore_server_ports">oacore_server1:7207</oacore_server_ports>

Now, starting oacore_server3 shall work:
sh $ADMIN_SCRIPTS_HOME/admanagedsrvctl.sh status oacore_server3
sh $ADMIN_SCRIPTS_HOME/admanagedsrvctl.sh start oacore_server3
sh $ADMIN_SCRIPTS_HOME/admanagedsrvctl.sh status oacore_server3
You are running admanagedsrvctl.sh version 120.14.12020000.12
Enter the WebLogic Admin password:
oacore_server3 is running.

6. Add details of the newly added managed servers into the OHS configuration files mod_wl_ohs.conf and apps.conf on the current node:

$ echo $CONTEXT_FILE
$ perl $FND_TOP/patch/115/bin/txkSetAppsConf.pl \
        -contextfile=$CONTEXT_FILE \
        -configoption=addMS -oacore=node_name.domain.com:7208

Log file shall say mod_wl_ohs.conf and apps.conf were generated successfully.
$ egrep -i "Error|Failed|Warning|ORA-" $APPLRGF/TXK/txkSetAppsConf_*.log

$ cd $ADMIN_SCRIPTS_HOME
$ adapcctl.sh stop
$ adopmnctl.sh status
$ adapcctl.sh start start
$ adopmnctl.sh status

Recycle all services:
$ adstpall.sh apps/appsPWD
$ adstrtal.sh apps/appsPWD
Then, log onto Weblogic console to see two oacore servers are running.

7. Repeat steps on 2nd web/forms node. Skip this on node dedicated for concurrent jobs. 

Before adding more oacore
$ grep -i oacore_server_ports $CONTEXT_FILE
   <oacore_server_ports oa_var="s_oacore_server_ports">oacore_server2:7206</oacore_server_ports>

After adding one more oacore
$ grep -i s_oacore_nodes $CONTEXT_FILE
      <oacore_nodes oa_var="s_oacore_nodes">master_node.aetna.com:7206</oacore_nodes>
Note: it points to master_node on the 2nd node config. This could be the reason for unbalanced number of connections.

$ grep -i oacore_server_ports $CONTEXT_FILE
  <oacore_server_ports oa_var="s_oacore_server_ports">oacore_server2:7206,oacore_server4:7208</oacore_server_ports>

Again, verify it does not do anything on PATCH file system.
$ grep -i oacore_server_ports $PATCH_BASE/inst/apps/$CONTEXT_NAME/appl/admin/EBSDEV*.xml
<oacore_server_ports oa_var="s_oacore_server_ports">oacore_server2:7207</oacore_server_ports>

8.  Summary on oacore name and port:
Node1   RUN  oacore_server1:7206,   oacore_server3:7208
Node2   RUN  oacore_server2:7206,   oacore_server4:7208
After an adop CUTOVER or FS_CLONE, the change will be copied to PATCH file system. Names will be the same but use different ports:
Node1   PATCH  oacore_server1:7207,   oacore_server3:7209
Node2   PATCH  oacore_server2:7207,   oacore_server4:7209

The original idea for adding more oacore servers to our R12.2.10 instance was to address the unbalance of connection loadings between oacore_server1 and oacore_server2. But adding more oacore servers still does not resolve the issue. oacore servers on master node still get much more connections. 
The benefit is that if one OACORE is down or frozen, we can recycle it while the 2nd one is still running. That could reduce downtime on end-users.

UPDATES in 2023:
After we opened a SR with Oracle Support on OACORE connection distribution uneven, Oracle engineer provided an action plan for us to add entries to apps.conf and mod_wl_ohs.conf files which will allow for load balancing of traffic to all OACOREs.

1. Take a backup of your EBS environment
2. Connect to master_node and add oacore_server2 and oacore_server4 to the configuration:

a. Open a terminal window and connect to master node
b. Switch to the apps user
c. Source the apps environment
d. Run the commands below:

$ echo $FILE_EDITION
run
$ echo $APPL_TOP
/u02/app/EBSPROD/fs2/EBSapps/appl     <== a CUSOVER was done after oacore was added 

$ perl $FND_TOP/patch/115/bin/txkSetAppsConf.pl \
-contextfile=<CONTEXT_FILE> \
-configoption=addMS \
-oacore=2nd_node.domain.com:7207

$ perl $FND_TOP/patch/115/bin/txkSetAppsConf.pl \
-contextfile=<CONTEXT_FILE> \
-configoption=addMS \
-oacore=2nd_node.domain.com:7209

e. Restart OHS by running adapcctl.sh

3. Connect to 2nd_node and add oacore_server3 to the configuration:

a. Open a terminal window and connect to 2nd_node
b. Switch to the apps user
c. Source the apps environment
d. Run the below command:

$ perl $FND_TOP/patch/115/bin/txkSetAppsConf.pl \
-contextfile=<CONTEXT_FILE> \
-configoption=addMS \
-oacore=master_node.domain.com:7209

e. Restart OHS by running adapcctl.sh

4. Direct your load balancer team to stop sending web requests to your CONCURRENT MANAGER ONLY node.
5. Retest for the issue

The txkSetAppsConf.pl command should be run after adding apps tier nodes to your EBS environment. This is mentioned in the excerpt below from Doc ID 1383621.1 :
"If any of the managed servers from the newly added node are desired to be part of the cluster configuration on the current node, run the following command to add details of these managed servers into the OHS configuration files mod_wl_ohs.conf and apps.conf on the current node:..."

Before performing action plan from the SR (on master_node), entries in two .conf files: 
$ cd $IAS_ORACLE_HOME/instances/EBS_web_OHS1/config/OHS/EBS_web
$ grep 7209 apps.conf
BalancerMember http://master_node.domain.com:7209/OA_HTML/media
BalancerMember http://master_node.domain.com:7209/OA_HTML/classes
BalancerMember http://master_node.domain.com:7209

$ grep 7209 mod_wl_ohs.conf
WebLogicCluster master_node.domain.com:7207,master_node.domain.com:7209

$ grep 7207 apps.conf
BalancerMember http://master_node.domain.com:7207/OA_HTML/media
BalancerMember http://master_node.domain.com:7207/OA_HTML/classes
BalancerMember http://master_node.domain.com:7207

$ grep 7207 mod_wl_ohs.conf
WebLogicCluster master_node.domain.com:7207,master_node.domain.com:7209

After performing action plan from the SR (on master_node), all entries are balanced with two nodes.

$ grep 7209 apps.conf
   BalancerMember http://master_node.domain.com:7209/OA_HTML/media
   BalancerMember http://2nd_node.domain.com:7209/OA_HTML/media
   BalancerMember http://master_node.domain.com:7209/OA_HTML/classes
   BalancerMember http://2nd_node.domain.com:7209/OA_HTML/classes
   BalancerMember http://master_node.domain.com:7209
   BalancerMember http://2nd_node.domain.com:7209

$ grep 7209 mod_wl_ohs.conf
WebLogicCluster master_node.domain.com:7207,master_node.domain.com:7209,2nd_node.domain.com:7207,2nd_node.domain.com:7209

$ grep 7207 apps.conf
   BalancerMember http://master_node.domain.com:7207/OA_HTML/media
   BalancerMember http://2nd_node.domain.com:7207/OA_HTML/media
   BalancerMember http://master_node.domain.com:7207/OA_HTML/classes
   BalancerMember http://2nd_node.domain.com:7207/OA_HTML/classes
   BalancerMember http://master_node.domain.com:7207
   BalancerMember http://2nd_node.domain.com:7207

$ grep 7207 mod_wl_ohs.conf
WebLogicCluster master_node.domain.com:7207,master_node.domain.com:7209,2nd_node.domain.com:7207,2nd_node.domain.com:7209

Very similar entries in .conf files in 2nd_node, after action plan was performed on 2nd_node. 

No comments: