Java – Glassfish Server start-domain domain1 won’t start

glassfishjava

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?

Best Answer

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