4

I get an error using glassfish like this : java.net.BindException: Address already in use: bind, but i think i have changed the port of the server like this:

enter image description here

And i think i have changed the port to be 9999. But nothing is effected. This is all port was used on my computer.

how to fix it?, i see the server port using 8080. I think it makes the port depedency with port url. is it true and how to fix it? enter image description here

2
  • Try running netstat -ant which shows listening connections too. Commented Apr 14, 2016 at 3:01
  • @user2598037 i have tried using your command but i think there is no port using the same port with my glassfish server Commented Apr 14, 2016 at 3:05

3 Answers 3

5

As the error message clearly says: The port is in use.

The netstat output shows there is a connection to BNI-PC:4848. This is the port the Glassfish Admin Frontend should run on, this means there is already an instance of Glassfish running on your computer.

Also, if something is running on port 8080, Glassfish won't start with the default settings.

Changing the debug port doesn't help you, this has nothing to do with the other two ports.

You should close Eclipse and then kill all remaining Java processes via the task manager to solve the problem.

If you really want to change the ports, make sure that Glassfish is not running, open domain.xml inside ../glassfish4/glassfish/domains/domain1/config/ and search for 8080 to change the main http port and search for 4848 to change the Glassfish Admin UI port.

Hint: You can use netstat -a -b (required admin rights) to see which process is using the ports.

Sign up to request clarification or add additional context in comments.

Comments

1

Open domain.xml inside ../glassfish4/glassfish/domains/domain1/config/ and search for 8080 and change it to something else for the main http port.

Comments

0

My solution is as follows: open the task manager, find the java.exe process, close it, or restart the computer.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.