Pages

Tuesday, January 24, 2012

GlassFish Port Permission error

Symptoms

When trying to create a domain, permission warning may appear as follows:

/opt/glassfish3/glassfish/bin/asadmin --user admin --passwordfile /opt/glassfish3/passwordfile create-domain --adminport 4848 --instanceport 8000 myDom1

You do not have permission to use port 4848 for myDom1. Try a different port number or login to a more privileged account.CLI130 Could not create domain, myDom1Command create-domain failed.

Similarly, when starting a domain, the following may be encountered:

There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.Command start-domain failed.


Possible solutions

  • Ensure port is not in use, check "netstat -an | grep 4848" 
  • "ps -ef|grep java" to check if another GF instance is running. Shut it down first.
  • Identify 'hostname' 
  • Verify that /etc/sysconfig/network has the correct hostname
  • Ensure 'hostname' is in /etc/hosts and assigned to the correct IP address, where the server will listen

1 comment: