Search code examples
linuxglassfish

Glassfish There is a process already using the admin port 4848


asadmin start-domain domain1

But it shows this error.

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

I have searched and found that it could be the hostname or that the port is used by an other application or server and actually it is used by TCP.

I have no problem with the hostname so I've tried this solution by changing port.

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

but it shows this error

remote failure: No configuration found for server.http-service.http-listener.http-listener-1
Command set failed.

I can't understand why.


Solution

  • Assuming you are running glassifhs under linux

    1 - Check if glassfish is already runnig.

    ps -ef |grep java
    

    kill any process java relative to glassfish

    2 - Check if the port 4848 is in use

    netstat -nao |grep 4848
    

    3 - Change the default port

    Edit the file {glassfish_home}/config/asadminenv.conf

    AS_ADMIN_PORT=4848