For a user who maintains WebSphere products on many UNIX servers, it is a boring thing to change the password every 90 or 120 days.
Here is an example to change the password remotely on windows platform using cygwin
1) install cygwin using setup.exe , which can be found at the link: http://www.cygwin.com/
2) run setup.exe and make sure you select "expect" and "ssh" packages.
3) after installing cygwin, click "cygwin" on the windows desktop and you will enter cygwin interface.
4) create an expect shell script like following:
Wednesday, August 17, 2011
Wednesday, August 3, 2011
wsadmin faces the soap timeout issue
When you execute a wsadmin script which will take a long time and you may see the timeout issue:
WASX7015E: Exception running command: "AdminTask.extractConfigProperties ('-interactive')"; exception information:
com.ibm.websphere.management.exception.ConnectorException
org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read timed out; targetException=java.net.SocketTimeoutException: Read timed out]
the solution for this issue is:
change the field "com.ibm.SOAP.requestTimeout" in the soap.client.properties in the profile directory to a value you want to specify or "0" (which means no timeout). the default value is "180" seconds.
WASX7015E: Exception running command: "AdminTask.extractConfigProperties ('-interactive')"; exception information:
com.ibm.websphere.management.exception.ConnectorException
org.apache.soap.SOAPException: [SOAPException: faultCode=SOAP-ENV:Client; msg=Read timed out; targetException=java.net.SocketTimeoutException: Read timed out]
the solution for this issue is:
change the field "com.ibm.SOAP.requestTimeout" in the soap.client.properties in the profile directory to a value you want to specify or "0" (which means no timeout). the default value is "180" seconds.
Configure IHS Web Server on WAS or WPS
After installing IHS Web Server, we need to create a web server on WAS so that the application deployed on WAS server can be mapped to web server.
- Logon to server WAS_HostServer with user “wasuser”, the user is used to run WebSphere Application Server instances
- Go to directory /IBM/WebSphere/AppServer/bin
- Download the file “configurewebserver1.sh” from IHS_HostServer, the file is at /IBM/HTTPServer/Plugins/bin
- Logon to server WAS_HostServer with user “wasuser”, the user is used to run WebSphere Application Server instances
- Go to directory /IBM/WebSphere/AppServer/bin
- Download the file “configurewebserver1.sh” from IHS_HostServer, the file is at /IBM/HTTPServer/Plugins/bin
Install IBM IHS on AIX System (1)
1) Create logical file system /IBM (or other name)
2) Download the following installation files from IBM WebSite
- C1G2NML.tar.gz (WebSphere Supplements installation media)
3) Download the following FixPack files from IBM website.
Fixpacks
2) Download the following installation files from IBM WebSite
- C1G2NML.tar.gz (WebSphere Supplements installation media)
3) Download the following FixPack files from IBM website.
Fixpacks
Saturday, July 23, 2011
WebSphere Process Server 7.0 silent installation (4)
WPS_Response.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<agent-input clean='true' >
<server>
<repository location='/IBM/cd_software/WPS7/repository/repository.config'/>
<repository location='/IBM/cd_software/WPS7/WAS_SYNC/repository.config'/>
<repository location='/IBM/fixpack/sca.1.0.1.11.fp/repository.config'/>
<repository location='/IBM/fixpack/xml.1.0.0.9.fp/repository.config'/>
<repository location='/IBM/fixpack/xml.1.0.import/import/repository.config'/>
<?xml version="1.0" encoding="UTF-8"?>
<agent-input clean='true' >
<server>
<repository location='/IBM/cd_software/WPS7/repository/repository.config'/>
<repository location='/IBM/cd_software/WPS7/WAS_SYNC/repository.config'/>
<repository location='/IBM/fixpack/sca.1.0.1.11.fp/repository.config'/>
<repository location='/IBM/fixpack/xml.1.0.0.9.fp/repository.config'/>
<repository location='/IBM/fixpack/xml.1.0.import/import/repository.config'/>
WebSphere Process Server 7.0 silent installation (3)
2) Install IBM Installation Manager
- Go to Directory /IBM/cd_software/IM
- Run the command to unzip the file “agent.installer.aix.motif.ppc_1.4.4000.20110525_1254.zip”
/IBM/WebSphere/ProcServer/java/bin/jar –xvf agent.installer.aix.motif.ppc_1.4.4000.20110525_1254.zip
chmod –fR 755 *
- Go to Directory /IBM/cd_software/IM
- Run the command to unzip the file “agent.installer.aix.motif.ppc_1.4.4000.20110525_1254.zip”
/IBM/WebSphere/ProcServer/java/bin/jar –xvf agent.installer.aix.motif.ppc_1.4.4000.20110525_1254.zip
chmod –fR 755 *
WebSphere Process Server 7.0 silent installation (2)
2) Install Update Installer 7.0.0.17 on AIX OS
- Go to Directory /IBM/cd_software/UPDI/
- Run the command “gunzip 7.0.0.17-WS-UPDI-AixPPC32.tar.gz” and “tar –xvf 7.0.0.17-WS-UPDI-AixPPC32.tar”
- Go to Directory /IBM/cd_software/UPDI/UpdateInstaller
- Run the command “cp responsefile.updiinstaller.txt responsefile.updiinstaller.txt.bak”
- Edit the file “responsefile.updiinstaller.txt” and set the following value
-OPT silentInstallLicenseAcceptance="true"
-OPT installLocation="/IBM/WebSphere/UpdateInstaller"
Uncomment the following options
-OPT allowNonRootSilentInstall="true"
-OPT disableOSPrereqChecking="true"
-OPT disableEarlyPrereqChecking="true"
Comment all other options
- Run the command “./install -options "responsefile.updiinstaller.txt" –silent” to install update installer
Or run this command to install:
./install -silent -OPT silentInstallLicenseAcceptance=true -OPT allowNonRootSilentInstall=true -OPT disableOSPrereqChecking=true -OPT installLocation=/IBM/WebSphere/UpdateInstaller
- Go to Directory /IBM/WebSpehre/UpdateInstaller to check Update Installer version, it should be “7.0.0.17
3) Install WAS fixpacks using Update Installer
- Go to Directory /IBM/WebSphere/UpdateInstaller/responsefiles
- Run the command “cp install.txt installfix.txt”
- Edit installfix.txt as the following:
-W maintenance.package="/IBM/fixpack/7.0.0-WS-WAS-AixPPC32-FP0000017.pak;/IBM/fixpack/7.0.0-WS-WASSDK-AixPPC32-FP0000017.pak;/IBM/fi
xpack/7.0.0.17-WS-WAS-IFPM34365.pak"
-W product.location="/IBM/WebSphere/ProcServer"
Uncoment the following options
-OPT checkFilePermissions="true"
-OPT disableNonBlockingPrereqChecking="true"
-OPT rootUserHasRunSlibcleanCommandSuccessfully="true"
- Go to Directory /IBM/WebSphere/UpdateInstaller/bin, run the following command to apply the fixpacks
./update.sh -options responsefiles/installfix.txt –silent
Monitor /IBM/WebSphere/UpdateInstaller/logs/tmp/updatelog.txt for updating status.
- Go to Directory /IBM/WebSphere/ProcServer/bin, run the command “versionInfo.sh”, the version should be 7.0.0.17.
- Go to Directory /IBM/cd_software/UPDI/
- Run the command “gunzip 7.0.0.17-WS-UPDI-AixPPC32.tar.gz” and “tar –xvf 7.0.0.17-WS-UPDI-AixPPC32.tar”
- Go to Directory /IBM/cd_software/UPDI/UpdateInstaller
- Run the command “cp responsefile.updiinstaller.txt responsefile.updiinstaller.txt.bak”
- Edit the file “responsefile.updiinstaller.txt” and set the following value
-OPT silentInstallLicenseAcceptance="true"
-OPT installLocation="/IBM/WebSphere/UpdateInstaller"
Uncomment the following options
-OPT allowNonRootSilentInstall="true"
-OPT disableOSPrereqChecking="true"
-OPT disableEarlyPrereqChecking="true"
Comment all other options
- Run the command “./install -options "responsefile.updiinstaller.txt" –silent” to install update installer
Or run this command to install:
./install -silent -OPT silentInstallLicenseAcceptance=true -OPT allowNonRootSilentInstall=true -OPT disableOSPrereqChecking=true -OPT installLocation=/IBM/WebSphere/UpdateInstaller
- Go to Directory /IBM/WebSpehre/UpdateInstaller to check Update Installer version, it should be “7.0.0.17
3) Install WAS fixpacks using Update Installer
- Go to Directory /IBM/WebSphere/UpdateInstaller/responsefiles
- Run the command “cp install.txt installfix.txt”
- Edit installfix.txt as the following:
-W maintenance.package="/IBM/fixpack/7.0.0-WS-WAS-AixPPC32-FP0000017.pak;/IBM/fixpack/7.0.0-WS-WASSDK-AixPPC32-FP0000017.pak;/IBM/fi
xpack/7.0.0.17-WS-WAS-IFPM34365.pak"
-W product.location="/IBM/WebSphere/ProcServer"
Uncoment the following options
-OPT checkFilePermissions="true"
-OPT disableNonBlockingPrereqChecking="true"
-OPT rootUserHasRunSlibcleanCommandSuccessfully="true"
- Go to Directory /IBM/WebSphere/UpdateInstaller/bin, run the following command to apply the fixpacks
./update.sh -options responsefiles/installfix.txt –silent
Monitor /IBM/WebSphere/UpdateInstaller/logs/tmp/updatelog.txt for updating status.
- Go to Directory /IBM/WebSphere/ProcServer/bin, run the command “versionInfo.sh”, the version should be 7.0.0.17.
WebSphere Process Server 7.0 silent installation (1)
This following steps show how to install WPS 7.0 silently on AIX OS
1. Preliminary Tasks
1) Create a file system called /IBM with the space of 20G
2) download the following installation files from IBM website.
- WPS_v7_AIX32_Install.tar (WebSphere Process Server 7. installation media)
- agent.installer.aix.motif.ppc_1.4.4000.20110525_1254.zip (Installation Manager 1.4.4)
- 7.0.0.17-WS-UPDI-AixPPC32.tar.gz (WebSphere Update Installer 7.0.0.17)
fixpacks:
- 7.0.0-WS-WAS-AixPPC32-FP0000017.pak
- 7.0.0-WS-WASSDK-AixPPC32-FP0000017.pak
- 7.0.0.3.wps.fixes.zip
- sca.1.0.1.11.fp.zip
- sca.1.0.import.zip
- was.7.0.0.17.fixes.zip
- was.7.0.import.zip
- wps.7003.repository.zip
- xml.1.0.0.9.fp.zip
- xml.1.0.import.zip
- 7.0.0.17-WS-WAS-IFPM34365.pak
1. Preliminary Tasks
1) Create a file system called /IBM with the space of 20G
2) download the following installation files from IBM website.
- WPS_v7_AIX32_Install.tar (WebSphere Process Server 7. installation media)
- agent.installer.aix.motif.ppc_1.4.4000.20110525_1254.zip (Installation Manager 1.4.4)
- 7.0.0.17-WS-UPDI-AixPPC32.tar.gz (WebSphere Update Installer 7.0.0.17)
fixpacks:
- 7.0.0-WS-WAS-AixPPC32-FP0000017.pak
- 7.0.0-WS-WASSDK-AixPPC32-FP0000017.pak
- 7.0.0.3.wps.fixes.zip
- sca.1.0.1.11.fp.zip
- sca.1.0.import.zip
- was.7.0.0.17.fixes.zip
- was.7.0.import.zip
- wps.7003.repository.zip
- xml.1.0.0.9.fp.zip
- xml.1.0.import.zip
- 7.0.0.17-WS-WAS-IFPM34365.pak
Thursday, June 23, 2011
WebSphere Application Server 7 Federated Repository Configuration - Microsoft AD configuration
Some people are confusing how to configure the Federated Repository to Connect to Microsoft Active directory LDAP server. IBM docs do not provide a clean configuration steps.
Here are the steps what I configured Federated Repository to connect to Microsoft Active Directory LDAP
1) Log on to Admin Console and go to Security-Global Security
2) select "Federated Repositor" from drop down list and click "Configure..." button
3) Specify a Primary administrative user name. Note: this user name should not be same user in Microsoft AD LDAP
4) Click "Add Base Entry to Realm..." button in this page
5) click "Add Repository" button
6) enter the Repository Identifier, host name, port, binging user, and password, Then click "Apply"
7) click "LDAP entity types" link
8) then click "PersonalAccount" link, and set the Search base like "DC=mydomain,DC=com", then click "Ok"
9) this step is very import, find the file named wimconfig.xml at the directory <ProfileDir>/Config/cells/<NodeName>/wim/config, add the highlighted entry in the correct section
Most Microsoft active directory use sAMAccountName to authenticate the user, so we need to map sAMAccountName attribute to uid in order to search the user.
After changing the file, we need to restart the server. and then we should be able to find the active directory user from the console.
Here are the steps what I configured Federated Repository to connect to Microsoft Active Directory LDAP
1) Log on to Admin Console and go to Security-Global Security
2) select "Federated Repositor" from drop down list and click "Configure..." button
3) Specify a Primary administrative user name. Note: this user name should not be same user in Microsoft AD LDAP
4) Click "Add Base Entry to Realm..." button in this page
5) click "Add Repository" button
6) enter the Repository Identifier, host name, port, binging user, and password, Then click "Apply"
7) click "LDAP entity types" link
8) then click "PersonalAccount" link, and set the Search base like "DC=mydomain,DC=com", then click "Ok"
9) this step is very import, find the file named wimconfig.xml at the directory <ProfileDir>/Config/cells/<NodeName>/wim/config, add the highlighted entry in the correct section
Most Microsoft active directory use sAMAccountName to authenticate the user, so we need to map sAMAccountName attribute to uid in order to search the user.
After changing the file, we need to restart the server. and then we should be able to find the active directory user from the console.
Monday, June 20, 2011
Using API to get WebSphere Application Server Information–get WAS Applications information
Using WebSphere Application Server MBean to get the application status
private void getApplicationStatus() throws MalformedObjectNameException, NullPointerException, ConnectorException, AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException{
String queryString="WebSphere:type=Application,*";
ObjectName queryAppObj=new ObjectName(queryString);
Set s=adminClient.queryNames(queryAppObj,null);
Iterator itApp=s.iterator();
while(itApp.hasNext()){
String appStr=itApp.next().toString();
int appNameidx=appStr.indexOf("name");
int appProcessidx=appStr.indexOf("process");
int startAppNameidx=appStr.indexOf("=",appNameidx);
int startAppProcessidx=appStr.indexOf("=",appProcessidx);
int endAppNameidx=appStr.indexOf(",",appNameidx);
int endAppProcessidx=appStr.indexOf(",",appProcessidx);
String appName=appStr.substring(startAppNameidx+1,endAppNameidx);
String processName=appStr.substring(startAppProcessidx+1,endAppProcessidx);
System.out.println(appName+"@"+processName+" is running");
}
}
However, the above procedure can only get the applications which are running on the server. If the application is stopped, this procedure will not get them.
The following procedure can get all applications deployed on the server. the procedure will get all WAS servers if there is a cluster in the environment.
private void getApplicationList() throws Exception {
ArrayList appList=new ArrayList();
Hashtable props=new Hashtable();
AppManagement appM = AppManagementProxy.getJMXProxyForClient(adminClient);
ConfigService configService=new ConfigServiceProxy(adminClient);
Vector v=null;
Object[] appObj=null;
Session session=new Session();
ObjectName[] servers=configService.resolve(session,"Server");
for (ObjectName server:servers) {
String[] serverConfig=server.getKeyProperty("_Websphere_Config_Data_Id").split("/");
String serverName=server.getKeyProperty("_Websphere_Config_Data_Display_Name");
props.put(AppConstants.APPDEPL_LOCALE, Locale.getDefault());
String scope="WebSphere:cell="+serverConfig[1]+",node="+serverConfig[3]+",server="+serverName;
v=appM.listApplications(scope,props,session.getSessionId());
appObj=v.toArray();
for (Object app:appObj){
System.out.println(app.toString()+" is deployed "+serverName);
}
}
}
private void getApplicationStatus() throws MalformedObjectNameException, NullPointerException, ConnectorException, AttributeNotFoundException, InstanceNotFoundException, MBeanException, ReflectionException{
String queryString="WebSphere:type=Application,*";
ObjectName queryAppObj=new ObjectName(queryString);
Set s=adminClient.queryNames(queryAppObj,null);
Iterator itApp=s.iterator();
while(itApp.hasNext()){
String appStr=itApp.next().toString();
int appNameidx=appStr.indexOf("name");
int appProcessidx=appStr.indexOf("process");
int startAppNameidx=appStr.indexOf("=",appNameidx);
int startAppProcessidx=appStr.indexOf("=",appProcessidx);
int endAppNameidx=appStr.indexOf(",",appNameidx);
int endAppProcessidx=appStr.indexOf(",",appProcessidx);
String appName=appStr.substring(startAppNameidx+1,endAppNameidx);
String processName=appStr.substring(startAppProcessidx+1,endAppProcessidx);
System.out.println(appName+"@"+processName+" is running");
}
}
However, the above procedure can only get the applications which are running on the server. If the application is stopped, this procedure will not get them.
The following procedure can get all applications deployed on the server. the procedure will get all WAS servers if there is a cluster in the environment.
private void getApplicationList() throws Exception {
ArrayList appList=new ArrayList();
Hashtable props=new Hashtable();
AppManagement appM = AppManagementProxy.getJMXProxyForClient(adminClient);
ConfigService configService=new ConfigServiceProxy(adminClient);
Vector v=null;
Object[] appObj=null;
Session session=new Session();
ObjectName[] servers=configService.resolve(session,"Server");
for (ObjectName server:servers) {
String[] serverConfig=server.getKeyProperty("_Websphere_Config_Data_Id").split("/");
String serverName=server.getKeyProperty("_Websphere_Config_Data_Display_Name");
props.put(AppConstants.APPDEPL_LOCALE, Locale.getDefault());
String scope="WebSphere:cell="+serverConfig[1]+",node="+serverConfig[3]+",server="+serverName;
v=appM.listApplications(scope,props,session.getSessionId());
appObj=v.toArray();
for (Object app:appObj){
System.out.println(app.toString()+" is deployed "+serverName);
}
}
}
Tuesday, June 14, 2011
Using API to get WebSphere Application Server Information--get WAS Server information
Following the last post, after we connect to the server, we can get the server information
public static void getWASServerList() throws MalformedObjectNameException, InstanceNotFoundException, ReflectionException, ConnectorException,AttributeNotFoundException, MBeanException, ConfigServiceException{
ArrayList serverList=new ArrayList();
String queryString="WebSphere:type=Server,*";
long jvm_heapsize;
long jvm_usedmem;
long jvm_cpuusage;
ObjectName queryServerObj=new ObjectName(queryString);
Set s=adminClient.queryNames(queryServerObj,null);
Properties prop=new Properties();
Iterator itrServer=s.iterator();
ConfigService configService=new ConfigServiceProxy(adminClient);
Session session=new Session();
while (itrServer.hasNext()){
String serverStr=itrServer.next().toString();
ObjectName sobj=new ObjectName(serverStr);
List attrList=adminClient.getAttributes(sobj,new String[]{"name","serverVersion","state","processType","nodeName"});
//*********************************************************
//* this Command is used to get the server name, WAS server version, WAS server state, and server Process Type, and the node name server belongs to
//***********************************************************
String serverName=((Attribute)attrList.get(0)).getValue().toString();
String serverVersion=((Attribute)attrList.get(1)).getValue().toString();
String serverStatus=((Attribute)attrList.get(2)).getValue().toString();
String serverType=((Attribute)attrList.get(3)).getValue().toString();
String nodeName=((Attribute)attrList.get(4)).getValue().toString();
System.out.println("get Perf Information");
System.out.println("------------------");
//*************************************************
//Following codes are used to get WAS server dynamic heap size utilization information
//******************************************************
if (serverType.equals("DeploymentManager")){
jvm_heapsize=0;
jvm_usedmem=0;
jvm_cpuusage=0;
} else {
String PMIQueryString="WebSphere:type=Perf,process="+serverName+",node="+nodeName+",*";
ObjectName PMIObject=new ObjectName(PMIQueryString);
Set perf=adminClient.queryNames(PMIObject,null);
ObjectName perfObj=(ObjectName)perf.iterator().next();
String JVMQueryString="WebSphere:type=JVM,process="+serverName+",node="+nodeName+",*";
ObjectName JVMObject=new ObjectName(JVMQueryString);
Set jvm=adminClient.queryNames(JVMObject,null);
ObjectName jvmMBean=(ObjectName)jvm.iterator().next();
String[] signature = new String[] {"javax.management.ObjectName","java.lang.Boolean"};
Object[] params = new Object[] {jvmMBean, new Boolean(false)};
WSStats jvmStats = (WSStats) adminClient.invoke(perfObj, "getStatsObject", params, signature);
WSRangeStatistic jvmStatistic_Heapsize = (WSRangeStatistic)jvmStats.getStatistic(WSJVMStats.HeapSize);
WSCountStatistic jvmStatistic_UsedMem=(WSCountStatistic)jvmStats.getStatistic(WSJVMStats.UsedMemory);
WSCountStatistic jvmStatistic_CPUUsage=(WSCountStatistic)jvmStats.getStatistic(WSJVMStats.cpuUsage);
jvm_heapsize=jvmStatistic_Heapsize.getCurrent();
jvm_usedmem=jvmStatistic_UsedMem.getCount();
jvm_cpuusage=jvmStatistic_CPUUsage.getCount();
}
//*******************************************************************
//*Following codes to get the server static heap size config
//***************************************************************************
ObjectName[] servers=configService.resolve(session,"Server="+serverName);
Object attr=configService.getAttribute(session,servers[0],"processDefinitions");
int initHeapSizeidx=attr.toString().indexOf("initialHeapSize");
int maxHeapSizeidx=attr.toString().indexOf("maximumHeapSize");
int startInitHeapSizeidx=attr.toString().indexOf("=",initHeapSizeidx);
int startMaxHeapSizeidx=attr.toString().indexOf("=",maxHeapSizeidx);
int endInitHeapSizeidx=attr.toString().indexOf(",",initHeapSizeidx);
int endMaxHeapSizeidx=attr.toString().indexOf(",",maxHeapSizeidx);
String InitHeapSize=attr.toString().substring(startInitHeapSizeidx+2,endInitHeapSizeidx);
String MaxHeapSize=attr.toString().substring(startMaxHeapSizeidx+2,endMaxHeapSizeidx);
System.out.println(serverName+" "+serverStatus +" "+serverType +" "+InitHeapSize+" "+MaxHeapSize+" "+Float.toString((float)jvm_heapsize/1024)+" "+Float.toString((float)jvm_usedmem/1024)+" "+Long.toString(jvm_cpuusage));
}
}
public static void getWASServerList() throws MalformedObjectNameException, InstanceNotFoundException, ReflectionException, ConnectorException,AttributeNotFoundException, MBeanException, ConfigServiceException{
ArrayList serverList=new ArrayList();
String queryString="WebSphere:type=Server,*";
long jvm_heapsize;
long jvm_usedmem;
long jvm_cpuusage;
ObjectName queryServerObj=new ObjectName(queryString);
Set s=adminClient.queryNames(queryServerObj,null);
Properties prop=new Properties();
Iterator itrServer=s.iterator();
ConfigService configService=new ConfigServiceProxy(adminClient);
Session session=new Session();
while (itrServer.hasNext()){
String serverStr=itrServer.next().toString();
ObjectName sobj=new ObjectName(serverStr);
List attrList=adminClient.getAttributes(sobj,new String[]{"name","serverVersion","state","processType","nodeName"});
//*********************************************************
//* this Command is used to get the server name, WAS server version, WAS server state, and server Process Type, and the node name server belongs to
//***********************************************************
String serverName=((Attribute)attrList.get(0)).getValue().toString();
String serverVersion=((Attribute)attrList.get(1)).getValue().toString();
String serverStatus=((Attribute)attrList.get(2)).getValue().toString();
String serverType=((Attribute)attrList.get(3)).getValue().toString();
String nodeName=((Attribute)attrList.get(4)).getValue().toString();
System.out.println("get Perf Information");
System.out.println("------------------");
//*************************************************
//Following codes are used to get WAS server dynamic heap size utilization information
//******************************************************
if (serverType.equals("DeploymentManager")){
jvm_heapsize=0;
jvm_usedmem=0;
jvm_cpuusage=0;
} else {
String PMIQueryString="WebSphere:type=Perf,process="+serverName+",node="+nodeName+",*";
ObjectName PMIObject=new ObjectName(PMIQueryString);
Set perf=adminClient.queryNames(PMIObject,null);
ObjectName perfObj=(ObjectName)perf.iterator().next();
String JVMQueryString="WebSphere:type=JVM,process="+serverName+",node="+nodeName+",*";
ObjectName JVMObject=new ObjectName(JVMQueryString);
Set jvm=adminClient.queryNames(JVMObject,null);
ObjectName jvmMBean=(ObjectName)jvm.iterator().next();
String[] signature = new String[] {"javax.management.ObjectName","java.lang.Boolean"};
Object[] params = new Object[] {jvmMBean, new Boolean(false)};
WSStats jvmStats = (WSStats) adminClient.invoke(perfObj, "getStatsObject", params, signature);
WSRangeStatistic jvmStatistic_Heapsize = (WSRangeStatistic)jvmStats.getStatistic(WSJVMStats.HeapSize);
WSCountStatistic jvmStatistic_UsedMem=(WSCountStatistic)jvmStats.getStatistic(WSJVMStats.UsedMemory);
WSCountStatistic jvmStatistic_CPUUsage=(WSCountStatistic)jvmStats.getStatistic(WSJVMStats.cpuUsage);
jvm_heapsize=jvmStatistic_Heapsize.getCurrent();
jvm_usedmem=jvmStatistic_UsedMem.getCount();
jvm_cpuusage=jvmStatistic_CPUUsage.getCount();
}
//*******************************************************************
//*Following codes to get the server static heap size config
//***************************************************************************
ObjectName[] servers=configService.resolve(session,"Server="+serverName);
Object attr=configService.getAttribute(session,servers[0],"processDefinitions");
int initHeapSizeidx=attr.toString().indexOf("initialHeapSize");
int maxHeapSizeidx=attr.toString().indexOf("maximumHeapSize");
int startInitHeapSizeidx=attr.toString().indexOf("=",initHeapSizeidx);
int startMaxHeapSizeidx=attr.toString().indexOf("=",maxHeapSizeidx);
int endInitHeapSizeidx=attr.toString().indexOf(",",initHeapSizeidx);
int endMaxHeapSizeidx=attr.toString().indexOf(",",maxHeapSizeidx);
String InitHeapSize=attr.toString().substring(startInitHeapSizeidx+2,endInitHeapSizeidx);
String MaxHeapSize=attr.toString().substring(startMaxHeapSizeidx+2,endMaxHeapSizeidx);
System.out.println(serverName+" "+serverStatus +" "+serverType +" "+InitHeapSize+" "+MaxHeapSize+" "+Float.toString((float)jvm_heapsize/1024)+" "+Float.toString((float)jvm_usedmem/1024)+" "+Long.toString(jvm_cpuusage));
}
}
Using API to get WebSphere Application Server Information--Connect to WebSphere Application Server
In general, we connect to WebSphere Application Server Instance using jython or jacl scripts . IBM WebSphere Application Server also provide various APIs to let the user to connect to the server instance and get the server information. The following is the code to use API to connect to WAS server application.
import com.ibm.websphere.management.AdminClient;
import com.ibm.websphere.management.AdminClientFactory;
import com.ibm.websphere.management.Session;
import com.ibm.websphere.management.configservice.ConfigService;
import com.ibm.websphere.management.configservice.ConfigServiceHelper;
import com.ibm.websphere.management.configservice.ConfigServiceProxy;
import com.ibm.websphere.management.exception.ConfigServiceException;
import com.ibm.websphere.management.exception.ConnectorException;
import com.ibm.websphere.management.exception.AdminException;
import com.ibm.websphere.management.application.*;
import com.ibm.websphere.pmi.*;
import com.ibm.websphere.pmi.stat.*;
public static void connectToServer(){
Properties props = new Properties();
props.put("type", "SOAP");
props.put("host", hostName);
props.put("port", "8880");
props.put("username", "username");
props.put("password", "password");
//***********************************************************
// if global security enabled. you need the following configurations
//***********************************************************
props.put(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
props.put("com.ibm.ssl.keyStoreFileBased", "true");
props.put("com.ibm.ssl.trustStoreFileBased", "true");
props.put("com.ibm.ssl.keyStore", keyStoreFile);
props.put("javax.net.ssl.keyStore", keyStoreFile);
props.put("com.ibm.ssl.keyStorePassword", keyPassword);
props.put("javax.net.ssl.keyStorePassword", keyPassword);
if (keyStoreFile.endsWith(".p12") || keyStoreFile.endsWith(".P12"))
{
props.put("com.ibm.ssl.keyStoreType", "PKCS12");
props.put("javax.net.ssl.keyStoreType", "PKCS12");
} else
{
props.put("com.ibm.ssl.keyStoreType", "JKS");
props.put("javax.net.ssl.keyStoreType", "JKS");
}
props.put("com.ibm.ssl.trustStore", trustStoreFile);
props.put("javax.net.ssl.trustStore", trustStoreFile);
props.put("com.ibm.ssl.trustStorePassword", trustPassword);
props.put("javax.net.ssl.trustStorePassword", trustPassword);
if (trustStoreFile.endsWith(".p12") || trustStoreFile.endsWith(".P12"))
{
props.put("com.ibm.ssl.trustStoreType", "PKCS12");
props.put("javax.net.ssl.trustStoreType", "PKCS12");
} else
{
props.put("com.ibm.ssl.trustStoreType", "JKS");
props.put("javax.net.ssl.trustStoreType", "JKS");
}
try
{
adminClient = AdminClientFactory.createAdminClient(props);
System.out.println("Connect to "+hostName+":"+portNumber+" Successfully");
}
catch (ConnectorException e)
{
System.out.println("Failed to Connect to "+hostName+":"+portNumber);
System.out.println("Exception creating admin client: " + e);
e.printStackTrace();
System.exit(-1);
}
}
it is better to use IBM WebSphere Application java to run the application. I see some exceptions if we use SUN Java.
import com.ibm.websphere.management.AdminClient;
import com.ibm.websphere.management.AdminClientFactory;
import com.ibm.websphere.management.Session;
import com.ibm.websphere.management.configservice.ConfigService;
import com.ibm.websphere.management.configservice.ConfigServiceHelper;
import com.ibm.websphere.management.configservice.ConfigServiceProxy;
import com.ibm.websphere.management.exception.ConfigServiceException;
import com.ibm.websphere.management.exception.ConnectorException;
import com.ibm.websphere.management.exception.AdminException;
import com.ibm.websphere.management.application.*;
import com.ibm.websphere.pmi.*;
import com.ibm.websphere.pmi.stat.*;
public static void connectToServer(){
Properties props = new Properties();
props.put("type", "SOAP");
props.put("host", hostName);
props.put("port", "8880");
props.put("username", "username");
props.put("password", "password");
//***********************************************************
// if global security enabled. you need the following configurations
//***********************************************************
props.put(AdminClient.CONNECTOR_SECURITY_ENABLED, "true");
props.put("com.ibm.ssl.keyStoreFileBased", "true");
props.put("com.ibm.ssl.trustStoreFileBased", "true");
props.put("com.ibm.ssl.keyStore", keyStoreFile);
props.put("javax.net.ssl.keyStore", keyStoreFile);
props.put("com.ibm.ssl.keyStorePassword", keyPassword);
props.put("javax.net.ssl.keyStorePassword", keyPassword);
if (keyStoreFile.endsWith(".p12") || keyStoreFile.endsWith(".P12"))
{
props.put("com.ibm.ssl.keyStoreType", "PKCS12");
props.put("javax.net.ssl.keyStoreType", "PKCS12");
} else
{
props.put("com.ibm.ssl.keyStoreType", "JKS");
props.put("javax.net.ssl.keyStoreType", "JKS");
}
props.put("com.ibm.ssl.trustStore", trustStoreFile);
props.put("javax.net.ssl.trustStore", trustStoreFile);
props.put("com.ibm.ssl.trustStorePassword", trustPassword);
props.put("javax.net.ssl.trustStorePassword", trustPassword);
if (trustStoreFile.endsWith(".p12") || trustStoreFile.endsWith(".P12"))
{
props.put("com.ibm.ssl.trustStoreType", "PKCS12");
props.put("javax.net.ssl.trustStoreType", "PKCS12");
} else
{
props.put("com.ibm.ssl.trustStoreType", "JKS");
props.put("javax.net.ssl.trustStoreType", "JKS");
}
try
{
adminClient = AdminClientFactory.createAdminClient(props);
System.out.println("Connect to "+hostName+":"+portNumber+" Successfully");
}
catch (ConnectorException e)
{
System.out.println("Failed to Connect to "+hostName+":"+portNumber);
System.out.println("Exception creating admin client: " + e);
e.printStackTrace();
System.exit(-1);
}
}
it is better to use IBM WebSphere Application java to run the application. I see some exceptions if we use SUN Java.
Sunday, March 6, 2011
WPS - trace for Web Service request
Web Service is very important part in SOA world for WebSphere, both WAS and WPS. Sometimes, you need to check the contents of web service request and web service reply. the following trace will show these contents in trace.log
com.ibm.ws.webservices.trace.MessageTrace=all
enable it in runtime and you will see the following:
[3/6/11 22:05:13:697 EST] 000088de MessageTrace 3 WSWS3569I: Inbound HTTP SOAP request:
Content-Type: text/xml; charset=utf-8
Message contents:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://
www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processTicket xmlns="http://RSDWorld
/IF_RSD"><ticket xmlns="">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</soapenv:Body></soapenv:Envelope>
and
[3/6/11 22:05:14:198 EST] 000088de MessageTrace 3 WSWS3572I: Outbound HTTP SOAP response:
Content-Type: text/xml; charset=utf-8
Message contents:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body>xxxxxxxxxxxxxxxxxxxx
</soapenv:Body></soapenv:Envelope>
this trace works for both WAS and WPS
com.ibm.ws.webservices.trace.MessageTrace=all
enable it in runtime and you will see the following:
[3/6/11 22:05:13:697 EST] 000088de MessageTrace 3 WSWS3569I: Inbound HTTP SOAP request:
Content-Type: text/xml; charset=utf-8
Message contents:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://
www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><processTicket xmlns="http://RSDWorld
/IF_RSD"><ticket xmlns="">xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</soapenv:Body></soapenv:Envelope>
and
[3/6/11 22:05:14:198 EST] 000088de MessageTrace 3 WSWS3572I: Outbound HTTP SOAP response:
Content-Type: text/xml; charset=utf-8
Message contents:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header/><soapenv:Body>xxxxxxxxxxxxxxxxxxxx
</soapenv:Body></soapenv:Envelope>
this trace works for both WAS and WPS
Wednesday, March 2, 2011
WAS7 - "enum cannot be resolved to a type” error when deploying the module on WAS7
When deploying an EAR file including source code, you may see the error "enum cannot be resolved to a type" error and the EAR file failed to deploy.
for solve this issue:
(1) In RAD, select the EAR project, then click "Project"->"Properties", click "Java Compiler" , make sure "Compiler compliance level" is 1.6
(2) export the EAR file with the option "Export source files"
when deploying the EAR file from WebSphere Administrative console, you have to specify the "JDK Compliance Level" as "6.0" , see the following screenshot
After specified the JDK Compliance level correctly, the error should be gone.
for solve this issue:
(1) In RAD, select the EAR project, then click "Project"->"Properties", click "Java Compiler" , make sure "Compiler compliance level" is 1.6
(2) export the EAR file with the option "Export source files"
when deploying the EAR file from WebSphere Administrative console, you have to specify the "JDK Compliance Level" as "6.0" , see the following screenshot
After specified the JDK Compliance level correctly, the error should be gone.
Monday, February 28, 2011
WPS - Uninstall WPS6.1 silently in AIX
Compared with uninstalling WPS6.0, it is much easier to uninstall WPS6.1 silently on AIX.
IBM introduced more parameters for uninstall scripts. You can follow the steps
(1) stop All WPS6.1 processes.
(2) logon the WPS server with the user "root"
(3) go to the directory /IBM/WebSphere/ProcServer/uninstall.wbi
(4) run the following command:
./uninstall -OPT isUmbrellaUninstall="true" -OPT removeProfilesOnUninstall="true" -silent
the output should like this:
I Process Type: uninstall
I Install Type: nonOS400
I Install Mode: silentMode
I #Received OPT Properties
#Mon Feb 28 10:38:27 EST 2011
isUmbrellaUninstall=true
removeProfilesOnUninstall=true
INSTCONFPARTIALSUCCESS: The profiles no longer exist, but errors occurred. For more information, consult /IBM/WebSphere/ProcServer/logs/manageprofiles/deleteAll.log.
you may see some alerts, but when you check the log file, you will see the the profile already removed.
<logger>com.ibm.wsspi.profile.WSProfileCLI</logger>
<level>INFO</level>
<class>com.ibm.wsspi.profile.WSProfileCLI</class>
<method>invokeWSProfile</method>
<thread>11</thread>
<message>Returning with return code: INSTCONFSUCCESS</message>
</record>
and if you check the unistall log files at the directory /IBM/WebSphere/ProcServer/logs/uninstall, you will see uninstall is successful.
(Feb 28, 2011 10:49:00 AM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFSUCCESS
At the same time, on AIX, you can run "lslpp -l |grep -i websphere" to check if the WebSphere package already removed
(5) remove the WebSphere directories.
IBM introduced more parameters for uninstall scripts. You can follow the steps
(1) stop All WPS6.1 processes.
(2) logon the WPS server with the user "root"
(3) go to the directory /IBM/WebSphere/ProcServer/uninstall.wbi
(4) run the following command:
./uninstall -OPT isUmbrellaUninstall="true" -OPT removeProfilesOnUninstall="true" -silent
the output should like this:
I Process Type: uninstall
I Install Type: nonOS400
I Install Mode: silentMode
I #Received OPT Properties
#Mon Feb 28 10:38:27 EST 2011
isUmbrellaUninstall=true
removeProfilesOnUninstall=true
INSTCONFPARTIALSUCCESS: The profiles no longer exist, but errors occurred. For more information, consult /IBM/WebSphere/ProcServer/logs/manageprofiles/deleteAll.log.
you may see some alerts, but when you check the log file, you will see the the profile already removed.
<logger>com.ibm.wsspi.profile.WSProfileCLI</logger>
<level>INFO</level>
<class>com.ibm.wsspi.profile.WSProfileCLI</class>
<method>invokeWSProfile</method>
<thread>11</thread>
<message>Returning with return code: INSTCONFSUCCESS</message>
</record>
and if you check the unistall log files at the directory /IBM/WebSphere/ProcServer/logs/uninstall, you will see uninstall is successful.
(Feb 28, 2011 10:49:00 AM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFSUCCESS
At the same time, on AIX, you can run "lslpp -l |grep -i websphere" to check if the WebSphere package already removed
(5) remove the WebSphere directories.
Saturday, February 26, 2011
WAS7 - Busines level Application can not be removed
In WAs7, IBM introduced the new concept BLA (business level application) which can include EAR, JAR or share libraries.
However, some times when you update a EAR file from console but failed, which cause the Enterprise Application was removed but BLA was still left. When you redeploy the same module, the module can not be deployed, and you will see the following error when you want to delete the existing BLA:
CWWMH0149E: Cannot delete business-level application "WebSphere:blaname=AppEAR" because it contains composition units. Delete all composition units which belong to the business-level application, and then delete the business-level application. Check log for details.
As a matter of fact, you already removed all composition units, and you can not see any composition units belong to this BLA from administrative console or even using wsadmin scripts.
Here is a way for how to remove the isolated BLA if BLA can not be removed without any composition units belonging to it.
1) stop the WebSphere Application Server.
2) backup the WebSphere profile configuration using "backupConfig.sh" command
3) go to directory <ProfileDir>/config/cells/<CellName>/blas
4) remove the directory of specified BLA
5) go to directory <ProfileDir>/config/cells/<CellName>/cus
6) remove the directory of specified BLA
7) go to directory <ProfileDir>config, remove temp directory
8) go to directory <ProfileDir>, remove wstemp and temp directory
9) restart the WebSphere Application Server
10) redeploy the module.
this is the way I solved this problem. I hope someone can provide the better way to solve this issue.
However, some times when you update a EAR file from console but failed, which cause the Enterprise Application was removed but BLA was still left. When you redeploy the same module, the module can not be deployed, and you will see the following error when you want to delete the existing BLA:
CWWMH0149E: Cannot delete business-level application "WebSphere:blaname=AppEAR" because it contains composition units. Delete all composition units which belong to the business-level application, and then delete the business-level application. Check log for details.
As a matter of fact, you already removed all composition units, and you can not see any composition units belong to this BLA from administrative console or even using wsadmin scripts.
Here is a way for how to remove the isolated BLA if BLA can not be removed without any composition units belonging to it.
1) stop the WebSphere Application Server.
2) backup the WebSphere profile configuration using "backupConfig.sh" command
3) go to directory <ProfileDir>/config/cells/<CellName>/blas
4) remove the directory of specified BLA
5) go to directory <ProfileDir>/config/cells/<CellName>/cus
6) remove the directory of specified BLA
7) go to directory <ProfileDir>config, remove temp directory
8) go to directory <ProfileDir>, remove wstemp and temp directory
9) restart the WebSphere Application Server
10) redeploy the module.
this is the way I solved this problem. I hope someone can provide the better way to solve this issue.
Monday, February 14, 2011
WPS--Clean the events in WPS CEI Database
The CEI Events in WPS CEI Database will be increasing with more and more business transactions were processed and will take a lot of hard disk.
Here is how to Clean the events in CEI Database.
1) run the command
wsadmin.sh -f eventbucket.jacl -change -serverName server1
this command will switch the event bucket from 0 to 1 or 1 to 0 depending on which one is current event bucket.
To check the current event, use the following command
wsadmin.sh -f eventbucket.jacl -status -serverName server1
2) log on to the database server (here the database is DB2), then issue the command with the db2 instance owner.
fastpurge.sh CEIDB db2instance1 password=password
(3) run reorg.sh to reorganize the database
reorg.sh CEIDB db2instance1 password=password
(4) run runstats.sh to run statistics on database
runstats.sh CEIDB db2instance1 password=password
Note:
1) when you run eventbucket.jacl in cluster environment, you may see the following errors:
WASX7017E: Exception received while running
file "$WAS_HOME/util/event/eventpurge.jacl"; exception
information: javax.management.InstanceNotFoundException: *:*)
this bug will be fixed in WPS7.0.0.17 (http://www-01.ibm.com/support/docview.wss?uid=swg1PM21539). However, you can ask IBM to provide the updated com.ibm.events.client.jar, and then you will run it like the following command
wsadmin.sh -f eventbucket.jacl -status -clusterName SupportCluster
2) fastpurge.sh, reorg.sh and runstats.sh can be found at the directory <profileDir>/dbscripts/CEI/DB2/CEIDB on stand-alone server, and can be found at the directory <profileDir>/databases/event/clusterName/dbscripts/db2 on cluster environment.
Here is how to Clean the events in CEI Database.
1) run the command
wsadmin.sh -f eventbucket.jacl -change -serverName server1
this command will switch the event bucket from 0 to 1 or 1 to 0 depending on which one is current event bucket.
To check the current event, use the following command
wsadmin.sh -f eventbucket.jacl -status -serverName server1
2) log on to the database server (here the database is DB2), then issue the command with the db2 instance owner.
fastpurge.sh CEIDB db2instance1 password=password
(3) run reorg.sh to reorganize the database
reorg.sh CEIDB db2instance1 password=password
(4) run runstats.sh to run statistics on database
runstats.sh CEIDB db2instance1 password=password
Note:
1) when you run eventbucket.jacl in cluster environment, you may see the following errors:
WASX7017E: Exception received while running
file "$WAS_HOME/util/event/eventpurge.jacl"; exception
information: javax.management.InstanceNotFoundException: *:*)
this bug will be fixed in WPS7.0.0.17 (http://www-01.ibm.com/support/docview.wss?uid=swg1PM21539). However, you can ask IBM to provide the updated com.ibm.events.client.jar, and then you will run it like the following command
wsadmin.sh -f eventbucket.jacl -status -clusterName SupportCluster
2) fastpurge.sh, reorg.sh and runstats.sh can be found at the directory <profileDir>/dbscripts/CEI/DB2/CEIDB on stand-alone server, and can be found at the directory <profileDir>/databases/event/clusterName/dbscripts/db2 on cluster environment.
Monday, January 31, 2011
WPS 7 - install an ifix silently with IBM Installation Manager
From WebSphere 7, IBM recommend to install all fixes with IBM Installation Manager for WebSphere. However, IBM, for now, still keeps UpdateInstaller for installing the ifixes for WAS7. Although UpdateInstaller can install ifixes for WPS7 through specifing the pak file location, you will not see the installed ifixes in IBM Installation Manager, which is not easy to managment the ifixes.
so I recommend to install WPS7 ifixes (JRXXXXX) using IBM Installation Manager. But, it is slower if you use Installation Manager UI which was installed UNIX platform (must using Xterm) to install an ifix.
Here is the way to install and ifix silently for WPS 7
(1) copy WPS7 ifix to the temp directory, and unzip it. In general, an ifix for WPS7 is a ZIP format file. for example, 7.0.0.3-WS-WBI-MultiOS-IFJR38536.zip
(2) go to the directory /IBM/InstallationManager/eclipse
(3) create a installation response xml file, for example, JR38536_repsonsefile.xml, the content should be like this and change the necessary fields. see the bold type character
<?xml version="1.0" encoding="UTF-8"?>
<!--
#######################################
# If you have read and agree to the license agreement, change acceptLicense to true.
#######################################
-->
<agent-input acceptLicense='true'>
<!--
################ REPOSITORY LOCATION #######
# Provide the location where the repositories can be found.
# This can either be a folder on your local system or a URL location within your
# intranet
# The location should be enclosed in single quotes.
#############################################
-->
<server>
<repository location='/IBM/fixpack/7.0.0.3-WS-WBI-MultiOS-IFJR38536'/>
</server>
<!--
############## INTERIM FIXES TO INSTALL #########
# profile: Provide the ID of the package where WebSphere Application Server ND
# v7.0.0.7 or later was installed.
# This ID can be obtained from the installed.xml file found in
# Linux/Unix: /var/ibm/InstallationManager (root user)
# or /home/<user>/var/ibm/InstallationManager (non-root user)
# Windows: C:\Documents and Settings\All Users\Application Data\IBM\Installation
# Manager
# from the following element:
# <location id='IBM WebSphere Application Server - ND' kind='product'
# path='/export/home/wps/wpsv7/ProcServer'>
#
# Select the ID of the WebSphere Process Server location that you want to install
# this fix onto.
# e.g. id='IBM WebSphere Application Server - ND_20091213_1600' if you used the
# Launchpad to install and import your WebSphere Application Server
# If you manually installed and imported WebSphere Application Server, the ID is
# likely IBM WebSphere Application Server - ND (ND_1, ND_2, etc...)
#
# id: ID of the Fix being installed.
# version: version of the Fix being installed.
# This can be obtained from the repository.xml under the unzipped fix location.
# <fix id='JR35042_WBI;ESB' version='7.0.0.20091210_1320' .... >
#####################################################
-->
<install modify='false'>
<offering profile='IBM WebSphere Application Server - ND' id='7.0.0.3-WS-WBI-MultiOS-IFJR38536' version='0.0.0.20110117_1514' />
</install>
<preference value='30' name='com.ibm.cic.common.core.preferences.connectTimeout'/>
<preference value='30' name='com.ibm.cic.common.core.preferences.readTimeout'/>
<preference value='0'
name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount'/>
<!--
#####################################################
# If you have internet access then set the value of
# 'offering.service.repositories.areUsed' to true, otherwise leave it as false
#####################################################
-->
<preference value='false' name='offering.service.repositories.areUsed'/>
<preference value='false'
name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode'/>
<preference value='false'
name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication'/>
<preference value='true'
name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts'/>
<preference value='false' name='PassportAdvantageIsEnabled'/>
<!--
#####################################################
# If you have internet access then set the value of
# 'com.ibm.cic.common.core.preferences.searchForUpdates' to true, otherwise leave it
# as false
#####################################################
-->
<preference value='false'
name='com.ibm.cic.common.core.preferences.searchForUpdates'/>
<preference value='true' name='com.ibm.cic.common.core.preferences.import.enabled'/>
</agent-input>
(4) run the following command to install an ifix silently
./IBMIM "--launcher.ini" silent-install.ini -input JR38536_repsonsefile.xml -log JR38536IfixInstall.log
(5) check JR38536IfixInstall.log to see if the error happen, if no error happen, the log file should be like this:
<?xml version="1.0" encoding="UTF-8"?>
<result>
</result>
Note: you can also find the information from the following IBM links:
https://www-304.ibm.com/support/docview.wss?uid=swg21417656
For now, all WAS7 ifixes can be installed with UpdateInstaller.
so I recommend to install WPS7 ifixes (JRXXXXX) using IBM Installation Manager. But, it is slower if you use Installation Manager UI which was installed UNIX platform (must using Xterm) to install an ifix.
Here is the way to install and ifix silently for WPS 7
(1) copy WPS7 ifix to the temp directory, and unzip it. In general, an ifix for WPS7 is a ZIP format file. for example, 7.0.0.3-WS-WBI-MultiOS-IFJR38536.zip
(2) go to the directory /IBM/InstallationManager/eclipse
(3) create a installation response xml file, for example, JR38536_repsonsefile.xml, the content should be like this and change the necessary fields. see the bold type character
<?xml version="1.0" encoding="UTF-8"?>
<!--
#######################################
# If you have read and agree to the license agreement, change acceptLicense to true.
#######################################
-->
<agent-input acceptLicense='true'>
<!--
################ REPOSITORY LOCATION #######
# Provide the location where the repositories can be found.
# This can either be a folder on your local system or a URL location within your
# intranet
# The location should be enclosed in single quotes.
#############################################
-->
<server>
<repository location='/IBM/fixpack/7.0.0.3-WS-WBI-MultiOS-IFJR38536'/>
</server>
<!--
############## INTERIM FIXES TO INSTALL #########
# profile: Provide the ID of the package where WebSphere Application Server ND
# v7.0.0.7 or later was installed.
# This ID can be obtained from the installed.xml file found in
# Linux/Unix: /var/ibm/InstallationManager (root user)
# or /home/<user>/var/ibm/InstallationManager (non-root user)
# Windows: C:\Documents and Settings\All Users\Application Data\IBM\Installation
# Manager
# from the following element:
# <location id='IBM WebSphere Application Server - ND' kind='product'
# path='/export/home/wps/wpsv7/ProcServer'>
#
# Select the ID of the WebSphere Process Server location that you want to install
# this fix onto.
# e.g. id='IBM WebSphere Application Server - ND_20091213_1600' if you used the
# Launchpad to install and import your WebSphere Application Server
# If you manually installed and imported WebSphere Application Server, the ID is
# likely IBM WebSphere Application Server - ND (ND_1, ND_2, etc...)
#
# id: ID of the Fix being installed.
# version: version of the Fix being installed.
# This can be obtained from the repository.xml under the unzipped fix location.
# <fix id='JR35042_WBI;ESB' version='7.0.0.20091210_1320' .... >
#####################################################
-->
<install modify='false'>
<offering profile='IBM WebSphere Application Server - ND' id='7.0.0.3-WS-WBI-MultiOS-IFJR38536' version='0.0.0.20110117_1514' />
</install>
<preference value='30' name='com.ibm.cic.common.core.preferences.connectTimeout'/>
<preference value='30' name='com.ibm.cic.common.core.preferences.readTimeout'/>
<preference value='0'
name='com.ibm.cic.common.core.preferences.downloadAutoRetryCount'/>
<!--
#####################################################
# If you have internet access then set the value of
# 'offering.service.repositories.areUsed' to true, otherwise leave it as false
#####################################################
-->
<preference value='false' name='offering.service.repositories.areUsed'/>
<preference value='false'
name='com.ibm.cic.common.core.preferences.ssl.nonsecureMode'/>
<preference value='false'
name='com.ibm.cic.common.core.preferences.http.disablePreemptiveAuthentication'/>
<preference value='true'
name='com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts'/>
<preference value='false' name='PassportAdvantageIsEnabled'/>
<!--
#####################################################
# If you have internet access then set the value of
# 'com.ibm.cic.common.core.preferences.searchForUpdates' to true, otherwise leave it
# as false
#####################################################
-->
<preference value='false'
name='com.ibm.cic.common.core.preferences.searchForUpdates'/>
<preference value='true' name='com.ibm.cic.common.core.preferences.import.enabled'/>
</agent-input>
(4) run the following command to install an ifix silently
./IBMIM "--launcher.ini" silent-install.ini -input JR38536_repsonsefile.xml -log JR38536IfixInstall.log
(5) check JR38536IfixInstall.log to see if the error happen, if no error happen, the log file should be like this:
<?xml version="1.0" encoding="UTF-8"?>
<result>
</result>
Note: you can also find the information from the following IBM links:
https://www-304.ibm.com/support/docview.wss?uid=swg21417656
For now, all WAS7 ifixes can be installed with UpdateInstaller.
Saturday, January 15, 2011
WebSphere - Check MQ Activation Spec Status
In WAS 7, IBM replaced the old MQ Listener port with MQ Activation Spec, and it is not easy to check the status of MQ Activation Spec from administrative console.
However, we can use jython script to get the MQ Activation Spec. Here is the jython script:
Assume the MQ Activation Spec JNDI is mq/TestMQ_AS
as_status will equals the following 3 value
1-->Active
2-->Inactive
3-->Stopped
I never get the as_status =3. If the module which is using the MQ Activation Spec is stopped. you will not get asId.
so I think in general, you will only get status as 1 or 2.
However, we can use jython script to get the MQ Activation Spec. Here is the jython script:
Assume the MQ Activation Spec JNDI is mq/TestMQ_AS
asId=AdminControl.queryNames('type=J2CMessageEndpoint,ActivationSpec=mq/TestMQ_AS,process=server1,*)
as_status=AdminControl.invoke(asId,'getStatus')
as_status will equals the following 3 value
1-->Active
2-->Inactive
3-->Stopped
I never get the as_status =3. If the module which is using the MQ Activation Spec is stopped. you will not get asId.
so I think in general, you will only get status as 1 or 2.
Subscribe to:
Posts (Atom)