官术网_书友最值得收藏!

Configuring HA WebLogic cluster parameters

This recipe will cover other WebLogic cluster adjustments needed for high availability in production. The parameters are Failure Action, Panic Action, Cluster Address, and Number of Servers in Cluster Address for the cluster, and CrashRecoveryEnabled for Node Manager.

Getting ready

To change the Node Manager CrashRecoveryEnabled parameter, edit the configuration $WL_HOME/common/nodemanager/nodemanager.properties file in all machines.

The cluster parameters are changed using the Administration Console or WLST.

How to do it...

To change the Node Manager's parameter:

  1. Log in as a wls user to shell and shutdown Node Manager:
    [wls@prod01]$ ps aux | grep weblogic.NodeManager | grep -v grep | awk '{print $2}'
    <PID> 
    [wls@prod01]$ kill -9 <PID>
    
  2. Edit nodemanager.properties:
    [wls@prod01]$ vi $WL_HOME/common/nodemanager/nodemanager.properties 
    
  3. Locate the CrashRecoveryEnabled parameter and change the line:

    From:

    CrashRecoveryEnabled=false
    

    To:

    CrashRecoveryEnabled=true
    
  4. Type :wq! to save the file and exit.
  5. Start Node Manager:
    [wls@prod01]$ cd $WL_HOME/server/bin
    [wls@prod01]$ nohup ./startNodeManager.sh &
    
  6. Repeat the steps on every machine in the domain.

To change the cluster parameters:

  1. Access the Administration Console with your web browser at http://prod01.domain.local:7001/console.
  2. Click on the Lock & Edit button to start a new edit session.
  3. Expand the Environment tree on the left and click on Clusters.
  4. Click on the PROD_Cluster cluster to navigate to Configuration | General and type 4 in the Number Of Servers In Cluster Address field. Leave the Cluster Address field empty and click on the Save button.
  5. Click on the Advanced link to display extra options and then select the WebLogic Plug-in Enabled checkbox, as shown in the following screenshot:
  6. Click on the Save button.
  7. Click on the Overload tab to navigate to Configuration | Overload of PROD_Cluster.
  8. Change the Failure Action drop-down menu to Force immediate shutdown of this cluster and the Panic Action field to Exit the cluster process (as shown in the following screenshot):
  9. Click on the Save button and then the Activate Changes button.
  10. Restart all Managed Servers of the PROD_Cluster cluster.

How it works...

Failure Action and Panic Action are the WebLogic overload settings that can shutdown a Managed Server when it reaches a FAIL state or when it throws an Out of Memory (OOM) PANIC error. Both errors would leave the affected Managed Server in an inconsistent state and would probably hang or return application errors to client requests. The Node Manager monitors the Managed Servers and restarts the failed instance automatically. Unless there is an analysis of the root cause of these errors, it's recommended to enable both parameters.

CrashRecoveryEnabled is the Node Manager parameter that must be enabled so Node Manager can restart a crashed/failed WebLogic Managed Server instance automatically.

The Cluster Address, Number of Servers in Cluster Address, and WebLogic Plug-in Enabled are cluster configurations for the distribution of requests and load balancing.

Note

The Cluster Address configuration is used by the Enterprise JavaBeans (EJB) and RMI objects deployed in the cluster. Leave the Cluster Address configuration empty so the EJBs create the cluster address dynamically based on which network channel the request is received.

If the request is received on the default network channel, the cluster address is created using the default network channel listen address and listen port. If the request is received on a custom network channel, the cluster address is created using the custom network channel listen address and listen port.

There's more...

The cluster settings can also be modified through WLST.

Changing the cluster settings using WLST
  1. Log in as a wls user to shell and start WLST:
    [wls@prod01]$ $WL_HOME/common/bin/wlst.sh
    
  2. Connect to the Administration Server using wlsadmin as the user, <pwd> as the password and t3://prod01.domain.local:7001 as the server URL:
    wls:/offline> connect("wlsadmin","<pwd>","t3://prod01.domain.local:7001")
    
  3. Run the following WLST commands to create the cluster and the server instances:
    edit()
    startEdit()
    
    cd('/Clusters/PROD_Cluster')
    cmo.unSet('clusterAddress')
    cmo.setNumberOfServersInClusterAddress(4)
    cmo.setWeblogicPluginEnabled(true)
    
    cd('/Clusters/PROD_Cluster/OverloadProtection/PROD_Cluster')
    cmo.setPanicAction('system-exit')
    cmo.setFailureAction('force-shutdown')
    cmo.createServerFailureTrigger()
    
    cd('/Clusters/PROD_Cluster/OverloadProtection/PROD_Cluster/ServerFailureTrigger/PROD_Cluster')
    cmo.setMaxStuckThreadTime(600)
    cmo.setStuckThreadCount(0)
    activate()
    exit()
    
主站蜘蛛池模板: 铁岭市| 文山县| 德令哈市| 许昌县| 寿光市| 阳新县| 丰县| 武乡县| 玛纳斯县| 湘潭市| 文成县| 黄陵县| 罗山县| 迁西县| 黔西县| 温州市| 洪雅县| 唐河县| 册亨县| 吐鲁番市| 安顺市| 竹北市| 黑河市| 五指山市| 昌都县| 乌鲁木齐县| 绍兴县| 皋兰县| 伊春市| 肥城市| 麻江县| 鹤庆县| 德令哈市| 千阳县| 佛坪县| 榆林市| 琼海市| 平原县| 崇阳县| 许昌市| 南皮县|