How to check status ( State and Health ) of Managed Servers under weblogic console from linux instead of browser URL

Issue:
While accessing the EBS 12.2.13 Weblogic Console to check health status of EBS managed server the browser redirects to below error as a security restriction:
The Server is not able to service this request: [Socket:000445]Connection rejected, filter blocked Socket, weblogic.security.net.FilterException: [Security:090220]rule 2

Solution:
Connect to application from OS/Linux terminal/putty
Source EBS 12.2 Run File system environment
Last login: Mon Apr 15 09:35:16 2024
E-Business Suite Environment Information
File System Type: SINGLE
RUN File System : /d01/UAT/ebiz/fs1/EBSapps/appl
PATCH File System : NOT APPLICABLE
Non-Editioned File System : /d01/UAT/ebiz/fs_ne

DB Host: ebsuat.erp.com Service/SID: UAT
Sourcing the RUN File System …
[appluat@ebsuat ~]$ echo $FMW_HOME
/d01/UAT/ebiz/fs1/FMW_Home
[appluat@ebsuat ~]$
[appluat@ebsuat bin]$
[appluat@ebsuat bin]$ hostname
[appluat@ebsuat bin]$ ebsuat.erp.com
[appluat@ebsuat bin]$
[appluat@ebsuat bin]$ cat $CONTEXT_FILE | grep s_wls_adminport
[appluat@ebsuat bin]$ cat $CONTEXT_FILE | grep s_wls_adminport
7081
[appluat@ebsuat ~]$


Step 1:
Create file get_health_status.py
vi get_health_status.py

Insert below script content:

==========Start of script==================
connect(‘weblogic’, ‘<<weblogicPwd>>’, ‘t3://ebsuat.erp.com:7081’)
domainRuntime()

servers = domainRuntimeService.getServerRuntimes()
for server in servers:
print(‘Server: ‘ + server.getName())
print(‘Health State: ‘ + str(server.getHealthState()))
disconnect()
exit()

=========== End of Script ===============
Step 2: Run below command with py script file we just created
$FMW_HOME/oracle_common/common/bin/wlst.sh get_health_status.py

Recorded Session:
[appluat@ebsuat ~]$ $FMW_HOME/oracle_common/common/bin/wlst.sh new.py

CLASSPATH=/d01/UAT/ebiz/fs1/FMW_Home/patch_wls1036/profiles/default/sys_manifest_classpath/weblogic_patch.jar:/d01/UAT/ebiz/fs1/EBSapps/comn/util/jdk64/lib/tools.jar:/d01/UAT/ebiz/fs1/FMW_Home/wlserver_10.3/server/lib/weblogic_sp.jar:/d01/UAT/ebiz/fs1/FMW_Home/wlserver_10.3/server/lib/weblogic.jar:/d01/UAT/ebiz/fs1/FMW_Home/modules/features/weblogic.server.modules_10.3.6.0.jar:/d01/UAT/ebiz/fs1/FMW_Home/wlserver_10.3/server/lib/webservices.jar:/d01/UAT/ebiz/fs1/FMW_Home/modules/org.apache.ant_1.7.1/lib/ant-all.jar:/d01/UAT/ebiz/fs1/FMW_Home/modules/net.sf.antcontrib_1.1.0.0_1-0b2/lib/ant-contrib.jar:/d01/UAT/ebiz/fs1/EBSapps/comn/util/jdk32/lib/dt.jar:/d01/UAT/ebiz/fs1/EBSapps/comn/util/jdk32/lib/tools.jar:/d01/UAT/ebiz/fs1/EBSapps/comn/util/jdk32/jre/lib/rt.jar:/d01/UAT/ebiz/fs1/EBSapps/comn/shared-libs/ebs-3rdparty/WEB-INF/lib/ebs3rdpartyManifest.jar:/d01/UAT/ebiz/fs1/FMW_Home/Oracle_EBS-app1/shared-libs/ebs-fmw/WEB-INF/lib/ebsFMWManifest.jar:/d01/UAT/ebiz/fs1/FMW_Home/Oracle_EBS-app1/shared-libs/ebs-appsborg/WEB-INF/lib/ebsAppsborgManifest.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/modules/oracle.uix_11.1.1/uix2.jar:/d01/UAT/ebiz/fs1/EBSapps/comn/java/classes:/d01/UAT/ebiz/fs1/EBSapps/10.1.2/forms/java:/d01/UAT/ebiz/fs1/EBSapps/10.1.2/forms/java/frmall.jar:/d01/UAT/ebiz/fs1/EBSapps/10.1.2/jlib/ewt3.jar:/d01/UAT/ebiz/fs1/EBSapps/10.1.2/j2ee/OC4J_BI_Forms/applications/formsapp/formsweb/WEB-INF/lib/frmsrv.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/modules/oracle.jrf_11.1.1/jrf-wlstman.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/lib/adfscripting.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/lib/adf-share-mbeans-wlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/lib/mdswlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/auditwlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/igfwlsthelp.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/jps-wlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/jps-wls-trustprovider.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/jrf-wlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/oamap_help.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/oamAuthnProvider.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/ossoiap_help.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/ossoiap.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/ovdwlsthelp.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/sslconfigwlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/oracle_common/common/wlst/resources/wsm-wlst.jar:/d01/UAT/ebiz/fs1/FMW_Home/utils/config/10.3/config-launch.jar::/d01/UAT/ebiz/fs1/FMW_Home/wlserver_10.3/common/derby/lib/derbynet.jar:/d01/UAT/ebiz/fs1/FMW_Home/wlserver_10.3/common/derby/lib/derbyclient.jar:/d01/UAT/ebiz/fs1/FMW_Home/wlserver_10.3/common/derby/lib/derbytools.jar::

Initializing WebLogic Scripting Tool (WLST) …
Welcome to WebLogic Server Administration Scripting Shell
Type help() for help on available commands
Connecting to t3://ebsuat.erp.com:7081 with userid weblogic …
Successfully connected to Admin Server ‘AdminServer’ that belongs to domain ‘EBS_domain’.
Warning: An insecure protocol was used to connect to the
server. To ensure on-the-wire security, the SSL port or
Admin port should be used instead.
Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.
For more help, use help(domainRuntime)

Server State Health

oacore_server2 RUNNING HEALTH_OK
oafm_server1 RUNNING HEALTH_OK
AdminServer RUNNING HEALTH_OK
forms_server1 RUNNING HEALTH_OK
oacore_server1 RUNNING HEALTH_OK

Disconnected from weblogic server: AdminServer
Exiting WebLogic Scripting Tool.

This entry was posted in Uncategorised. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *