Monday, December 27, 2010

WSADMIN to use an alternate soap.client.props file

Purpose:
Make WSADMIN to use an alternate soap.client.props file.One of the situation where this is very much useful is for HealthCheck scripts.We can pre-populate login and password (encoded) in soap.client.props and can make sure HC script calls wsadmin with that alternate config file (wsadmin -p text_file)

Implementation:
1.)Make a copy of soap.client.props.

cp /usr/IBM/WebSphere/profiles/t1dmgr/properties/soap.client.props
/properties/hc/soap.client.HC.props

Pre-populate the following properties with values:
eg:
com.ibm.SOAP.loginUserid='wasadmin'
com.ibm.SOAP.loginPassword='password'


2.)To encode 'com.ibm.SOAP.loginPassword' in soap.client.HC.props,run the command PropFilePasswordEncoder.sh
$ PropFilePasswordEncoder.sh /properties/hc/soap.client.HC.props com.ibm.SOAP.loginPassword
Create a backup file of the original properties file which contains unencoded passwords? (y/n)
y
NOTE: Backup file /properties/hc/soap.client.HC.props.bak contains unencoded passwords

3.)Create a java properties file(text_file) and specify the location soap.client.HC.props in the property as below
com.ibm.SOAP.ConfigURL=/properties/hc/soap.client.HC.props

4.)Execute wsadmin with option -p:
wsadmin.sh -p text_file
It will connect to wsadmin shell using the encrypted password from the alternative PROPS file from /properties/hc/soap.client.HC.props

Thursday, December 23, 2010

WebServer6.0

PROBLEM:

PK73169: UNABLE TO START OR STOP IBM HTTP SERVER 6.1 FROM WEBSPHERE APPLICATION SERVER ADMINISTRATIVE CONSOLE WHEN USING CMD.EXE

POSSIBLE SOLUTION: 


 In the WebSphere Application Server v6.1 Administrative
      Console, when a web server definition is created for an IBM
      Http Server v6.1, the Process Definition has these settings by
      default:

      Executable name = cmd.exe

      startCommand = cmd.exe

      startCommandArgs =
      /c
      ${WEB_INSTALL_ROOT}/bin/apache.exe
      -k
      start
      -n
      IBMHTTPServer6.1
      -f
      ${WEB_INSTALL_ROOT}/conf/httpd.conf

      stopCommand = cmd.exe

      stopCommandArgs =
      /c
      ${WEB_INSTALL_ROOT}/bin/apache.exe
      -k
      stop
      -n
      IBMHTTPServer6.1
      -f
      ${WEB_INSTALL_ROOT}/conf/httpd.conf

      With these default settings, when the administrator tries to
      start or stop the web server, they get an error that says:

      Windows Service name IBMHTTPServer6.1 on Node01/webserver1 Web
      server could not be started (or stopped).

      This problem happens only on Microsoft Windows operating
      system, and is related to the use of the cmd.exe as the start
      and stop commands.

Local fix:


      The work-around is to put the Apache.exe command into the
      Executable name, and startCommand, and stopCommand as follows.

      Change the web server Process Definition settings to this:

      Executable name = Apache.exe

      startCommand = ${WEB_INSTALL_ROOT}\bin\Apache.exe

      startCommandArgs =
      -k
      start
      -n
      IBMHTTPServer6.1
      -f
      ${WEB_INSTALL_ROOT}/conf/httpd.conf

      stopCommand = ${WEB_INSTALL_ROOT}\bin\Apache.exe

      stopCommandArgs =
      -k
      stop
      -n
      IBMHTTPServer6.1
      -f
      ${WEB_INSTALL_ROOT}/conf/httpd.conf

 
-------------------------------END OF DOCUMENT------------------------------------------