Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 9 of 9

Thread: glassfish error - process already using port 4848

  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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


  2. #2
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default 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.

  3. #3
    Member
    Join Date
    Aug 2011
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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.

  4. #4
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default Re: glassfish error - process already using port 4848

    Quote Originally Posted by wdh View Post
    There is a process already using the admin port 4848
    Quote Originally Posted by wdh View Post
    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

  5. #5
    Member
    Join Date
    Aug 2011
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: glassfish error - process already using port 4848

    Sorry that was a typo. It still returns nothing.

  6. #6
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default 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.

  7. #7
    Member
    Join Date
    Aug 2011
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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.

  8. #8
    Administrator copeg's Avatar
    Join Date
    Oct 2009
    Location
    US
    Posts
    5,320
    Thanks
    181
    Thanked 833 Times in 772 Posts
    Blog Entries
    5

    Default 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

    netstat -an | grep 4848

    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.

  9. #9
    Member
    Join Date
    Aug 2011
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default 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

Similar Threads

  1. glassfish ClassNotFoundException java.lang.ClassNotFoundException: ...
    By enginco in forum JavaServer Pages: JSP & JSTL
    Replies: 2
    Last Post: June 18th, 2012, 12:18 PM
  2. Database Connect Error on Eclipse ( JAVAEE/Glassfish)
    By thisbeme in forum JDBC & Databases
    Replies: 0
    Last Post: March 6th, 2012, 07:27 AM
  3. Port Scanning ERROR
    By dbz_sid in forum Java Networking
    Replies: 4
    Last Post: September 27th, 2011, 03:40 AM
  4. Sometimes users see other's secure data over ssl on jsp struts and glassfish
    By amirali1982 in forum JavaServer Pages: JSP & JSTL
    Replies: 0
    Last Post: December 30th, 2010, 05:40 AM
  5. Relay data from remote port to local port
    By chegers in forum Java Networking
    Replies: 0
    Last Post: November 7th, 2010, 12:46 PM