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:
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?
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.