WAS v8.5 > Reference > Administrator best practicesCommand-line tool problems
This topic provides troubleshooting support for a variety of problems relating to using command-line tools.
What kind of problem are you having?
- b
- Just-in-time (JIT) compiler is disabled when we start application server with DEBUG enabled on a Red Hat Linux machine
- The startServer.sh or stopServer.sh commands fail to start or stop the server when the server definition is part of the configuration repository.
- With Windows service, there is no indication when a server is already started.
- The stopServer command fails to stop the server because the system cannot create a connector to an invalid hostname.
- Entering passwords on the command line
Just-in-time (JIT) compiler is disabled when we start the application server with DEBUG enabled on a Red Hat Linux machine
The just-in-time (JIT) compiler is disabled when we start the application server with Software Developer Kit (SDK) DEBUG enabled on a Red Hat Linux machine, even though JIT is set to enabled. To verify this setting, check the SystemOut.log or the startServer.log file.
Use the dmgr console to remove the following DEBUG options of the Java process definition. -Xdebug -Xnoagent
IBM recommends using the HPEL log and trace infrastructure. With HPEL, one views logs using the LogViewer command-line tool in PROFILE/bin.
The startServer.sh or stopServer.sh commands fail to start or stop the server when the server definition is part of the configuration repository
This problem occurs when the startServer.sh or stopServer.sh commands are trying to start or stop non Java process. To solve this problem, use the -nowait option to start or stop the server, for example:
startServer.sh webserver1 -nowait
stopServer.sh webserver1 -nowait
No indication that a server is already started on Windows
When attempting to start an already-started server from the command line, there is no indication the server is already started and running. When running startManager.bat on Windows the following output is displayed before the command returns:
ADMU7701I: Because dmgr is registered to run as a Windows Service, the request to start this server will be completed by starting the associated Windows Service.
When running startServer.bat, the following output is displayed before the command returns:
ADMU7701I: Because server1 is registered to run as a Windows Service, the request to start this server will be completed by starting the associated Windows Service.
When running WASService.exe, the following output is displayed before the command returns:
Starting Service: service name
To check if the server is started or if the service is running, use the serverStatus server_name command or the WASService -status service_name command.
stopServer command fails to stop the server because the system cannot create a connector to an invalid hostname
If the stopServer command fails to stop the server because the system cannot create a connector to an invalid hostname, we can stop the server using one of following methods:
- Stop the server process on the operating system (for example, on AIX, HP-UX, Linux, or Solaris computers, issue the kill command).
Or
- Open a wsadmin tool connection directly to the connector port of the server and call the stop method for the MBean of the server. This method is recommended because it allows ongoing work to shut down gracefully.
- Issue the following command to connect to the server:
wsadmin -host host_name -port connector_port -conntype [SOAP | RMI ] -user user_ID -password password- Invoke the stop method on the MBean of the server. For example, in Jython we can use:
serverMBean = AdminControl.completeObjectName("*,type=Server") AdminControl.invoke(serverMBean, "stop")
Entering passwords on the command line
There are operating system differences when specifying environment variables and for directory notation. When using the Windows command line, replace $variable with %variable% for environment variables and replace each forward slash (/) with a backslash (\) in directory paths. If we are using the bash shell on a Windows system, we can use the UNIX conventions.
On Unix type operating systems, it is usually better to always encapsulate string values associated with all tags in double quotes (""). You will also need to escape, using a '\' character, the following characters if they appear in the string values: '!', '\', '"', '`'. This will prevent some command line shells from interpreting specific characters within these values.
Some examples of usage follow:
gsk7capicmd -keydb -create -db "/tmp/key.kdb" -pw "j\!jj"
When prompted by gsk7capicmd for a value (for example a password) quoting the string and adding the escape characters should not be done because the shell is no longer influencing this input.
stopserver server1 -username fn_wasadmin -password $mypass35%% -trace
stopserver server1 -username fn_wasadmin -password '$mypass35%' -trace
In general, for ws_ant.sh scripts, use single quote for strings containing special characters:
- For a string containing a single quote or a double quote, use the other character to quote the string. For example, if we specify bin/ws_ant.sh -f ant.xml -Dsystem.property='"a quoted String"', the property is set to "a quoted string". Similarly, if we specify bin/ws_ant.sh -f ant.xml -Dsystem.peoperty="'a quoted string'", the property is set to 'a quoted string'.
We cannot include both single and double quotes in the same string.
- For a string containing a back quote, use a single quotes surrounding the string and escape the back quote with backslash. For example, if we specify bin/ws_ant.sh -f ant.xml -Dsystem.property='\`a quoted string\`', the property is set to `a quoted string`.
- For a string containing a backslash, surround the string with single quotes and escape it with a backslash. For example, if we specify bin/ws_ant.sh -f ant.xml -Dsystem.property='c:\\Program Files\\IBM'. the property is set to c:\Program Files\IBM.
- For a string containing a dollar sign, surround the string with single quotes and escape it with a backslash. For example, if we specify bin/ws_ant.sh -f ant.xml -Dsystem.property='\$3.99', the property is set to $3.99.
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 we don't find your problem listed there contact IBM support.
Related concepts:
Troubleshooting help from IBM
Related
Use command-line tools
Troubleshoot applications with HPEL
Reference:
Diagnose and fixing problems: Resources for learning