ProblemDetermination: wsadmin utility for versions 5.0, 5.1 and 6.0
 Technote (troubleshooting)
 
Problem(Abstract)

This is a problem determination document to assist in the analysis of problems with the wsadmin utility in IBM® WebSphere® Application Server. This should help address common issues with this component before calling IBM support and save you time.
 
Resolving the problem
Overview:

Useful Log files:
The following logs can be helpful in determining why you cannot administer Application Server with wsadmin:
  • Application server logs
  • wsadmin.traceout - Look above at Mustgather link for location of this file
  • Management script log files if appropriate
  • Trace from the management script if appropriate

How to read trace logs associated with wsadmin problems:
  • How do you determine that wsadmin environment is correctly initialized:
  • This check helps in determining the time stamp of when the wsadmin environment was completely initialized and ready to execute commands.
    • If wsadmin is started from a command line then you should see the following in the wsadmin.traceout:


      V5:

      [8/29/06 16:15:42:328 EDT] f1fc06a WasxShell < welcome
      [8/29/06 16:15:42:328 EDT] f1fc06a AbstractShell > interactive
      [8/29/06 16:15:42:328 EDT] f1fc06a AbstractShell > getCommand

      V6:

      [8/29/06 15:46:16:343 EDT] 0000000a WasxShell < welcome Exit
      [8/29/06 15:46:16:343 EDT] 0000000a AbstractShell > interactive Entry
      [8/29/06 15:46:16:343 EDT] 0000000a AbstractShell > getCommand Entry

    • If wsadmin is started by using -f parameter (executing scripts) then you should see the following in the wsadmin.traceout


      [8/29/06 15:45:05:740 EDT] 77afde1d AbstractShell A WASX7091I: Executing script: "/myhome/AppStatus.jacl"

      NOTE: AppStatus.jacl in above example trace is the name of the script that was executed using the following command:

      wsadmin.sh -f /myhome/AppStatus.jacl

  • Problem: Unable to start and get a prompt to run wsadmin commands.
Enable tracing per following technote:
Mustgather V5.0 & V6.0: Administrative_Scripting_Tools_for_example_wsadmin_or_ANT_/swg21140940.html

The output on the command line shows the following:


WASX7023E: Error creating "SOAP" connection to host "localhost"; exception information: com.ibm.websphere.management.exception.ConnectorNotAvailableException


Open the wsadmin.traceout. Look at the Mustgather links above for location of the wsadmin.properties file. The following is an example of a trace you might see:

Here is what you will see in wsadmin.traceout:


[8/15/06 10:31:07:172 EDT] ff95e8d SOAPConnector < reconnect
[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused: connect;
targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused: connect]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
..... (edited out the rest of the stack trace)

[8/15/06 10:31:07:188 EDT] ff95e8d AdminClientFa d try alternative connector properties after receiving the following exception
java.lang.reflect.InvocationTargetException: com.ibm.websphere.management.exception.ConnectorNotAvailableException
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.reconnect(SOAPConnectorClient.java:251)
.... (edited out the rest of the stack trace)

---- Begin backtrace for nested exception
[SOAPException: faultCode=SOAP-ENV:Client; msg=Error opening socket: java.net.ConnectException: Connection refused: connect; targetException=java.lang.IllegalArgumentException: Error opening socket: java.net.ConnectException: Connection refused: connect]
at org.apache.soap.transport.http.SOAPHTTPConnection.send(Unknown Source)
at org.apache.soap.rpc.Call.invoke(Unknown Source)
.... (edited out the rest of the stack trace)ner.java:1047)


Resolution:

This problem can occur because the Application Server to which you are trying to connect is not running, or you are trying to connect to the wrong port number.

First, verify and make sure the server is up and running by looking at the systemout.log file for the server you are trying to connect to.

Second, verify the port that wsadmin is trying to connect to by looking at the wsadmin.properties file.


com.ibm.ws.scripting.host=hostname
com.ibm.ws.scripting.port=8879

Compare the above port number to the entry in the SystemOut.log from the application server. This tells you on which port the application server is actually listening for SOAP connections as shown in example below:


[8/15/06 10:22:07:188 EDT] 0000000a JMXSoapAdapte A ADMC0013I: The SOAP
connector is available at port 8879


If the host and port are out of sync then your wsadmin.properties file is out of sync and will need to be modified with the correct hostname and port number. Use the systemout.log file to retrieve the correct values for hostname and port number.

You can also use the telnet command to try and get a connection to the host name and port:


telnet myHostName 8879

Connecting To myHostName...Could not open a connection to host on port 8879 : Connect failed



Note that even if you can connect, you will not be able to do anything because Application Server does not respond to telnet commands. You can close your telnet session by pressing Ctrl+c.

Alternatively, you can use -host and -port arguments as follows:


./wsadmin.sh -host myHostName -port 8879


The above arguments will override the values specified in wsadmin.properties file.
Problem: Unable to start wsadmin when security is enabled

The output on the command line shows the following:


WASX7246E: Cannot establish "SOAP" connection to host "localhost" because of an authentication failure. Ensure that user and password are correct on the command line or in a properties file.
Exception message (if any): "ADMN0022E: Access denied for the getProcessType operation on Server MBean due to insufficient or empty credentials."


Open the wsadmin.traceout. Look at the Mustgather links above for location of the wsadmin.properties file. The following is an example of a trace you might see:



[8/15/06 16:35:15:906 EDT] fe68834 SOAPConnector < handleAdminFault
javax.management.JMRuntimeException: ADMN0022E: Access denied for the getProcessType operation on Server MBean due to insufficient or empty credentials.
at com.ibm.ws.management.connector.soap.SOAPConnectorClient.handleAdminFault(SOAPConnectorClient.java:611)



Resolution:

This problem can occur because the Application Server to which you are trying to connect is running but security is enabled. Thus the security credentials must be passed to wsadmin via command line or if not specified on the command line then they must exist in wsadmin.properties file.



./wsadmin.sh -user wasUser -password password

 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers Runtimes for Java Technology Java SDK
 
Product Alias/Synonym
ProblemDeterminationDocument
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Administrative Scripting Tools (for example: wsadmin or ANT)
Operating system(s): Windows
Software version: 6.0
Software edition:
Reference #: 1245064
IBM Group: Software Group
Modified date: Aug 31, 2006