Difference between IBM & SUN JVM/ Porting J2EE applications

Posted by Sagar Patil

IBM’s JVM is written to meet the specs as documented by Sun.  IBM runs the test suit against their JVM to make sure that what should occur does occur.  They (IBM) feel that their code performs the requested functions more efficiently and thus performs better while still providing the same results. IBM may throw one error exception while Sun’s may throw another.

A good discussion on IBM & SUN JVM is at http://forums.anandtech.com/archive/index.php/t-1958785.html

Can I pick up an EAR/WAR file from websphere and install at compatible J2EE application server?
“If” the EAR is compatible, then you can deploy it either on a WebSphere Application Server, or some other J2EE application server.  However, that is a big “if.” Does the application make use of any WebSphere specific settings, or resources?  That might be hard to tell if the application isn’t thoroughly documented.

Having said that JVMs are going to be different. On source it is IBM JVM while at destination (Tomcat/Glassfish) it is SUN JVM.
The WebSphere Application Server environment adds a number of class files to allow applications to access specific resources and capabilities of the WebSphere environment.  This is true even for the Solaris Operating System where the JVM used by WebSphere is a Sun JVM. In addition to these “extra” jar files, are there differences between the JVM’s.

A specific J2EE application server may have its own unique classes that do not exist in other J2EE environments.  So if you developed an application under “J2EE ServerA” and used specific functions/classes that are unique to “J2EE ServerA”, then you can’t just deploy to “J2EE ServerB”.

Are there any utilitiees to test portability of a J2EE application?
The idea behind having a J2EE compliant implementation is so that applications may be easily moved from one environment to another.  So, as long as both the source and target application server environments are J2EE compliant, this “should” be possible.  However, again we are forced to revisit the questions:

But there must be something from these vendors looking for portability of application to grab customers on their platform.

https://migrate2glassfish.dev.java.net/
http://blogs.sun.com/theaquarium/entry/websphere_to_glassfish_migration_example
http://blogs.sun.com/alexismp/entry/glassfish_equivalent_to_websphere_s

IBM do provide a utility to help people migrate their utilities to WebSphere:
http://www.IBM.com/developerworks/websphere/downloads/migration_toolkit.html

Demo is available here

Dataguard : Applying CPU(Cirital Patch Update) to Dataguard Environment

Posted by Sagar Patil

I have One Primary database and 2 Physical Standby Databases under RHEL 5. Here is a process to patch them with JULY CPU update “Critical Patch Update Release 10.2.0.4 for UNIX Released July 13, 2010”

At Primary Site
SQL> show parameter dg_broker_start

NAME                                 TYPE        VALUE
———————————— ———– ——————————
dg_broker_start                      boolean     TRUE

SQL> alter system switch logfile;
System altered.

Make sure the Logs are shipped and both Standby Database and applied. Following SQLs could be used to locate the log sequences on all databases.

Locate Primary Log Sequence :   Select Archived_Seq# From V$Archive_Dest_Status Where Dest_Id=1;

Locate Standby Log Sequence :  Select Archived_Seq#, Applied_Seq# From V$Archive_Dest_Status Where Dest_Id=2;

Locate DR Log Sequence :   Select Archived_Seq#, Applied_Seq# From V$Archive_Dest_Status Where Dest_Id=3;

Find out existing Patch details using following queries :

SELECT comments, action_time, id “PATCH_NUMBER”, version FROM sys.registry$history WHERE action = ‘CPU’;

COMMENTS ACTION_TIME PATCH_NUMBER VERSION
view recompilation 42:39.2 6452863
view recompilation 59:20.3 6452863
view recompilation 23:58.7 6452863
view recompilation 56:19.9 6452863

SELECT comments, action_time, id PATCH_NUMBER, version FROM sys.registry$history

COMMENTS ACTION_TIME PATCH_NUMBER VERSION
Upgraded from 10.2.0.1.0 40:28.8 10.2.0.4.0
CPUApr2009 46:06.0 4 10.2.0.4
view recompilation 42:39.2 6452863
CPUOct2009 56:35.7 6 10.2.0.4
view recompilation 59:20.3 6452863
CPUJan2010 01:47.4 6 10.2.0.4
view recompilation 23:58.7 6452863

Backup Primary database  & then shutdown Primary Database

SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

Take TAR backup of ORACLE_HOME

$tar -czvf ORACLE_BKUP.tgz $ORACLE_HOME

At Standby & DR Site
[oracle@Standby bdump]$ sqlplus /nolog

SQL*Plus: Release 10.2.0.4.0 – Production on Mon Mar 29 18:26:46 2010

Copyright (c) 1982, 2007, Oracle.  All Rights Reserved.

SQL> conn / as sysdba
Connected.
SQL> select NAME,open_mode,GUARD_STATUS,DATABASE_ROLE from v$database;

NAME      OPEN_MODE  GUARD_S DATABASE_ROLE
——— ———- ——- —————-
ROD  MOUNTED    NONE    PHYSICAL STANDBY

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down. (Took 5 mins + to shutdown)

Take TAR backup of Standby ORACLE_HOME

$tar -czvf ORACLE_BKUP.tgz $ORACLE_HOME

[oracle@ ~]$ lsnrctl stop LISTENER
[oracle@ ~]$ ps -ef | grep oracle
oracle    3861  3802  0 18:45 pts/0    00:00:00 -bash
oracle    7309  7287  0 20:30 pts/1    00:00:01 -bash
oracle    8907  7309  0 21:19 pts/1    00:00:00 ps -ef
oracle    8908  7309  0 21:19 pts/1    00:00:00 grep oracle

cd $ORACLE_HOME/patches
[oracle@patches]$ ls -lrt
total 12
drwxr-xr-x  5 oracle oracle 4096 Feb 15  2010 9119284
drwxr-xr-x 37 oracle oracle 4096 Feb 15  2010 9119226
drwxr-xr-x 42 oracle oracle 4096 Jul  6 16:53 9655017

[oracle@patches]$ cd 9655017

[oracle@patches]$ $ORACLE_HOME/OPatch/opatch napply -skip_subset -skip_duplicate

Stop here go back to Primary now

oracle@ ~]$ lsnrctl stop LISTENER
[oracle@ ~]$ ps -ef | grep oracle
oracle    3861  3802  0 18:45 pts/0    00:00:00 -bash
oracle    7309  7287  0 20:30 pts/1    00:00:01 -bash
oracle    8907  7309  0 21:19 pts/1    00:00:00 ps -ef
oracle    8908  7309  0 21:19 pts/1    00:00:00 grep oracle

cd $ORACLE_HOME/patches
[oracle@patches]$ ls -lrt
total 12
drwxr-xr-x  5 oracle oracle 4096 Feb 15  2010 9119284
drwxr-xr-x 37 oracle oracle 4096 Feb 15  2010 9119226
drwxr-xr-x 42 oracle oracle 4096 Jul  6 16:53 9655017

[oracle@patches]$ cd 9655017

[oracle@patches]$ $ORACLE_HOME/OPatch/opatch napply -skip_subset -skip_duplicate

For each database instance running on the Oracle home being patched, connect to the database using SQL*Plus.

cd $ORACLE_HOME/rdbms/admin
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> STARTUP
SQL> @catbundle.sql cpu apply
SQL> — Execute the next statement only if this is the first 10.2.0.4 CPU applied in the Oracle home.
SQL> @utlrp.sql
SQL> QUIT

Run the view recompilation script. Note that this script is run with the database in upgrade mode, which restricts connections as SYSDBA.

cd $ORACLE_HOME/cpu/view_recompile
sqlplus /nolog
SQL> CONNECT / AS SYSDBA
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP UPGRADE
SQL> @view_recompile_jan2008cpu.sql
SQL> SHUTDOWN;
SQL> STARTUP;
SQL> QUIT

Startup Primary Listener

At Standby & DR Site

SQL> startup nomount;
ORACLE instance started.
Total System Global Area 2147483648 bytes
Fixed Size 2030296 bytes
Variable Size 503317800 bytes
Database Buffers 1627389952 bytes
Redo Buffers 14745600 bytes

SQL> show parameter dg_broker_start
NAME TYPE VALUE
———————————— ———– ——————————
dg_broker_start boolean TRUE

SQL> alter database mount standby database;
Database altered.

SQL> recover managed standby database disconnect from session;
Media recovery complete.

Startup Listeners and monitor alrtlogs at Stanby servers for Log Recovery

Redo Shipping Client Connected as PUBLIC
— Connected User is Valid
RFS[3]: Assigned to RFS process 7804
RFS[3]: Identified database type as ‘physical standby’
RFS[3]: Archived Log: ‘/u06/oradata/prod/arch/1_65479_684936861.arc’
Wed Sep 29 22:08:08 2010
Media Recovery Log /u06/oradata/prod/arch/1_65469_684936861.arc
Wed Sep 29 22:08:08 2010
RFS[1]: Archived Log: ‘/u06/oradata/prod/arch/1_65477_684936861.arc’
Wed Sep 29 22:08:09 2010
Media Recovery Log /u06/oradata/prod/arch/1_65470_684936861.arc
Media Recovery Log /u06/oradata/prod/arch/1_65471_684936861.arc
Media Recovery Log /u06/oradata/prod/arch/1_65472_684936861.arc
Media Recovery Log /u06/oradata/prod/arch/1_65473_684936861.arc
Media Recovery Log /u06/oradata/prod/arch/1_65474_684936861.arc
Media Recovery Log /u06/oradata/prod/arch/1_65475_684936861.arc
Media Recovery Log /u06/oradata/prod/arch/1_65476_684936861.arc

Finally run following commands to make sure logs are appied at standbydatabases:

Locate Primary Log Sequence :   Select Archived_Seq# From V$Archive_Dest_Status Where Dest_Id=1;

Locate Standby Log Sequence :  Select Archived_Seq#, Applied_Seq# From V$Archive_Dest_Status Where Dest_Id=2;

Locate DR Log Sequence :   Select Archived_Seq#, Applied_Seq# From V$Archive_Dest_Status Where Dest_Id=3;

Sample log files attached  opatch_history-1.txt & opatch.log

Websphere: startManager.sh doesn't work while startServer.sh does

Posted by Sagar Patil

[Dmgr]$ /opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/bin/startManager.sh

ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/logs/dmgr/startServer.log
ADMU0128I: Starting tool with the Dmgr profile
ADMU3100I: Reading configuration for server: dmgr
ADMU0111E: Program exiting with error: java.io.FileNotFoundException:
/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/config/cells/Cell/nodes/Manager/servers/dmgr/server.xml
(No such file or directory)
ADMU1211I: To obtain a full trace of the failure, use the -trace option.
ADMU0211I: Error details may be seen in the file:
/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/logs/dmgr/startServer.log

Log /opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/logs/dmgr/startServer.log has tonnes of errors

[10/12/10 7:14:19:045 BST] 0000000a AdminTool     A   ADMU0111E: Program exiting with error: java.io.FileNotFoundException:
/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/config/cells/Cell/nodes/Manager/servers/dmgr/server.xml (No such file or directory)
at java.io.FileInputStream.<init>(FileInputStream.java:135)
at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createFileInputStream(URIConverterImpl.java:469)
at org.eclipse.emf.ecore.resource.impl.URIConverterImpl.createInputStream(URIConverterImpl.java:431)
at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:897)
at org.eclipse.wst.common.internal.emf.resource.CompatibilityXMIResourceImpl.load(CompatibilityXMIResourceImpl.java:259)
at com.ibm.websphere.resource.WASResourceImpl.load(WASResourceImpl.java:61)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:249)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:264)
at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:390)
at com.ibm.websphere.resource.WASResourceSetImpl.getResource(WASResourceSetImpl.java:158)
at com.ibm.websphere.resource.WASResourceSetImpl.getResource(WASResourceSetImpl.java:143)
at com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:326)
at com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:299)
at com.ibm.ws.runtime.service.ConfigRootImpl.getResource(ConfigRootImpl.java:275)
at com.ibm.ws.management.tools.WsServerLauncher.initializeRepositoryAndLauncher(WsServerLauncher.java:397)
at com.ibm.ws.management.tools.WsServerLauncher.runTool(WsServerLauncher.java:265)
at com.ibm.ws.management.tools.AdminTool.executeUtility(AdminTool.java:264)
at com.ibm.ws.management.tools.WsServerLauncher.main(WsServerLauncher.java:120)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:618)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:263)

System doesn’t have  “/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/config/cells/Cell/nodes/Manager/servers/dmgr/server.xml” but have
“/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/config/cells/Cell/nodes/Manager/servers/Dmgr/server.xml”

StartServer Dmgr command works fine. Note it’s “Dmgr” instead of “dmgr” here

$ /opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/bin/startServer.sh Dmgr
ADMU0116I: Tool information is being logged in file
/opt/IBM/WebSphere/AppServer/profiles/Profile/Dmgr/logs/Dmgr/startServer.log
ADMU0128I: Starting tool with the Dmgr profile
ADMU3100I: Reading configuration for server: Dmgr
ADMU3200I: Server launched. Waiting for initialization status.
ADMU3000I: Server Dmgr open for e-business; process id is 2264

$pwd
/opt/IBM/WebSphere/AppServer/profiles/Profile

[Profile]$ ls -lrt
drwxr-xr-x 17 was61 web  12288 Sep 27 08:28 Node
drwxr-xr-x 18 was61 web   4096 Jul  4  2011 Dmgr

Solution :

Edit “/opt/IBM/WebSphere/AppServer/bin/startManager.sh” and alter D_DMGR from dmgr to Dmgr

#Common args…
D_DMGR=”dmgr” changed to “Dmgr”
D_ARGS=”-Dws.ext.dirs=”$WAS_EXT_DIRS” $DELIM -Dwas.install.root=”$WAS_HOME” $DELIM -Djava.util.logging.manager=com.ibm.ws.bootstrap.WsLogManager $DELIM -Djava.util.logging.configureByServer=true”

Edit “/opt/IBM/WebSphere/AppServer/bin/stopManager.sh” and alter line 126

$SHELL “$CONFIG_ROOT” “$WAS_CELL” “$WAS_NODE” dmgr -dmgr “$@”
to
$SHELL “$CONFIG_ROOT” “$WAS_CELL” “$WAS_NODE” Dmgr -dmgr “$@”

Installing application(EAR/WAR) thru wsadmin

Posted by Sagar Patil

The isAppReady command returns a value of true if the system is ready to start the application, or a value of false if the system is not ready to start the application, as the following examples display:

[was61@waslogs]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -conntype SOAP -lang jython
WASX7209I: Connected to process “dmgr” on node Prod_Node_Manager using SOAP connector;  The type of process is: DeploymentManagerWASX7031I: For help, enter: “print Help.help()”
wsadmin>AdminApp.isAppReady(‘application1’);

ADMA5071I: Distribution status check started for application prpc_j2ee14.
WebSphere:cell=Prod_Node_Cell,node=Prod_Node_Node01,distribution=true,expansion=notprocessing
ADMA5011I: The cleanup of the temp directory for application prpc_j2ee14 is complete.
ADMA5072I: Distribution status check completed for application prpc_j2ee14.
‘true’

getDeployStatus command to display additional information about the binary file expansion status, as the following examples display:

[was61@Prod_Node waslogs]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -conntype SOAP -lang jython
WASX7209I: Connected to process “dmgr” on node Prod_Node_Manager using SOAP connector;  The type of process is: DeploymentManager
wsadmin>AdminApp.getDeployStatus(‘application1’);
ADMA5071I: Distribution status check started for application application.
WebSphere:cell=Prod_Node_Cell,node=Prod_Node_Node01,distribution=true,expansion=notprocessing
ADMA5011I: The cleanup of the temp directory for application application is complete.
ADMA5072I: Distribution status check completed for application application.
‘WebSphere:cell=Prod_Node_Cell,node=Prod_Node_Node01,distribution=true,expansion=notprocessing’

Let’s deploy an Application called “application1″

1. wsadmin>AdminApp.update(‘application1’, ‘app’, ‘[-operation update -contents /tmp/Application1.ear -usedefaultbindings -nodeployejb ]’);

ADMA0073W: Custom permissions are found in the [(com.ibm.websphere.security.WebSphereRuntimePermission AdminPermission), (com.ibm.oti.shared.SharedClassPermission

// One cannot grant permissions to code outside of the deployed application via the WAS policy
ADMA5017I: Uninstallation of Application1 started.
ADMA5104I: The server index entry for WebSphere:cell=server_Cell,node=server_Node01 is updated successfully.
ADMA5106I: Application Application1 uninstalled successfully.
ADMA5016I: Installation of Application1 started.
ADMA5001I: The application binaries are saved in /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/wstemp/Script12b3ee78983/workspace/cells/server_Cell/applications/Application1.ear/Application1.ear
ADMA5005I: The application Application1 is configured in the WebSphere Application Server repository.
SECJ0400I: Successfuly updated the application Application1 with the appContextIDForSecurity information.
ADMA5011I: The cleanup of the temp directory for application Application1 is complete.
ADMA5013I: Application Application1 installed successfully.

2. wsadmin>AdminConfig.save();


wsadmin>AdminApp.update(‘prpc_j2ee14’, ‘app’, ‘[-operation update -contents /tmp/prpc_j2ee14.ear -usedefaultbindings -nodeployejb ]’);
ADMA0073W: Custom permissions are found in the [(com.ibm.websphere.security.WebSphereRuntimePermission AdminPermission), (com.ibm.oti.shared.SharedClassPermission com.pega.pegarules.internal.bootstrap.PRBaseLoader read,write), (com.ibm.oti.shared.SharedClassPermission com.pega.pegarules.bootstrap.loader.PRAppLoader read,write), (com.ibm.oti.shared.SharedClassPermission com.pega.jasper.PegaURLClassLoader read,write), (com.ibm.websphere.security.WebSphereRuntimePermission accessRuntimeClasses)] policy file. Custom permissions can compromise the integrity of Java 2 Security.
WASX7327I: Contents of was.policy file:
// was.policy
// $Id: was.policy,v 1.1.4.1 2008/05/16 19:26:53 olsok Exp $
// ============================================================================
// 16-May-08    olsok           Bug-14175       always enable SharedClassPermission
//                                                                              enable ManagementPermission for JVM memory monitoring
// 08-Jun-07    olsok           Code-323        update for PegaRULES 5.4
// 15-Nov-05    ablal           R-18775         moved moved connectorComponent permissions into ra1-5.xml
//                                                                              after installing WS 6.0.2.3
// 14-Sep-05    GajnJ                                   Add write/delete privileges for the root temp dir
// 15-Aug-05    olsok           R-18694         adapt for WebSphere 6.0.2
// 12-Aug-05    olsok           R-18694         adjusted based on classloader changes
// 11-Aug-05    olsok           R-18694         configure PegaRULES permissions

// The PegaRULES polices coded in this file assume that the PegaRULES
// application is deployed as a standard ear file in the standard WebSphere
// location.
//
// PegaRULES policies use the following variables that should be supplied
// as Java system properties at runtime:
//              java.home                               (Standard Java property)
//              java.io.tmpdir                  (Standard Java property)
//              user.home                               (Standard Java property)
//              was.install.root                (Standard WebSphere property)
//              was.module.path                 (Standard WebSphere embedded symbol)
//              app.installed.path              (Standard WebSphere embedded symbol)
//              pega.tmpdir                             path to writable temp directory that PegaRULES
//                                                              should use (as specified in prconfig.xml), using
//                                                              host-specific path delimiters

// ========================================================================================
// PegaRULES V5.4 configuration follows (08-Jun-2007)
// (assumes use of jdbc drivers supplied by WebSphere)

// Note – with PegaRULES 5.4, must use “application” rather than “jars”.
grant codebase “file:${application}” {
// the following needed to resolve host ip address – these permissions
// are automatically provided by WebSphere even if not listed here
//permission java.net.SocketPermission “localhost:1024-“, “listen,resolve”;
//permission java.net.SocketPermission “*”, “connect,resolve”;

// the following needed to access properties that control startup and configuration
permission java.util.PropertyPermission “*”, “read,write”;

// the following needed for MBean support
permission com.ibm.websphere.security.WebSphereRuntimePermission “AdminPermission”;
permission javax.management.MBeanTrustPermission “register”;
permission javax.management.MBeanServerPermission “findMBeanServer”;
permission javax.management.MBeanPermission “*#*[]”, “queryNames”;
permission javax.management.MBeanPermission “com.pega.*#*[]”, “registerMBean”;
permission javax.management.MBeanPermission “com.pega.*#*[]”, “isInstanceOf”;
permission javax.management.MBeanPermission “com.pega.*#*[]”, “getMBeanInfo”;
permission javax.management.MBeanPermission “com.pega.*#*[]”, “unregisterMBean”;
permission javax.management.MBeanPermission “com.pega.*#*[]”, “addNotificationListener”;

// the following needed to monitor JVM events for low memory alerts / tracebacks
permission java.lang.management.ManagementPermission “control”;

// the following permissions may be granted to PRBaseLoader, PRAppLoader and other URL-based classloaders within PegaRULES to
// avoid a security exception being reported in the console log when the respective classloader constructor is invoked. The
// PRBaseLoader and PRAppLoader are explicitly coded to avoid class sharing via this mechanism in the IBM JVM but there is
// no mechanism provided by IBM for programatically disabling the use of shared classes in a classloader that
// extends URLClassLoader.
permission com.ibm.oti.shared.SharedClassPermission “com.pega.pegarules.internal.bootstrap.PRBaseLoader”, “read,write”;
permission com.ibm.oti.shared.SharedClassPermission “com.pega.pegarules.bootstrap.loader.PRAppLoader”, “read,write”;
// Be sure to grant the permission to the classloader used within Jasper – a new instance of this classloader is
// created for each stream, and the lack of the shared class permission will fill the log file with security exceptions
permission com.ibm.oti.shared.SharedClassPermission “com.pega.jasper.PegaURLClassLoader”, “read,write”;

// the following needed by PRBaseLoader, PRAppLoader and other classloaders within PegaRULES
permission java.lang.reflect.ReflectPermission “suppressAccessChecks”;
permission java.util.logging.LoggingPermission “control”;
permission java.lang.RuntimePermission “createClassLoader”;
permission java.lang.RuntimePermission “accessDeclaredMembers”;
permission java.lang.RuntimePermission “getClassLoader”;
permission java.lang.RuntimePermission “getProtectionDomain”;
permission java.security.SecurityPermission “getPolicy”;
permission java.lang.RuntimePermission “accessClassInPackage.sun.util.logging.resources”;

// the following needed by Jasper and PegaRULES classloaders
permission java.lang.RuntimePermission “setContextClassLoader”;

// the following needed by Jasper
permission java.lang.RuntimePermission “setIO”;

// the following needed by performance timers
permission java.lang.RuntimePermission “accessClassInPackage.sun.misc”;         // when using Java 5 management APIs
permission java.lang.RuntimePermission “sun.misc.Perf.getPerf”;
// (WebSphere will not substitute app.installed.path in a RuntimePermission, only a FilePermission
// so the permission grant to load the library cannot be restricted to the single library we require.)
permission java.lang.RuntimePermission “loadLibrary.*”;
//permission java.lang.RuntimePermission “loadLibrary.${app.installed.path}${/}APP-INF${/}binredist${/}x86${/}pr3native.dll”;
//permission java.lang.RuntimePermission “loadLibrary.${app.installed.path}${/}APP-INF${/}binredist${/}ppc${/}pr3native.so”;
//permission java.lang.RuntimePermission “loadLibrary.${app.installed.path}${/}APP-INF${/}binredist${/}sparc${/}pr3native.so”;

// the following needed by LibraryUtil
permission java.lang.RuntimePermission “accessClassInPackage.sun.reflect”;

// the following needed by Log4J asynch appenders and resource adapter timer thread
permission java.lang.RuntimePermission “modifyThreadGroup”;
permission java.lang.RuntimePermission “modifyThread”;

// the following needed for server identification display
permission com.ibm.websphere.security.WebSphereRuntimePermission “accessRuntimeClasses”;
permission java.io.FilePermission “${was.install.root}”, “read”;
permission java.io.FilePermission “${was.install.root}${/}-“, “read”;

// WebSphere establishes a protection domain based on the jar file in which the
// class performing the operation resides, and does not grant permission to
// read other jar files under the deployment. The following addresses that issue.
permission java.io.FilePermission “${app.installed.path}${/}-“, “read”;                 // IMPLIED by was.install.root read permission

// the following needed to probe for user-specific prconfig/prlogging files
permission java.io.FilePermission “${user.home}${/}*”, “read”;

// the following needed for access to relocated temp and root directories
permission java.io.FilePermission “${pega.tmpdir}”, “read,write,delete”;
permission java.io.FilePermission “${pega.tmpdir}${/}-“, “read,write,delete”;

// the following needed for WebSphere SQL/Server jdbc drivers
permission java.io.FilePermission “${java.io.tmpdir}${/}-“, “read,write,delete”;

// the following needed for the embedded Eclipse compiler — IMPLIED by was.install.root read permission provided that java.home is under was.install.root
//permission java.io.FilePermission “${java.home}”, “read”;
//permission java.io.FilePermission “${java.home}${/}-“, “read”;

// needed when using container managed security
permission javax.security.auth.AuthPermission “getSubject”;

};

// One cannot grant permissions to code outside of the deployed application via the WAS policy
// file. PRClassLoader uses a set of hard-coded permissions for all (assembled/generated) code
// loaded by it.

ADMA5017I: Uninstallation of prpc_j2ee14 started.
ADMA5104I: The server index entry for WebSphere:cell=eugbbopg03lt_Cell,node=eugbbopg03lt_Node01 is updated successfully.
ADMA5102I: The configuration data for prpc_j2ee14 from the configuration repository is deleted successfully.
ADMA5011I: The cleanup of the temp directory for application prpc_j2ee14 is complete.
ADMA5106I: Application prpc_j2ee14 uninstalled successfully.
ADMA5016I: Installation of prpc_j2ee14 started.
ADMA5058I: Application and module versions are validated with versions of deployment targets.
ADMA5005I: The application prpc_j2ee14 is configured in the WebSphere Application Server repository.
ADMA5053I: The library references for the installed optional package are created.
ADMA5005I: The application prpc_j2ee14 is configured in the WebSphere Application Server repository.
ADMA5001I: The application binaries are saved in /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/wstemp/Script12b3ee78983/workspace/cells/eugbbopg03lt_Cell/applications/prpc_j2ee14.ear/prpc_j2ee14.ear
ADMA5005I: The application prpc_j2ee14 is configured in the WebSphere Application Server repository.
SECJ0400I: Successfuly updated the application prpc_j2ee14 with the appContextIDForSecurity information.
ADMA5011I: The cleanup of the temp directory for application prpc_j2ee14 is complete.
ADMA5013I: Application prpc_j2ee14 installed successfully.

wsadmin>AdminConfig.save();

Jython script to pull out stats from websphere

Posted by Sagar Patil

Currently I have number of websphere 6.1 instances under RHEL 5.3 but not a tool like hyperic, wily introscope to monitor them actively. I started using wsadmin scripts to pull out stats thru wsadmin.

I am basically trying to get same details thru wsadmin which I could thru NAGIOS plugin. Here is a sample output from NAGIOS.

Monitor JVM heapSize :
JVM heapsize is provided for the entire server. It is measured as: percent used/maximum configured
To Monitor, check_was -s heapsize -w 80 -c 90 -p <server name=””>
[was61@Server1 check_was-0.3]$ ./check_was -s heapsize -w 80 -c 90 -p server_member1
OK – heapsize: 1048576/2097152 (50.0%)|heapsize=50.0%;80;90;

MonitorLiveSessions :
Live session usage can be monitored for the entire server (all hosts) or with a named host. It is measured as: Number of live sessions

[was61@Server1 check_was-0.3]$ ./check_was -s sessions -w 200 -c 400 -p server_member1
OK – live sessions: total 0, default_hostCTI 0, default_hostprsysmgmt 0, default_hostprweb 0, default_hostprdbutil 0|total=0.0;200;400; default_hostcti=0.0;200;400; default_hostprsysmgmt=0.0;200;400; default_hostprweb=0.0;200;400; default_hostprdbutil=0.0;200;400;

MonitorJdbcConnectionPools:
JDBC connection pool usage can be monitored for the entire server (all connection pools) or with a named connection pool. It is measured as: percent used/maximum configured

[was61@Server1 check_was-0.3]$ ./check_was -s connectionpool -w 80 -c 90 -p server_member
OK – connection pool size: Oracle JDBC Driver 5/100 (5.0%)|oraclejdbcdriver=5.0%;80;90;

MonitorThreadPools :
Thread pool usage can be monitored for the entire server (all thread pools) or with a named thread pool. It is measured as: percent used/maximum configured

[was61@Server1 check_was-0.3]$ ./check_was -s threadpool -w 80 -c 90 -p server_member1
CRITICAL – thread pool size: WebContainer 4/100 (4.0%), SoapConnectorThreadPool 3/5 (60.0%), SIBFAPInboundThreadPool 0/50 (0.0%), HAManager.thread.pool 2/2 (100.0%), MessageListenerThreadPool 0/50 (0.0%), ORB.thread.pool 0/50 (0.0%), SIBFAPThreadPool 2/50 (4.0%), ProcessDiscovery 1/2 (50.0%), TCPChannel.DCS 3/20 (15.0%)|webcontainer=4.0%;80;90; soapconnectorthreadpool=60.0%;80;90; sibfapinboundthreadpool=0.0%;80;90; hamanager_thread_pool=100.0%;80;90; messagelistenerthreadpool=0.0%;80;90; orb_thread_pool=0.0%;80;90; sibfapthreadpool=4.0%;80;90; processdiscovery=50.0%;80;90; tcpchannel_dcs=15.0%;80;90;</server>

Attached is a python script which will return similar results
Purpose: wsadmin script used to display user specified information about
         WebSphere Application Server resources.\n
Version: %(version)s
Updated: %(updated)s\n
  Usage: %(cmdName)s [options]\n
Required switches/options:
  -i | --info       <value> = Type of information being requested
  -s | --serverName <value> = Target serverName\n
Optional switches/options:
  -n | --nodeName   <value> = Target nodeName\n
Information types/values:
  connectionpool - Display Connection Pool details
  heapsize       - Display Heap Size details
  threadpool     - Display Thread Pool details
  sessions       - Display Session Details\n
Notes:
- Long form option values may be separated/delimited from their associated
  identifier using either a space, or an equal sign ('=').\n
- Short form option values may be sepearated from their associated letter
  using an optional space.\n
- Text containing blanks must be enclosed in double quotes.\n
Examples:
  wsadmin -f %(cmdName)s.py -i heapsize -s server1 -n node01\n'''
[was61@Server1 was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check_was.py -i heapsize -s Server1  server_member2
WASX7209I: Connected to process “dmgr” on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: “[-i, heapsize, -s, Server1server_member2]”
heapsize: node=Server1_Node01  server=Server1server_member2  used=1027.2 MB (65.69%)  free=536.5 MB
[was61@ was_scripts]$ /opt/IBM/WebSphere/AppServer/profiles/Profile01/dmgr/bin/wsadmin.sh -f /home/was61/was_scripts/check_was.py -i threadpool -s  server_member2
WASX7209I: Connected to process “dmgr” on node Server1_Manager using SOAP connector;  The type of process is: DeploymentManager
WASX7303I: The following options are passed to the scripting environment and are available as arguments that are stored in the argv variable: “[-i, threadpool, -s, server_member2]”
|             Low    High
|           Water  Water  Lower  Upper  Current
Name | integral  Mark   Mark   Bound  Bound  Usage    Ratio
————————+—————————————————–
Message.Listener.Pool |      0.0   10     10     10     50      0      0.00%
ORB.thread.pool |      0.0   10     10     10     50      0      0.00%
SIBFAPInboundThreadPool | 9090637.0    1      4      4     50      3     75.00%
SIBFAPThreadPool | 112975.0    1      4      4     50      2     50.00%
TCPChannel.DCS | 255726.0    1      5      5     20      3     60.00%
WebContainer | 12011409.0    1     10     10     50      7     70.00%
So here  “WebContainer | 12011409.0   1  10  10  50   7  70.00%” means WebContainer currently using 7 processes out of 10 allocated and they can expand upto 50 MAX.

How to Locate unix process active on a specific Port

Posted by Sagar Patil

p=$(lsof -t -i :1159); echo $p $(tr ‘\0’ ‘\n’ < /proc/$p/cmdline | tail -1)
4066 /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_Server1.oracledbasupport.co.uk_TEST/config/server.xml

p=$(lsof -t -i :1160); echo $p $(tr ‘\0’ ‘\n’ < /proc/$p/cmdline | tail -1)
8121 /u01/app/oracle/product/11.2.0/dbhome_1/oc4j/j2ee/OC4J_DBConsole_Server1.oracledbasupport.co.uk_Dev/config/server.xml

WebSphere Monitoring : Wasstat.sh to parse offline PervServletApp XML output

Posted by Sagar Patil

Please use following process when you have PerfServelet (PervServletApp application ) generated offline XML files.

Objective : I have PervServletApp application to retrieve websphere performance matrix.  The data returned is in XML format (Sample.xml) and I needed something to analyse that RAW data.

While surfing I stumbled at wasstats script https://code.google.com/p/imakerobots/wiki/wasstats

For windows WebSphere Statistic (wsstat) version please visit & scroll down to “Figure 4. The WebSphere Statistic tool” . Download windows batch script

“Currently, this script only processes JVM Runtime, Session Manager, JDBC Connection Pool and Thread Pool statistics

I created a sample.xml file using

“http://%Server_Name%:9080/wasPerfTool/servlet/perfservlet?node=Server1_Node01&server=server_member1&module=connectionPoolModule+jvmRuntimeModule+servletSessionsModule+systemModule+threadPoolModule

Sample.xml XML file used for Analysis

When ran againt RHEL- WAS 6.1 ND with wastats.py I came across some errors :

[was61@Server1 permon]$ /usr/bin/python wasstats.py sample.xml
Processing: sample.xml

INFO|server_member1:Server1_Node01:SuperSnoop#SuperSnoopWeb.war:RangeStatistic:0:0.0:1283788583899:0:0.0:LiveCount:1283528346720:N/A:0
INFO|server_member1:Server1_Node01:perfServletApp#perfServletApp.war:RangeStatistic:0:0.0:1283788583899:0:0.0:LiveCount:1283528346768:N/A:0
INFO|server_member1:Server1_Node01:prsysmgmt_war#prsysmgmt.war:RangeStatistic:0:0.0:1283788583899:0:0.0:LiveCount:1283528346376:N/A:0
CHECK|OK:HeapSize:Server1_Node01:server_member1:JVM Runtime:1048576/2097152:(50%)|1048576:0.0:1283788583896:1048576:1048576:0.0:1283528313727:2097152:1048576:KILOBYTE
INFO|server_member1:Server1_Node01:JVM Runtime:BoundedRangeStatistic:1048576:0.0:1283788583896:1048576:1048576:0.0:HeapSize:1283528313727:KILOBYTE:2097152:1048576
INFO|server_member1:Server1_Node01:JVM Runtime:CountStatistic:688987:1283788583896:UsedMemory:1283528313726:KILOBYTE
INFO|server_member1:Server1_Node01:JVM Runtime:CountStatistic:260270:1283788583896:UpTime:1283528313726:SECOND
INFO|server_member1:Server1_Node01:JVM Runtime:CountStatistic:0:1283788583899:ProcessCpuUsage:1283528313723:N/A
Traceback (most recent call last):
File “wasstats.py”, line 600, in ?
analyze( xmldoc );
File “wasstats.py”, line 202, in analyze
name = pool.getAttribute( ‘name’ );
UnboundLocalError: local variable ‘pool’ referenced before assignment

Here is a revised wasstats.py script tested on WAS 6.1  ND deployment on RHEL 5.5

[was61@Server1 permon]$ /usr/bin/python wasstats.py sample.xml
Processing: sample.xml
INFO|server_member1:Server1_Node01:SuperSnoop#SuperSnoopWeb.war:RangeStatistic:0:0.0:1283788583899:0:0.0:LiveCount:1283528346720:N/A:0
INFO|server_member1:Server1_Node01:perfServletApp#perfServletApp.war:RangeStatistic:0:0.0:1283788583899:0:0.0:LiveCount:1283528346768:N/A:0
CHECK|OK:HeapSize:Server1_Node01:server_member1:JVM Runtime:1048576/2097152:(50%)|1048576:0.0:1283788583896:1048576:1048576:0.0:1283528313727:2097152:1048576:KILOBYTE
INFO|server_member1:Server1_Node01:JVM Runtime:BoundedRangeStatistic:1048576:0.0:1283788583896:1048576:1048576:0.0:HeapSize:1283528313727:KILOBYTE:2097152:1048576
INFO|server_member1:Server1_Node01:JVM Runtime:CountStatistic:688987:1283788583896:UsedMemory:1283528313726:KILOBYTE
INFO|server_member1:Server1_Node01:JVM Runtime:CountStatistic:260270:1283788583896:UpTime:1283528313726:SECOND
INFO|server_member1:Server1_Node01:JVM Runtime:CountStatistic:0:1283788583899:ProcessCpuUsage:1283528313723:N/A
CHECK|OK:PoolSize:Server1_Node01:server_member1:Default:5/100:(5%)|10:1.303999271E9:1283788583899:1:5:5.010175044932727:1283528313697:100:5:N/A
INFO|server_member1:Server1_Node01:Default:BoundedRangeStatistic:10:1.303999271E9:1283788583899:1:5:5.010175044932727:PoolSize:1283528313697:N/A:100:5
CHECK|CRITICAL:PoolSize:Server1_Node01:server_member1:HAManager.thread.pool:2/2:(100%)|2:5.2047867E8:1283788583899:1:2:1.9997628080374719:1283528313697:2:2:N/A
INFO|server_member1:Server1_Node01:HAManager.thread.pool:BoundedRangeStatistic:2:5.2047867E8:1283788583899:1:2:1.9997628080374719:PoolSize:1283528313697:N/A:2:2
CHECK|OK:PoolSize:Server1_Node01:server_member1:Message Listener:0/50:(0%)|10:0.0:1283788583899:10:10:0.0:1283528313697:50:0:N/A
INFO|server_member1:Server1_Node01:Message Listener:BoundedRangeStatistic:10:0.0:1283788583899:10:10:0.0:PoolSize:1283528313697:N/A:50:0
CHECK|OK:PoolSize:Server1_Node01:server_member1:Object Request Broker:0/50:(0%)|10:0.0:1283788583899:10:10:0.0:1283528313697:50:0:N/A
INFO|server_member1:Server1_Node01:Object Request Broker:BoundedRangeStatistic:10:0.0:1283788583899:10:10:0.0:PoolSize:1283528313697:N/A:50:0
CHECK|OK:PoolSize:Server1_Node01:server_member1:ProcessDiscovery:1/2:(50%)|1:2.5928954E8:1283788583899:1:1:0.9966172837551133:1283528414279:2:1:N/A
INFO|server_member1:Server1_Node01:ProcessDiscovery:BoundedRangeStatistic:1:2.5928954E8:1283788583899:1:1:0.9966172837551133:PoolSize:1283528414279:N/A:2:1
CHECK|OK:PoolSize:Server1_Node01:server_member1:SIBFAPInboundThreadPool:2/50:(4%)|4:5.20254968E8:1283788583899:1:4:1.9989522093993581:1283528320064:50:2:N/A
INFO|server_member1:Server1_Node01:SIBFAPInboundThreadPool:BoundedRangeStatistic:4:5.20254968E8:1283788583899:1:4:1.9989522093993581:PoolSize:1283528320064:N/A:50:2
CHECK|OK:PoolSize:Server1_Node01:server_member1:SIBFAPThreadPool:3/50:(6%)|4:7.60451275E8:1283788583899:1:4:2.9233778697579353:1283528456297:50:3:N/A
INFO|server_member1:Server1_Node01:SIBFAPThreadPool:BoundedRangeStatistic:4:7.60451275E8:1283788583899:1:4:2.9233778697579353:PoolSize:1283528456297:N/A:50:3
CHECK|OK:PoolSize:Server1_Node01:server_member1:SoapConnectorThreadPool:2/5:(40%)|3:5.20338761E8:1283788583899:1:3:1.999267779975942:1283528319233:5:2:N/A
INFO|server_member1:Server1_Node01:SoapConnectorThreadPool:BoundedRangeStatistic:3:5.20338761E8:1283788583899:1:3:1.999267779975942:PoolSize:1283528319233:N/A:5:2
CHECK|OK:PoolSize:Server1_Node01:server_member1:TCPChannel.DCS:4/20:(20%)|5:1.041063168E9:1283788583899:1:5:3.999951342641484:1283528314941:20:4:N/A
INFO|server_member1:Server1_Node01:TCPChannel.DCS:BoundedRangeStatistic:5:1.041063168E9:1283788583899:1:5:3.999951342641484:PoolSize:1283528314941:N/A:20:4
CHECK|OK:PoolSize:Server1_Node01:server_member1:WebContainer:8/100:(8%)|10:1.832855037E9:1283788583899:1:10:7.044842168064254:1283528414119:100:8:N/A
INFO|server_member1:Server1_Node01:WebContainer:BoundedRangeStatistic:10:1.832855037E9:1283788583899:1:10:7.044842168064254:PoolSize:1283528414119:N/A:100:8
No statistics found: “DB2 Universal JDBC Driver Provider”
No statistics found: “WebSphere embedded ConnectJDBC driver for MS SQL Server”

Websphere : How to apply a Fix Pack

Posted by Sagar Patil

I will list here steps carried out to patch websphere 6.1. ND deployment (vertical cluster with 2 JVMs ) from 6.1.0.21 to 6.1.0.29

[spatil@~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

[spatil@~]$ uname -a
Linux server1.domain.com 2.6.18-194.8.1.el5 #1 SMP Wed Jun 23 10:52:51 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

1. Locate current version of websphere using versioninfo.sh
2. Download upgrade patches certified for above release
3. Shutdown IHS,Websphere Services
4. If needed download & install “IBM Update Installer”
5. Use new installer to apply fix pack to IHS,WAS & PLUG-IN
6. Startup IHS,Websphere services
7. Locate version of websphere using versioninfo.sh, it should show the new release number

While installing AppServer components, you may see that installer freezes at 76% .  To see progress of an installer monitor “Install log”

[was61@Server1 tmp]$ pwd
/opt/IBM/WebSphere/UpdateInstaller/logs/tmp
[was61@Server1 tmp]$ tail -f updatelog.txt
(Aug 21, 2011 10:38:13 AM), Install, com.ibm.ws.install.ni.ismp.actions.InstallNIFMaintenance, msg1, Installing component: startupbean, percent complete: 75%
(Aug 21, 2011 10:38:15 AM), Install, com.ibm.ws.install.ni.ismp.actions.InstallNIFMaintenance, msg1, Installing component: transaction.impl, percent complete: 76%
(Aug 21, 2011 10:38:19 AM), Install, com.ibm.ws.install.ni.ismp.actions.InstallNIFMaintenance, msg1, Installing component: uddi.bundle, percent complete: 76%

1. Locate current version of Websphere components using $PROFILE/Node/bin/versioninfo.sh , $HTTP_HOME/bin/versioninfo.sh & $HTTP_HOME/Plugins/bin/versioninfo.sh command.

[was61@Server1 bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.2, dated 6/5/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time March 31, 2010 8:29:16 PM GMT
Installation
———————————————————————
Product Directory        /opt/IBM/WebSphere/AppServer
Version Directory        /opt/IBM/WebSphere/AppServer/properties/version
DTD Directory            /opt/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory            /opt/IBM/WebSphere/AppServer/logs
Backup Directory         /opt/IBM/WebSphere/AppServer/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
ND                       installed
Installed Product
———————————————————————
Name IBM WebSphere Application Server – ND
Version                  6.1.0.21
ID                       ND
Build Level              cf210844.13
Build Date 11/6/08
———————————————————————
End Installation Status Report
———————————————————————
Image:Fix_pack.jpg

2. Download upgrade patches certified for above release

After download the patches looked like below
-rw-rw-r– 1 was61 was61 439113810 Mar 31 09:44 6.1.0-WS-WAS-LinuxX64-FP0000029.pak
-rw-rw-r– 1 was61 was61  18690237 Mar 31 09:44 6.1.0-WS-PLG-LinuxX64-FP0000029.pak
-rw-rw-r– 1 was61 was61  12795097 Mar 31 09:44 6.1.0-WS-IHS-LinuxX64-FP0000029.pak
-rwxrwxr-x 1 was61 was61 108644602 Mar 31 10:17 7.0.0.9-WS-UPDI-LinuxAMD64.zip

3. Shutdown IHS,Websphere Services

Stop JVM – /opt/IBM/WebSphere/AppServer/profiles/Profile01/Node/bin/stopServer.sh
Stop DMGR- /opt/IBM/WebSphere/AppServer/profiles/Profile01/Node/bin/stopNode.sh
Stop IHS – sudo /opt/IBM/HTTPServer/bin/apachectl -k stop

4. Intall “IBM Update Installer”  : Xwindows GUI Needed
Unzip 7.0.0.9-WS-UPDI-LinuxAMD64.zip
Navigate to UpdateInstaller and run “install”
Follow the screens as listed below

Image:UpdateInstaller_2.jpg

Image:UpdateInstaller_3.jpg

Image:UpdateInstaller_4.jpg

Image:UpdateInstaller_5.jpg

Image:UpdateInstaller_6.jpg

Image:UpdateInstaller_7.jpg

Image:UpdateInstaller_8.jpg

Image:UpdateInstaller_9.jpg

Please make sure “Lauch IBM Update Installer” is selected before you click on FINISH.

5. Use new installer to apply fix pack to IHS, WAS & PLUG-IN

Image:UpdateInstaller_10.jpg

Image:UpdateInstaller_11.jpg

Image:UpdateInstaller_12.jpg

Click on dropdown and then select HTTPServer

Image:UpdateInstaller_13.jpg

Image:UpdateInstaller_14.jpg

Image:UpdateInstaller_15.jpg

Image:UpdateInstaller_16.jpg

Please navigate to directory where fix pack patches have been downloaded.

Image:UpdateInstaller_17.jpg

Image:UpdateInstaller_18.jpg

Image:UpdateInstaller_21.jpg

Click on “RELAUNCH” to invoke updateinstaller again.
We have finished patching IHS but need to carry update for Appserver(WebSphere) and PLUG-IN.
Select Appserver at drop down list box

Image:UpdateInstaller_22.jpg

Image:UpdateInstaller_23.jpg

Image:UpdateInstaller_24.jpg

Image:UpdateInstaller_25.jpg

Image:UpdateInstaller_26.jpg

Image:UpdateInstaller_27.jpg

Image:UpdateInstaller_28.jpg

Finally select PLUG-IN from drop down list box after invoking updateinstaller again

Image:UpdateInstaller_29.jpg

Image:UpdateInstaller_30.jpg

Image:UpdateInstaller_31.jpg

Image:UpdateInstaller_32.jpgWe can safely ignore the warning above
Log files could be located at Directory selected for UpdateInstaller/logs/tmp
[was61@tmp]$ pwd
/opt/IBM/WebSphere/UpdateInstaller/logs/tmp
[was61@ tmp]$ ls -lrt
total 12
-rw-r–r– 1 was61 web 6488 Jun 14 18:38 updatetrace.log
-rw-r–r– 1 was61 web 3552 Jun 14 18:38 updatelog.txt

6. Startup IHS,Websphere services
Start JVM – /opt/IBM/WebSphere/AppServer/profiles/Profile01/Node/bin/startServer.sh
Start DMGR- /opt/IBM/WebSphere/AppServer/profiles/Profile01/Node/bin/startNode.sh
Start IHS – sudo /opt/IBM/HTTPServer/bin/apachectl -k start

7. Locate version of websphere using versioninfo.sh, it should show the new release number

[was61@Server1 bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 14 August 2011 05:09:45 BST
Installation
———————————————————————
Product Directory        /opt/IBM/WebSphere/AppServer
Version Directory        /opt/IBM/WebSphere/AppServer/properties/version
DTD Directory            /opt/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory            /opt/IBM/WebSphere/AppServer/logs
Backup Directory         /opt/IBM/WebSphere/AppServer/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
ND                       installed
Installed Product
———————————————————————
Name IBM WebSphere Application Server – ND
Version                  6.1.0.29
ID                       ND
Build Level              cf290949.16
Build Date 12/11/09
———————————————————————
End Installation Status Report
———————————————————————

/opt/IBM/HTTPServer/bin
[was61@Server1 bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 18 August 2011 14:12:27 BST
Installation
——————————————————————————–
Product Directory        /opt/IBM/HTTPServer
Version Directory        /opt/IBM/HTTPServer/properties/version
DTD Directory            /opt/IBM/HTTPServer/properties/version/dtd
Log Directory            /opt/IBM/HTTPServer/logs
Backup Directory         /opt/IBM/HTTPServer/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
IHS                      installed
Installed Product
———————————————————————
Name IBM HTTP Server
Version                  6.1.0.29
ID                       IHS
Build Level              cf311015.02
Build Date 4/15/10
———————————————————————
End Installation Status Report
———————————————————————

[was61@Server1 bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 18 August 2011 14:13:41 BST
Installation
———————————————————————

Product Directory        /opt/IBM/HTTPServer/Plugins
Version Directory        /opt/IBM/HTTPServer/Plugins/properties/version
DTD Directory            /opt/IBM/HTTPServer/Plugins/properties/version/dtd
Log Directory            /opt/IBM/HTTPServer/Plugins/logs
Backup Directory         /opt/IBM/HTTPServer/Plugins/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
PLG                      installed
Installed Product
———————————————————————
Name                     Web server plug-ins for IBM WebSphere Application Server
Version                  6.1.0.29
ID                       PLG
Build Level              cf311015.02
Build Date 4/15/10
———————————————————————
End Installation Status Report

We can safely ignore the warning above
Log files could be located at Directory selected for UpdateInstaller/logs/tmp
[was61@tmp]$ pwd
/opt/IBM/WebSphere/UpdateInstaller/logs/tmp
[was61@eugbbopg09ld tmp]$ ls -lrt
total 12
-rw-r–r– 1 was61 web 6488 Jun 14 18:38 updatetrace.log
-rw-r–r– 1 was61 web 3552 Jun 14 18:38 updatelog.txt

6. Startup IHS,Websphere services
Start JVM – /opt/IBM/WebSphere/AppServer/profiles/Profile01/Node/bin/startServer.sh
Start DMGR- /opt/IBM/WebSphere/AppServer/profiles/Profile01/Node/bin/startNode.sh
Start IHS – sudo /opt/IBM/HTTPServer/bin/apachectl -k start

7. Locate version of websphere using versioninfo.sh, it should show the new release number
[was61@eugbbopg03lt bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 31 March 2010 12:06:26 BST
Installation
———————————————————————
Product Directory        /opt/IBM/WebSphere/AppServer
Version Directory        /opt/IBM/WebSphere/AppServer/properties/version
DTD Directory            /opt/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory            /opt/IBM/WebSphere/AppServer/logs
Backup Directory         /opt/IBM/WebSphere/AppServer/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
ND                       installed
Installed Product
———————————————————————
Name IBM WebSphere Application Server – ND
Version                  6.1.0.29
ID                       ND
Build Level              cf290949.16
Build Date 12/11/09
———————————————————————
End Installation Status Report
———————————————————————

Using the same update process I have updated STG from 6.1.0.29 to 6.1.0.31

[was61@eugbbopg03lt bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 14 August 2011 05:09:45 BST
Installation
———————————————————————
Product Directory        /opt/IBM/WebSphere/AppServer
Version Directory        /opt/IBM/WebSphere/AppServer/properties/version
DTD Directory            /opt/IBM/WebSphere/AppServer/properties/version/dtd
Log Directory            /opt/IBM/WebSphere/AppServer/logs
Backup Directory         /opt/IBM/WebSphere/AppServer/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
ND                       installed
Installed Product
———————————————————————
Name IBM WebSphere Application Server – ND
Version                  6.1.0.29
ID                       ND
Build Level              cf290949.16
Build Date 12/11/09
———————————————————————
End Installation Status Report
———————————————————————
/opt/IBM/HTTPServer/bin
[was61@eugbbopg03lt bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 18 August 2011 14:12:27 BST
Installation
——————————————————————————–
Product Directory        /opt/IBM/HTTPServer
Version Directory        /opt/IBM/HTTPServer/properties/version
DTD Directory            /opt/IBM/HTTPServer/properties/version/dtd
Log Directory            /opt/IBM/HTTPServer/logs
Backup Directory         /opt/IBM/HTTPServer/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
IHS                      installed
Installed Product
———————————————————————
Name IBM HTTP Server
Version                  6.1.0.31
ID                       IHS
Build Level              cf311015.02
Build Date 4/15/10
———————————————————————
End Installation Status Report
———————————————————————
[was61@eugbbopg03lt bin]$ ./versionInfo.sh
WVER0010I: Copyright (c) IBM Corporation 2002, 2005; All rights reserved.
WVER0012I: VersionInfo reporter version 1.15.4.3, dated 11/12/08
———————————————————————
IBM WebSphere Application Server Product Installation Status Report
———————————————————————
Report at date and time 18 August 2011 14:13:41 BST
Installation
———————————————————————Product Directory        /opt/IBM/HTTPServer/Plugins
Version Directory        /opt/IBM/HTTPServer/Plugins/properties/version
DTD Directory            /opt/IBM/HTTPServer/Plugins/properties/version/dtd
Log Directory            /opt/IBM/HTTPServer/Plugins/logs
Backup Directory         /opt/IBM/HTTPServer/Plugins/properties/version/nif/backup
TMP Directory            /tmp
Product List
———————————————————————
PLG                      installed
Installed Product
———————————————————————
Name                     Web server plug-ins for IBM WebSphere Application Server
Version                  6.1.0.31
ID                       PLG
Build Level              cf311015.02
Build Date 4/15/10
———————————————————————
End Installation Status Report

Dataguard: Shell script to List Archive gap between Primary & Standby

Posted by Sagar Patil

I was looking for a NAGIOS monitoring script which will list the archive gap between Primary and 2 of my Standby databases.

http://www.oracledbasupport.co.uk/wp-content/uploads/2010/09/dg_archive_gap_listing-1.txt

When compiled the script will return results as below

[oracle@scripts]$ ./dg_archive_gap.sh
Primary_Arc_No=61077 but Stby_Arc_No=61066

[oracle@scripts]$ ./dg_archive_gap.sh
Primary_Arc_No=61088 but Stby_Arc_No=61047
Stby_Arc_No=61067 but Stby_Apply_No=61047
Dr_Arc_No=61067 but Dr_Apply_No=61047

If you have multiple standby databases , please make sure you Add SQL stmts with “Dest_Id=X” , here 1 (Primary), 2 (Standby) & 3 (DR standby)

#!/bin/bash
#set Oracle environment for Sql*Plus
export ORACLE_HOME=/u01/app/oracle/product/10.2.0
export ORACLE_SID=prod
export PATH=$PATH:$ORACLE_HOME/bin

#set working directory. script is located here..
cd /home/oracle/scripts

#Problem statement is constructed in message variable
MESSAGE=””

#hostname of the primary DB.. used in messages..
HOST_NAME=`hostname`

#Get Data guard information to Unix shell variables…

MESSAGE=`
sqlplus -s sys/sys as sysdba <<EOSQL
set pages 0 feed off
set serverout on size 1000000;
Var Rc Number;
Declare
Local_Arc             Number:=0;
Stby_Arc              Number:=0;
Dr_Arc                Number:=0;
Stby_Apply            Number:=0;
Dr_Apply              Number:=0;
Msg                   Varchar2(4000):=”;
Begin
:Rc:=0;
Select Archived_Seq# Into Local_Arc
From V\\$Archive_Dest_Status Where Dest_Id=1;
Select Archived_Seq#, Applied_Seq#
Into Stby_Arc, Stby_Apply
From V\\$Archive_Dest_Status Where Dest_Id=2;
Select Archived_Seq#, Applied_Seq#
Into Dr_Arc, Dr_Apply
From V\\$Archive_Dest_Status Where Dest_Id=3;

If Local_Arc > Stby_Arc + 10 Then
Msg:=Msg||’Primary_Arc_No=’||Local_Arc||’ but Stby_Arc_No=’||Stby_Arc||Chr(10) || ‘–‘;
:Rc:=1;
End If;

If Stby_Arc > Stby_Apply + 10 Then
Msg:=Msg||’Stby_Arc_No=’||Stby_Arc||’ but Stby_Apply_No=’||Stby_Apply||Chr(10) || ‘–‘;
:Rc:=1;
End If;

If :Rc != 0 Then
Dbms_Output.Put_Line(Msg);
End If;

If Dr_Arc > Dr_Apply + 10 Then
Msg:=Msg||’Dr_Arc_No=’||Dr_Arc||’ but Dr_Apply_No=’||Dr_Apply||Chr(10)|| ‘–‘;
:Rc:=1;
End If;

If :Rc != 0 Then
Dbms_Output.Put_Line(Msg);
End If;
End;
/
exit :rc
EOSQL`
echo $MESSAGE
if [ $? -ne 0 ]; then
MESSAGE=”Error on $HOST_NAME Standby -log APPLY- service!\n${MESSAGE}\nThis problem may cause the archive directories to get full!!!\n\n”
echo -e $MESSAGE
fi

Compare Websphere Configuration Details : Visual Configuration Explorer (VCE)

Posted by Sagar Patil

I have many websphere 6.x ND clustered servers and growing every single week. Lots of them are upgraded from previous websphere installations to ND 6.x now.

We have admin shell scripts written but they are not portable.  There is diff in naming conventions for profile, Cluster name, Application Server name etc. We have some issues and they all point to diff in configuration settings.

Recently I came across tool called “Visual Configuration Explorer (VCE)”.

Here is a forum for discussions related to this tool:
http://www.ibm.com/developerworks/forums/forum.jspa?forumID=1139

Getting Started with Visual Configuration Explorer

Download the Workbench component of ISA Version 4.0 for Windows via the following URL:
http://www.ibm.com/software/support/isa/

You may want to go thru this excellent ppt file about IBM Support assistant

http://www.oracledbasupport.co.uk/wp-content/uploads/2010/09/Headless_Help.txt
http://www.oracledbasupport.co.uk/wp-content/uploads/2010/09/VCEHeadlessRuntimeReadme-1.txt

Top of Page

Top menu