Problems starting or using the wsadmin command
What kind of problem are you having?
- "WASX7023E: Error creating "SOAP" connection to host" or similar error trying to launch wsadmin command line utility.
- "com.ibm.bsf.BSFException: error while eval'ing Jacl expression: no such method "<command name>" in class com.ibm.ws.scripting.AdminConfigClient" returned from wsadmin command.
- WASX7022E returned from running "wsadmin -c ..." command, indicating invalid command.
- com.ibm.ws.scripting.ScriptingException: WASX7025E: String "" is malformed; cannot create ObjectName.
- "The input line is too long" error returned from the wsadmin command on a Windows platform.
If you do not see your problem here:
- If you are not able to enter wsadmin command mode, try running wsadmin -c "$Help wsadmin" for help in verifying that you are entering the command correctly.
- If you can get the wsadmin command prompt, enter $Help help to verify that you are using specific commands correctly.
- wsadmin commands are a superset of Jacl (Java Command Language), which is in turn a Java-based implementation of the Tcl command language. For details on Jacl syntax beyond wsadmin commands, refere to the Tcl developers' site, http://www.tcl.tk . For specific details relating to the Java implementation of Tcl, refer to http://www.tcl.tk/software/java .
- Browse the install_dir/logs/wsadmin.traceout file for clues.
- Keep in mind that wsadmin.traceout is refreshed (existing log records are deleted) whenever a new wsadmin session is started.
- If the error returned by wsadmin does not seem to apply to the command you entered, for example, you receive WASX7023E, stating that a connection could not be created to host "myhost," but you did not specify "-host myhost" on the command line, examine the properties files used by wsadmin to determine what properties are specified. If you do not know what properties files were loaded, look for the WASX7326I messages in the wsadmin.traceout file; there will be one of these messages for each properties file loaded.
If none of these steps fixes your problem, check to see if the problem has been identified and documented by looking at the available online support (hints and tips, technotes, and fixes). If you don't find your problem listed there contact IBM support.
"WASX7023E: Error creating "SOAP" connection to host" or similar error trying to launch wsadmin command line utility
By default, the wsadmin utility attempts to connect to an appserver at startup. This is because some commands act upon running appservers. This error indicates that no connection could be established.
To resolve this problem:
- If you are not sure whether an appserver is running, start it by entering startserver servername from the command prompt. If the server is already running, you will see an error similar to "ADMU3027E: An instance of the server is already running".
- If you are running a Network Deployment configuration, you will first need to start the deployment manager by running "startManager" or "startManager.sh" from the install_dir/bin directory. Then you can launch wsadmin immediately to connect to the deployment manager, or start a node and appserver to connect to.
- If an appserver is running and you still get this error:
- If you are running remotely (that is, on a different machine from the one running WebSphere Application Server), use the -host hostname option to the wsadmin command to direct wsadmin to the right physical server.
- If you are using the -host option, try pinging the server machine from the command line from the machine on which you are trying to launch wsadmin to verify there are no issues of connectivity such as firewalls.
- verify that you are using the right port number to connect to the WebSphere Application Server process:
- If you are not specifying a port number (using the -port option) when you start wsadmin, wsadmin uses the default port specified in install_dir/properties/wsadmin.properties, property name=com.ibm.ws.scripting.port (default value =8879).
The port that wsadmin should send on depends on the server process wsadmin is trying to connect to.
For a single-server installation, wsadmin attempts to connect to the appserver process by default. To verify the port number:
- Look in the file install_dir/config/cells/node/nodes/node/serverindex.html for a tag containing the property serverType="APPLICATION_SERVER".
- Look for an entry within that tag with the property endPointName="SOAP_CONNECTOR_ADDRESS".
- Look for a port property within that tag. This is the port wsadmin should send on.
In a Network Deployment installation, wsadmin launched from the bin directory on the Network Deployment installation attempts to send requests to the deployment manager by default. To verify the port number:
- Get the hostname of the node on which the Deployment Manager is installed.
- Using that hostname, look in install_dir/config/cells/nodeNetwork/nodes/node Manager/serverindex.html for a tag containing the property serverType="DEPLOYMENT_MANAGER".
- Within that tag, look for an entry with a property endPointName="SOAP_CONNECTOR_ADDRESS".
- Within that tag, look for a "port" property. This is the port wsadmin should send on.
"com.ibm.bsf.BSFException: error while eval'ing Jacl expression: no such method command name in class com.ibm.ws.scripting.AdminConfigClient" returned from wsadmin command.
This error is usually caused by a misspelled command name. Use the $AdminConfig help command to get information about what commands are available. Note that command names are case-sensitive.
WASX7022E returned from running "wsadmin -c ..." command, indicating invalid command
If the command following -c appears to be valid, the problem may be caused by the fact that on Unix, using wsadmin -c to invoke a command that includes dollar signs results in the shell attempting to do variable substitution. To confirm that this is the problem, check the command to see if it contains an unescaped dollar sign, for example: wsadmin -c "$AdminApp install ....".
To correct this problem, escape the dollar sign with a backslash. For example: wsadmin -c "\$AdminApp install ...".
com.ibm.ws.scripting.ScriptingException: WASX7025E: String "" is malformed; cannot create ObjectName
One possible cause of this error is that an empty string was specified for an object name. This can happen if you use one scripting statement to create an object name and the next statement to use that name, perhaps in an "invoke" or "getAttribute" command, but you don't check to see if the first statement really returned an object name. For example (the following samples use basic Jacl commands in addition to the wsadmin Jacl extensions to make a sample script):
#let's misspell "Server" set serverName [$AdminControl queryNames type=Server,*] $AdminControl getAttributes $serverName
To correct this error, make sure that object name strings have values before using them. For example:
set serverName[$AdminControl queryNames type=Server,*] if {$serverName == ""} {puts "queryNames returned empty - check query argument"} else {$AdminControl getAttributes $serverName}
For details on Jacl syntax beyond wsadmin commands, refer to the Tcl developers' site, http://www.tcl.tk .
"The input line is too long" error returned from the wsadmin command on a Windows platform
This error indicates that the Windows command line limit of 1024 characters has been exceeded, probably due to a long path name used within the wsadmin.bat command. The problem can be avoided by using the Windows subst command, which allows you to map an entire path to a virtual drive. To see the syntax of the subst command, enter help subst from a Windows command prompt.
For example if the product resides in c:\TestEnvironment\Beta\WebSphere\AppServer, edit the file c:\TestEnvironment\Beta\WebSphere\AppServer\bin\setupCmdLine.bat as follows:
subst w: c:\TestEnvironment\Beta\WebSphere\AppServer REM comment out the old line REM SET WAS_HOME=C:\TestEnvironment\Beta\WebSphere\AppServer SET WAS_HOME=w: REM comment out the old line REM SET JAVA_HOME=C:\TestEnvironment\Beta\WebSphere\AppServer\java SET JAVA_HOME=w:\java
IBM Support has documents that can save you time gathering information needed to resolve this problem. Before opening a PMR, see the IBM Support page.
Troubleshooting by task: What are you trying to do?
Troubleshooting by component: What is not working?