Reputation: 1220
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.
Upvotes: 6
Views: 19604
Reputation: 321
I just hit this issue today. Be sure to delete the $PATH/TO/domain1/config/pid and $PATH/TO/domain1/config/pid.prev files as well, if the process isn't running but is being reported as still running.
Upvotes: 1
Reputation: 1259
I hit the same error.
This was useful - i.e. check you can ping $(hostname)
. Looks like glassfish checks hostname against IP, possibly during bind process.
My issue was my hostname/ip address in /etc/hosts
was not aligned correctly, meaning I could not ping $(hostname)
. Once aligned and pinged, glassfish started ok.
Upvotes: 7
Reputation: 3266
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
Upvotes: 6