Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I clear an address for Glassfish 4.0 with default settings?

I get the following error when I'm trying to start my glassfish server with default settings from netbeans IDE 7.3.1:

java.net.BindException: Address already in use: bind

Details at: http://ideone.com/wKbat3

What can I do? How do I clear the address for glassfish? How do I set glassfish to use another address? What does "address" means in this context?

like image 721
MciprianM Avatar asked Jun 26 '13 10:06

MciprianM


1 Answers

The main reason is that another server is using the port 8080, that is the one per default (to check in windows if those ports are being used in the commands line: netstat -a -o)

You would need to change it in:

/glassfish/domains/domain1/config/domain.xml

Change: name="http-listener-1" **port="8080"** name="http-listener-2" **port="8181"**

To: name="http-listener-1" **port="9090"** name="http-listener-2" **port="9191"**

Then, remove the server from your framework (Eclipse for example), close it, start it and add the Glashfish again.

Before starting your framework make sure there is no file such: /glassfish/domains/domain1/osgi-cache/felix/*.lock

In case it exists, remove it, you may stop any Java process for removing it.

These steps worked for me.

like image 168
Weslor Avatar answered Sep 17 '22 13:09

Weslor