user1711524
user1711524

Reputation:

How to resolve this Error (GWT)

I'm getting this error after running my application. There were no errors during compilation. Also, thr's no other application running.

Starting Jetty on port 8888 [WARN] failed [email protected]:8888 java.net.BindException: Address already in use: bind at sun.nio.ch.Net.bind(Native Method) at sun.nio.ch.ServerSocketChannelImpl.bind(Unknown Source) at sun.nio.ch.ServerSocketAdaptor.bind(Unknown Source) at org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:205) and many more...........

Port 127.0.0.1:8888 is already is use; you probably still have another session active

Upvotes: 5

Views: 11490

Answers (7)

Nya
Nya

Reputation: 310

Easy. Open your Run Configuration, select Server, and then choose automatically select an unused port. Apply, OK

Upvotes: 0

Hethcox
Hethcox

Reputation: 108

As an addendum, I was having this problem when I knew there was not another process running. I was also using -bindAddress to expose my app to other hosts. When my DHCP lease expired, my machine got a different IP. GWT reported the failure to bind to the old address as "Address already in use".

Clearly I was tempting fate, but still I wanted to post this in-case it trips someone else up.

Upvotes: 0

Sundar G
Sundar G

Reputation: 1069

The exception is thrown because you are trying to bind to a port that is already in use by another process.

Using netstat -a from the command line will show you a list of open ports and the process that's using them. Than you can kill it.

Upvotes: 2

nano_nano
nano_nano

Reputation: 12524

The problem is that there is already a server running at that port address. If you start your gwt application from eclipse keep sure that you kill the open processes. For that change to DEBUG mode, select the top of the process stack and stop/kill the application processes.

Upvotes: 8

jchips12
jchips12

Reputation: 1227

In the development mode window, make sure to stop and close all launches If you cant find Development Mode try Window> Show View> Other. Search for Development Mode

Upvotes: 0

thar45
thar45

Reputation: 3560

It means specified port number is already in used by other application. Try to change your port number for the end point publisher.

For example use like this

 127.0.0.0:8889 

We can use similar ports to avoid the binding exception

Upvotes: 0

Anders R. Bystrup
Anders R. Bystrup

Reputation: 16070

Some other process is using port 8888 then. Use the GWT DevMode parameter -port 8889 (or any other port that fits you) and you should be fine.

You might use netstat -p (or your OS variant that shows process names) to figure out what's on port 8888.

Cheers,

Upvotes: 3

Related Questions