Showing posts with label application server. Show all posts
Showing posts with label application server. Show all posts

Thursday, September 17, 2009

Poll: On what OS your WebSphere AppServer is installed ?

Poll results for : On what OS your WebSphere AppServer is installed ? , held between Aug 16th 2009 to Sep 16th 2009 and voted my about 86 voters.

Google Chart



You can still continue to vote though:

Poll: On what OS your WebSphere AppServer is installed ?





Tuesday, September 1, 2009

Running your own copy of production server instance in your desktop

Although the title seems little strange and scary I will explain to you in this article why it's needed, it's advantages and how you can setup easily without much changes. Being an Administrator and Support Engineer throughout my career i haven't seen an single I.T department having an exact replica of the production and testing/staging environment, there is always some difference between those environments like the most common is the amount of production data is not same as that of staging data which changes the equation of how the application behaves. There are situations where production support engineers won't even have access to staging/testing environments because it's either managed by a different vendor, or because of SOX compliance or due to various security reasons. Being an administrator , the application is kind of a black box compared to the developers where you might not have had much chance to play with it and understand how it really works, most of them you will come know from the word of mouth from the developers which sometimes may not be true in terms of how it's behaving in a production as they are aware only in terms how it worked in their development environment which is usually a standalone server compared to a usual cluster environment in production. During outages, you are more focused on bringing the server backup up instead of finding what caused the issue and most of the time it's too late or you don't have enough time to collect the data. Hence it is necessary in my opinion to have your own production copy , so that you can turn on traces , understand how the application works, understand the symptoms if some services breaks and find ways to fix it, so that when the real problem comes you will be prepared for it and tackle the problem quickly with little or no down time. Although many will disagree and you might want to explain the benefits which out weighs the problems.

You are basically going to run the server with a system proxifier like proxychains and tunneling all connections through the SSH proxy from your dekstop with ease without much modifications due to firewall restrictions. Here are some suggested steps,

1) Tar up your production server installation directory and untar it up in your desktop.

2) Make sure you create any directories or symbolic links that the server references that is not
included as a part of installation directory, like log and config directories.

3) Download and Install system proxifier proxychain .

4) Configure /etc/proxychains.conf to point to the socks server. (e.g) socks5 127.0.0.1 9050

5) If there are DNS name resolution issues follow the instructions Performing UDP tunneling through an SSH connection to setup local dns proxy server or enable proxy_dns property in /etc/proxychains.conf

6) Run a SSH proxy from your desktop , (e.g) ssh -D 9050 user@prod-servername.

7) start the server with proxychains or modify the startup script to include proxychains (e.g) proxychain /root/Desktop/jdk1.6.0_16//bin/java -Djava.util.logging.config.file=/opt/apache-tomcat-6.0.20/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.endorsed.dirs=/opt/apache-tomcat-6.0.20/endorsed -classpath :/opt/apache-tomcat-6.0.20/bin/bootstrap.jar -Dcatalina.base=/opt/apache-tomcat-6.0.20 -Dcatalina.home=/opt/apache-tomcat-6.0.20 -Djava.io.tmpdir=/opt/apache-tomcat-6.0.20/temp org.apache.catalina.startup.Bootstrap start
you can get the process string by doing ps -auxww after you normaly started the server. Now your server should be able to start and able to connect through the SSH proxy and proxychains output will show how the connections are made ,
(e.g)
ProxyChains-3.1 (http://proxychains.sf.net)
S-chain-<>-127.0.0.1:9050-<--timeout INFO: Mon Aug 31 22:37:41 PDT 2009: PlatformDetector detected platform: tomcat
S-chain-<>-127.0.0.1:9050-<>--10.23.23.11:1521--<>

8) website's domain/virtualhost mapping to your local ip to access the website in /etc/hosts. (e.g) www.example.com 127.0.0.1

Friday, December 7, 2007

How to identify running WebSphere process as Dmgr or Nodeagent or Appserver process ?

WebSphere processes are nothing but java application processes started with a long cmdline as below, which contains classpath , command line parameters, the Main java class and the arguments passed to it.

(e.g) Example of a websphere dmgr process in Linux
root 20308 0.2 2.6 450200 331496 ? S Dec06 3:39 /usr/IBM/WebSphere/AppServer/java/bin/java
-Xbootclasspath/p:/usr/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmorb.jar:/usr/IBM/WebSph
ere/AppServer/java/jre/lib/ext/ibmext.jar -Dwas.status.socket=62306 -classpath /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/properties:/usr/IBM/WebSphere/AppServer/properties:/usr/
IBM/WebSphere/AppServer/lib/bootstrap.jar:/usr/IBM/WebSphere/AppServer/lib/j2ee.jar:/usr/IB
M/WebSphere/AppServer/lib/lmproxy.jar:/usr/IBM/WebSphere/AppServer/lib/urlprotocols.jar -X
ms50m -Xmx256m -Dws.ext.dirs=/usr/IBM/WebSphere/AppServer/CEI/lib:/usr/IBM/WebSphere/A
ppServer/CEI/client:/usr/IBM/WebSphere/AppServer/java/lib:/usr/IBM/WebSphere/AppServer/pr
ofiles/Dmgr02/classes:/usr/IBM/WebSphere/AppServer/classes:/usr/IBM/WebSphere/AppServer
/lib:/usr/IBM/WebSphere/AppServer/installedChannels:/usr/IBM/WebSphere/AppServer/lib/ext:/u
sr/IBM/WebSphere/AppServer/web/help:/usr/IBM/WebSphere/AppServer/deploytool/itp/plugins/c
om.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/usr/IBM/WebSphere/AppServer/derby -
Dcom.ibm.itp.location=/usr/IBM/WebSphere/AppServer/bin -Djava.util.logging.configureByServer
=true -Dibm.websphere.preload.classes=true -Duser.install.root=/usr/IBM/WebSphere/AppServer/
profiles/Dmgr02 -Dwas.install.root=/usr/IBM/WebSphere/AppServer -Djava.util.logging.manage
r=com.ibm.ws.bootstrap.WsLogManager -Ddb2j.system.home=/usr/IBM/WebSphere/AppServer
/cloudscape -Dserver.root=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02 -Djava.awt.headless
=true -Djava.security.auth.login.config=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/properti
es/wsjaas.conf -Djava.security.policy=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/propertie
s/server.policy com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/config xx181uspln2Cell01 xx181uspln2CellManager01 dmgr


The normal process to list a process in Unix environment is to run ps -ef and grep the name of the process, if you now the name.(e.g) ps -ef grep java. The issue is that by default the OS will show 80 characters of the process string or to the widhth of the terminal which is anyway 80 by default in most of the terminals, hence if you try to list the websphere java process where different process types like dmgr, nodeagent, appserver all running in the same box you would pretty much get the same string as there won't be any noticable difference because the classpath, etc would be pretty much same for the all process. Hence we need to use the following ps command with addtional parameters for to indentify the respective websphere process.


To determine if Deployment Manager (dmgr) is running ,

AIX : ps -auxww grep dmgr
LINUX : ps -auxww grep dmgr
SOLARIS: /usr/ucb/ps -auxww grep dmgr (Note you need to run specifically from this directory , otherwise you will invoke ps from /usr/bin which will not like the arguments )

(e.g)
root 20308 0.2 2.6 450200 331496 ? S Dec06 3:39 /usr/IBM/WebSphere/AppServer/java/bin/java
-Xbootclasspath/p:/usr/IBM/WebSphere/AppServer/java/jre/lib/ext/ibmorb.jar:/usr/IBM/WebSph
ere/AppServer/java/jre/lib/ext/ibmext.jar -Dwas.status.socket=62306 -classpath /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/properties:/usr/IBM/WebSphere/AppServer/properties:/usr/
IBM/WebSphere/AppServer/lib/bootstrap.jar:/usr/IBM/WebSphere/AppServer/lib/j2ee.jar:/usr/IB
M/WebSphere/AppServer/lib/lmproxy.jar:/usr/IBM/WebSphere/AppServer/lib/urlprotocols.jar -X
ms50m -Xmx256m -Dws.ext.dirs=/usr/IBM/WebSphere/AppServer/CEI/lib:/usr/IBM/WebSphere/A
ppServer/CEI/client:/usr/IBM/WebSphere/AppServer/java/lib:/usr/IBM/WebSphere/AppServer/pr
ofiles/Dmgr02/classes:/usr/IBM/WebSphere/AppServer/classes:/usr/IBM/WebSphere/AppServer
/lib:/usr/IBM/WebSphere/AppServer/installedChannels:/usr/IBM/WebSphere/AppServer/lib/ext:/u
sr/IBM/WebSphere/AppServer/web/help:/usr/IBM/WebSphere/AppServer/deploytool/itp/plugins/c
om.ibm.etools.ejbdeploy/runtime -Dderby.system.home=/usr/IBM/WebSphere/AppServer/derby -
Dcom.ibm.itp.location=/usr/IBM/WebSphere/AppServer/bin -Djava.util.logging.configureByServer
=true -Dibm.websphere.preload.classes=true -Duser.install.root=/usr/IBM/WebSphere/AppServer/
profiles/Dmgr02 -Dwas.install.root=/usr/IBM/WebSphere/AppServer -Djava.util.logging.manage
r=com.ibm.ws.bootstrap.WsLogManager -Ddb2j.system.home=/usr/IBM/WebSphere/AppServer
/cloudscape -Dserver.root=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02 -Djava.awt.headless
=true -Djava.security.auth.login.config=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/properti
es/wsjaas.conf -Djava.security.policy=/usr/IBM/WebSphere/AppServer/profiles/Dmgr02/propertie
s/server.policy com.ibm.ws.bootstrap.WSLauncher com.ibm.ws.runtime.WsServer /usr/IBM/WebS
phere/AppServer/profiles/Dmgr02/config xx181uspln2Cell01 xx181uspln2CellManager01 dmgr
Simlarly you can find for other types of WebSphere processes:
To determine if Nodeagent is running ,
AIX : ps -auxww grep nodeagent

LINUX : ps -auxww grep nodeagent
SOLARIS : /usr/ucb/ps -auxww grep nodegent (Note you need to run specifically from this directory , otherwise you will invoke ps from /usr/bin which will not like the arguments )



To determine if AppServer is running ,

AIX : ps -auxww grep <appservername>
LINUX : ps -auxww grep <appservername>
SOLARIS: /usr/ucb/ps -auxww grep <appservername> (Note you need to run specifically from this directory , otherwise you will invoke ps from /usr/bin which will not like the arguments )

(e.g) ps -auxww grep server1 - to list the process of websphere Applicatoin Server named server1.

(e.g) ps -auxww grep WsServer - to list all the process of the websphere installation.