glassfish error - process already using port 4848
I am trying to set glassfish up to create some java servlets.
I can navigate to the correct folder and if i enter asadmin everything is fine.
When i enter start-domain i get this error:
asadmin> start-domain
There is a process already using the admin port 4848 -- it probably is another instance of a GlassFish server.
Command start-domain failed.
How do i find out if there is another process running on port 4848 and how do i fix this problem if there is.
Thanks
Re: glassfish error - process already using port 4848
On both linux and Windows you should be able to use netstat to find which ports are in use. I'd suggest shutting down the identified application and trying again. If you don't know how to use netstat, just shutdown all applications and try to start the server.
Re: glassfish error - process already using port 4848
I play around with a few netstat commands. Apparently this should show processes using a particular port
netstat -an | grep ':4048'
I tried this and it returned nothing. I am using a mac by the way, if that helps describing further steps easier.
Re: glassfish error - process already using port 4848
Quote:
Originally Posted by
wdh
There is a process already using the admin port 4848
Quote:
Originally Posted by
wdh
I play around with a few netstat commands. Apparently this should show processes using a particular port
netstat -an | grep ':4048'
I tried this and it returned nothing. I am using a mac by the way, if that helps describing further steps easier.
4048 is off by about 800. Try 4848
Re: glassfish error - process already using port 4848
Sorry that was a typo. It still returns nothing.
Re: glassfish error - process already using port 4848
Try doing so with root permissions (type sudo prior to the netstat command, and enter password when prompted). If that doesn't work my only recommendation would be to restart the computer and trying again.
Re: glassfish error - process already using port 4848
unfortunately that returns nothing as well. I have read it could return this error if the hostname does not resolve to an IP . . . .
Not sure how to check this though.
Re: glassfish error - process already using port 4848
Did not have mac access earlier - I just tried netstat and it seems it operates differently than linux (which separates the port from IP via a semicolon) - try doing so without the semicolon
If it returns nothing than I can only suggest to dig deep into the documentation of Glassfish or scour the internet for others who have had a similar problem.
Re: glassfish error - process already using port 4848
That also returns blank, so does typing sudo before it. I have done a lot of searching for that error message, i have tried changing the port number to something other than 4848.
The other problem could be the host name is not resolving to an IP. Im not sure how i could check this and what to change. I have already looked inside etc/hosts