http //localhost/8080 : Cannot Access Local Server (http://localhost:8080)
When this error occurs, check the following:
- Did the Server Start?
- Was the Server Started at the Expected Port?
- Is a Personal Firewall Enabled?
Did the Server Start?
Description
If the console window is still open, the expected message indicates that the default domain was started successfully.
If the console window is already closed, check for messages in the log file:
as-install/domains/domain1/logs/server.log
If startup was successful, the expected message is similar to that on the console, and appears at the end of the log file.
For more information about starting a domain, seeย Starting and Stopping a Domain inย Oracle GlassFish Server 3.1 Administration Guide. To easily determine if a domain is running, use theย asadmin list-domainsย command.
Was the Server Started at the Expected Port?
Description
The server might be running at a different port number than expected, 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 Using
- Examine the server’s configuration file:
as-install/domains/domain1/config/domain.xml
- Find theย network-listenerย element.
- Inspect the value of theย portย attribute.Be sure to enter the correct port number when invoking the server.
Note –ย The server’s default port number isย 8080, however, there are a number of ways in which the expected value can change:
- A different port number was specified during installation.
- A previous installation exists.
Is a Personal Firewall Enabled?
Issues might result when personal firewalls are enabled. Disable your personal firewall and see if the server access problem still exists.
To Start a Domain
When you start a domain or server, the domain administration server (DAS) is started. After startup, the DAS runs constantly, listening for and accepting requests.
If the domain directory is not specified, the domain in the defaultย as-install/domainsย directory is started. If there are two or more domains, theย domain_nameย operand must be specified. Each domain must be started separately.
Note –ย For Microsoft Windows, you can use an alternate method to start a domain. From the Windows Start menu, select the command for your distribution of GlassFish Server:
- If you are using the Full Platform, select Programs -> Oracle GlassFish Server -> Start Admin Server.
- If you are using the Web Profile, select Programs -> Oracle GlassFish Server Web Profile -> Start Admin Server.
This subcommand is supported in local mode only.
- Start a domain by using theย start-domain(1)ย subcommand.
Example 3-6 Starting a Domain
This example startsย domain2ย in the default domain directory.
asadmin> start-domain domain2
If there is only one domain, you can omit the domain name. If you do not include the password, you might be prompted to supply it.
Name of the domain started: [domain1] and its location: [C:\prelude\v3_prelude_release\distributions\web\target\glassfish domains\domain1]. Admin port for the domain: [4848].
See Also
You can also view the full syntax and options of the subcommand by typingย asadmin help start-domainย at the command line.
To Stop a Domain
Stopping a domain or server shuts down its domain administration server (DAS). When stopping a domain, the DAS stops accepting new connections and then waits for all outstanding connections to complete. This shutdown process takes a few seconds. While the domain is stopped, the Administration Console and most of theย asadminย subcommands cannot be used. This subcommand is particularly useful in stopping a runaway server. For more controlled situations, you can use theย restart-domain(1) subcommand.
Note – For Microsoft Windows, you can use an alternate method to stop a domain. From the Start menu, select the command for your distribution of GlassFish Server:
- If you are using the Full Platform, select Programs -> Oracle GlassFish Server -> Stop Admin Server.
- If you are using the Web Profile, select Programs -> Oracle GlassFish Server Web Profile -> Stop Admin Server.
Note –ย If you stop a suspended domain, it will not be in the suspended state when you start it again; it will be running.
- If necessary, notify users that you are going to stop the domain.
- Stop the domain by using theย stop-domain(1)ย subcommand.
Example 3-7 Stopping a Domain (or Server)
This example stopsย domain1ย in the default directory, whereย domain1ย is the only domain present in the directory.
asadmin> stop-domain Waiting for the domain to stop ........... Command stop-domain executed successfully.
See Also
You can also view the full syntax and options of the subcommand by typingย asadmin help stop-domainย at the command line.
To Restart a Domain
Use theย restart-domainย subcommand in remote mode to restart the Domain Administration Server (DAS) of the specified host. When restarting a domain, the DAS stops accepting new connections and then waits for all outstanding connections to complete. This shutdown process takes a few seconds. Until the domain has restarted, the Administration Console and most of theย asadmin subcommands cannot be used.
This subcommand is particularly useful for environments where the server machine is secured and difficult to get to. With the right credentials, you can restart the server from a remote location as well as from the same machine.
If the server will not restart, use theย stop-domain(1)ย subcommand followed by theย start-domain(1)ย subcommand.
Note –ย If you restart a suspended domain, it will not be in the suspended state when it starts; it will be running.
- Ensure that the server is running.Remote subcommands require a running server.
- Restart the domain by using theย restart-domain(1)ย subcommand.
Example 3-8 Restarting a Domain (or Server)
This example restartsย mydoimain4ย in the default directory.
asadmin> restart-domain mydomain4 Waiting for the domain to restart ........... Command restart-domain executed successfully.
Example 3-9 Restarting a Domain in a Browser
This example invokes theย restart-domainย subcommand in a browser.
http://yourhost:4848/__asadmin/restart-domain

Comments are closed