Sun Java Solaris Communities My SDN Account
 
Documentation

J2EE[tm] v1.4 Application Server Troubleshooting Guide

 

This Troubleshooting Guide addresses common difficulties you may encounter when installing and using the J2EE 1.4 Application Server.

This document contains solutions for the following problems:


asadmin start-domain command fails

When issued with no arguments, the command asadmin start-domain fails with the error,

CLI143 There is more than one domain in C:\Sun\AppServer\domains. 
Please use operand to specify the domain.
CLI156 Could not start the domain null.

This error occurs when the domains directory contains more than one domain, and no domain is specified as part of the start-domain command.

In the J2EE 1.4 Application Server, Developer Release, this problem occurs after including the samples domain in the installation, because neither domain is considered the "default" domain.

In the FCS release, this error is expected to occur only when there is more than one domain in the domains directory, and none of them is named domain1.

Solution

Specify the domain when issuing the start-domain command, like this:

asadmin start-domain domain1


Can't find log files

The following J2EE 1.4 Application Server logs can be useful for troubleshooting problems you may have with installation:

  • Server log file—You will find the content of this file useful for troubleshooting server configuration and deployment problems.

  • HTTP server access logs—You will find the content of this file useful for troubleshooting HTTP server problems and for tracing the activity of HTTP requests entering the application server instances.

Both the installation and uninstallation programs create log files and log all installation and uninstallation events to these files. The primary purpose of these log files is to provide troubleshooting information.

In addition to installation program messages and log files, operating system utilities such as pkginfo and showrev on Solaris and rpm on Linux can be used to gather system information.

Log file entries include information about the attempted action, the outcome of the action, and, if applicable, the cause of failure. The log files contain the following types of message entries:

  • INFO—These messages mark normal completion of a particular installation tasks.

  • WARNING—These messages mark non-critical failures. Warning messages generally contain information about the cause and the nature of the failure, and also provide possible remedies.

  • ERROR—These messages mark critical failures that cause installation or uninstallation status to be reported as Failed. Error messages generally provide detailed information about the nature and the cause of the problem that occurred.

The J2EE 1.4 Application Server logs are located in the following directory:

<install_dir>/domains/domain1/server/logs/

In addition to these log files, the SetupSDK framework creates default low-level installation and uninstallation log files at the following locations:

/var/sadm/install/logs/Sun_ONE_Application_Server_install.<timestamp>
/var/sadm/inThe location and content of these files is defined externally within the SetupSDK framework.


Server does not appear to be running.

When you visit the start page of the J2EE 1.4 Application Server, the initial screen does not appear.

During installation, did the initial server startup run successfully?

If the console window is still open, it should display a message like this:

Domain domain1 Started

where domain1 is the name of the default domain. This indicates that the default domain was started successfully.

If you have already closed the console window, you can check for messages in the log file here:

<J2EE_HOME>/domains/domain1/server/logs/server.log

If startup was successful, you should see a message similar to this at the end of the log file:

[INFO][...][..][date&time][Application server startup complete .]

Is the server available locally?

If the server cannot be accessed from the web, but it is running locally, then the server is actually running.

To verify that the server is running locally:

  1. Log on to the machine where the server is running.

  2. Visit the local web page. For example

    http://localhost:8080/ (the default port)

If the start page does not appear, there is a problem with the web connection.

Was the server started at the expected port?

The server could be running at a different port number than the one you expect, either because it was intentionally installed there, or because another server was already running on the default port when the server was installed.

To determine which port number the server is actually using:

  1. Examine the server's configuration file here:
  2.  

    <J2EE_HOME>/domains/domain1/server/config/domain.xml

  3. Find the http-listener element.

  4. Inspect the value of the port attribute.

Be sure to enter the correct port number when invoking the server.

Explanation of how the expected port number can change—The server's default port number is 8080, however, you can specify a different port number during installation. In addition, if the specified port number is already taken by another application when you start the server, the port number rolls forward to the next available number. For example, if a server was already running on the 8080 default port, the J2EE 1.4 Application Server would be running on port number 8081. If two servers were running, the port number would be 8082, and so on.

Is your proxy setting causing a problem?

You should be able to access the server directly from your local system (localhost) as follows (for the default port 8080):

http://localhost:8080/

In the beta release of the J2EE 1.4 Application Server, you may not be able to access your local system if your browser connects to the web through a proxy. (A proxy is a program that looks like a direct web connection, but which is actually a separate program that makes that connection for you.) To solve this problem, do one of the following:

  • Direct your browser to bypass the proxy server when accessing your local system. Check your browser's help system for information on how to do this.

  • Use the fully-qualified host name or IP address of your system. For example:
  •  

    http://myhost.mydomain.com:8080/

    To find your hostname and domain:

    • On Microsoft Windows—On the desktop, right click on My Computer and select properties. A System Properties dialog is displayed. Click Network Identification to see the computer name.

    • On Solaris—Type hostname at the command prompt.


Can't access the Admin Server.

The Admin Server provides the administration facilities for the J2EE 1.4 Application Server (one Admin Server per domain). If you cannot access the Admin Server, consider the solutions in this section.

Is the J2EE 1.4 Application Server running?

The server must be running before the Admin Server can be accessed. Review the information in "Server does not appear to be running." to determine if the server is running.

Is the Admin Server running at the expected port?

The default port number for the Admin Server is 4848. However, the server could be running at a different port number than the one you expect, either because it was intentionally installed there, or because another server was already running on the installation port when the server was started.

Refer to "Was the server started at the expected port?" for guidelines on checking the port your Admin Server is actually running on.

Be sure to enter the correct port number when invoking the Admin Server.


Can't access a server application.

If you are unable to access a particular application, consider the solutions in this section.

Is the J2EE 1.4 Application Server running?

Review the information in "Server does not appear to be running." to determine if the server is running. The server must be running before the an application can be accessed.

Was application deployment successful?

An application must be successfully deployed before it can be accessed.

Check the server's log file here:

<J2EE_HOME>/domains/domain1/server/server.log


User name or password has been forgotten.

If you have forgotten the administrator password, you will need to create a new user name-password pair. This involves removing the user name and password, creating new ones, and restarting the server.

To remove the user name and password completely (resetting the user name and password to nothing):

  1. Access the following:
  2.  

    install_dir/lib/install/applications/adminapp/adminapp_war/WEB-INF

  3. Comment out the entire <security-constraint> element in the web.xml file. (Don't delete).

This removes any security on command-line operations.


Note

The commands will still expect a value for --username or -u and --password or -w. But these can be any dummy values, since the server side does not impose any security.


  1. Start the server. At this point, the server does not have any command-line security.

  2. Run the following command:
  3.  

    create-file-user --user <dummy> --password <dummy> --userpassword new_secret --groups asadmin new_user_id

    This creates a new entry here:

    install_dir/domains/domain1/server/config/keyfile.

  4. Uncomment the <security-constraint> element in web.xml file.

  5. Add the following (using dummy as the user name-password because the new password is not effective yet):
  6. asadmin reconfig --user <dummy> --password <dummy> server

    This is required for the reconfiguration to synchronize the backup and actual configuration files.

  7. Restart the server for the new user name-password to take effect.
  8. When the server is started, any remote command-line operations will need new_user_id and new_secret as user name and password.


Server won't start on Windows (port conflict).

If you get a message similar to the following when you try to start the J2EE 1.4 Application Server on Microsoft Windows, a server port conflict has occurred:

Address already in use

This happens because another application is running on the J2EE 1.4 Application Server port (default 8080), or because a previously-running J2EE 1.4 Application Server did not shut down cleanly.

Is another application running on the server's port?

If another application is using the server's port, stop the other application, then restart the J2EE 1.4 Application Server.

Explanation of why the next available port is not used—Generally the installer chooses the next available port if the default port is in use, but this only works if the application using the default port is running at the time the J2EE 1.4 Application Server is installed.

Has an ungraceful shutdown occurred on a previously-running server?

Use the asadmin stop-domain command to stop the server, or explicitly kill the Java process, then restart the J2EE 1.4 Application Server.

Oracle is reviewing the Sun product roadmap and will provide guidance to customers in accordance with Oracle's standard product communication policies. Any resulting features and timing of release of such features as determined by Oracle's review of roadmaps, are at the sole discretion of Oracle. All product roadmap information, whether communicated by Sun Microsystems or by Oracle, does not represent a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. It is intended for information purposes only, and may not be incorporated into any contract.