Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Glassfish Server start-domain domain1 won't start

Tags:

java

glassfish

I recently downloaded Glassfish 4.0 and I want to use it in NetBeans for making some Web Applications, but when I want to start the domain1 (asadmin> start-domain domain1) I keep getting this error:"There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server". Any clue what could be the problem?

like image 457
Srdan Ristic Avatar asked May 23 '14 11:05

Srdan Ristic


People also ask

How do I restart GlassFish service?

To Restart a DomainUse 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.

How do I run a GlassFish server from command prompt?

Procedure. Start the GlassFish Server asadmin shell program. Open the Windows command line and navigate to the < GlassFish >/bin directory, where < GlassFish > is the directory where GlassFish Server version 4 is installed. Enter the command asadmin in the command line.

What is domain in GlassFish server?

A domain contains a group of GlassFish Server instances that are administered together. Each domain has a domain administration server (DAS) that hosts administrative applications.


2 Answers

Glassfish could not resolve the host name. Diagnose the problem (on Linux) as follows:

  1. Open a Terminal.
  2. Type hostname.
  3. Type: ping $(hostname)

If the ping command fails (could not find the host), then add the host name to /etc/hosts. This can be accomplished as follows:

  1. Switch to root: sudo su -
  2. Type: echo "127.0.0.1 $(hostname)" >> /etc/hosts
  3. Kill GlassFish
  4. Restart GlassFish
like image 81
togomez Avatar answered Sep 23 '22 00:09

togomez


your system using port 4848 that is why. when glassfish starts its need three port numbers one for administrations, one for http applications other for https.

so in you system 4848 is already reserved by some program or server.

Or you can change default port number as per your need like below. type in command prompt.

To change the HTTP port to 10080:

  • asadmin set server.http-service.http-listener.http-listener-1.port=10080

To change the HTTPS port to 10443:

  • asadmin set server.http-service.http-listener.http-listener-2.port=10443

To change the administration server port to 14848:

  • asadmin set server.http-service.http-listener.admin-listener.port=14848
like image 43
Sanjay Rabari Avatar answered Sep 21 '22 00:09

Sanjay Rabari