Tuesday, November 11, 2014

Typical example of WAS environment with Job Manager

Typical example topology shows a deployment manager and a federated node that is managed by the deployment manager on machine A; two application servers, Profile01 and Profile 02, registered with an administrative agent on machine C, a job manager on machine D, and a web server on machine B. Firewalls provide additional security for the machines. The administrative agent and the deployment manager are registered to the job manager. The administrative agent and deployment manager periodically poll the job manager to determine whether the job manager posted jobs that require action.

 

Monday, December 3, 2012

IBM HTTP server status monitoring page


Now by enabling server-status on IBM HTTP Server, below details can be obtained :
  • The CPU usage
  • The total number of requests served since the server is up
  • The total traffic size since the server is up
  • Some average about the response time
  • The number of requests currently running
  • The number of idle threads
  • And the list of the requests being processe

To enable the server status monitoring page, perform the following steps:
1. Edit the httpd.conf file, and remove the comment character (#) from the 
following lines in this file:
#LoadModule status_module, modules/ApacheModuleStatus.dll,
#  < Location/server-status >
#SetHandler server-status
# < /Location >

2. Save the changes, and restart IBM HTTP Server.
3. In a web browser, access URL :  http://hostname/server-status. 

Click Reload to update the status. Also , 

http://your_host/server-status?refresh=10 to refresh every 10 seconds

---- courtesy ibm redbook ---- 


Tuesday, September 18, 2012

Recover password from .sth file

Create perl file (unstash.pl) and run the script.

#!/usr/bin/perl

#usage perl unstash.pl

use strict;

die "Usage: $0 \n" if $#ARGV != 0;

my $file=$ARGV[0];
open(F,$file) || die "Can't open $file: $!";

my $stash;
read F,$stash,1024;

my @unstash=map { $_^0xf5 } unpack("C*",$stash);

foreach my $c (@unstash) {
   last if $c eq 0;
   printf "%c",$c;
}


----------------------------------------------------------------------------------------------

Note : Content is taken from : http://websphere-world.blogspot.sg/2011/07/decrypt-ibm-stash-files.html

Sunday, November 15, 2009

creation of profiles in WAS 7

When you execute wasprofile command in WAS 7, it will throw error :

C:\IBM\WebSphere\AppServer\bin>wasprofile.bat
CWMBU0001I: The wasprofile.bat script has been deprecated and replaced by the ma
nageprofiles.bat script.
manageprofiles requires an argument
Run manageprofiles -help or visit our Information Center at: http://www14.software.ibm.com/webapp/wsbroker/redirect?version=p
ix&product=was-nd-dist&topic=rxml_manageprofiles

1. To list number of profiles, execute command

manageProfiles -listProfiles

eg. C:\IBM\WebSphere\AppServer\bin>manageProfiles -listProfiles

2. To delete all the existing profiles, execute
C:\IBM\WebSphere\AppServer\bin>manageProfiles.bat -deleteAll
INSTCONFSUCCESS: Success: All profiles are deleted.

Once profile is deleted, remove left directories manually.
To delete directories recursively in windows use command :
rmdir /s /q

3. Create new prfoiles including deployment manager
Now this could be interesting which directory could be recommended, many user creates profiles under path WebSphere\AppServer\profiles\\, now this works without issue in unix flavor but in case if 32 bit Windows there is limitation of 255 characters in path. So many people prefer to create profiles like :\IBM\Profiles\\

Command to create new profile :
Syntax : manageProfiles -create -profileName -profilePath -templatePath -nodeName -cellName -hostname -serverName -startingPort 10000 -winserviceCheck

eg : C:\IBM\WebSphere\AppServer\bin>manageProfiles -create -profileName AppSrv01 -profilePath C:\IBM\profiles\AppSrv01 -nodeName AppSrv01Node -cellName AppSrv01Cell -hostname localhost -serverName server -startingPort 10000 -winserviceCheck false

gives output as

INSTCONFSUCCESS: Success: Profile AppSrv01 now exists. Please consult C:\IBM\pro
files\AppSrv01\logs\AboutThisProfile.txt for more information about this profile.

4. to check the ports assigned and other details for new profiles check the file at
\logs\AboutThisProfile.txt

C:\IBM\WebSphere\AppServer\bin>type \IBM\profiles\AppSrv01\logs\AboutThisProfile.txt

5.

start Deployment Manager by some other command

Wow, I got amazed when I tried this today, and it worked when I executed the below command to start the Deployment Manager.

\wasprofile\\bin\startServer.sh dmgr - to start
\wasprofile\\bin\stopServer.sh dmgr - to stop
One can also use the command startManager command to start/stop the DMGR

Thursday, May 28, 2009

Disabling security for WAS admin console - very famous

You can disable administrative security using the command line:

1. At the command prompt, type the following:
\bin\wsadmin.bat -conntype NONE

2. When the system command prompt re-displays, type:
securityoff

3. When done, type exit and restart the application server.

This procedure should work without any problem, but in the event that it fails, you can disable administrative security by directly editing the security.xml file

profile_home\config\cells\cell_name\

Open this file and change the security attribute enabled=true to enabled=false.
Other security properties, such as Java 2 security and application security, can also be found in this file. Modifying the XML file should only be done as a last resort. Be sure to save an original copy of the security.xml file before making any modification.

how to configure WAS to stop application server without prompting for password even though security is enabled

  1. If you are using the SOAP connection type (default) to stop the server, edit the following file:
profile_home\properties\soap.client.props

Then, change the values of these properties:
com.ibm.SOAP.securityEnabled=true
com.ibm.SOAP.loginUserid=
com.ibm.SOAP.loginPassword=

Again, the user ID , with its password , is the user ID with Administrator role rights or the primary administrative user name defined in the user account repository.

2. We recommend that you encode the com.ibm.SOAP.loginPassword property
value using:

\bin\PropFilePasswordEncoder.bat soap.client.props com.ibm.SOAP.loginPassword
Examine the result and remove the backup file, soap.client.props.bak, created by the command used previously. It contains the unencrypted password.

3. Try stopping the JVM, without giving user id and password.