How to resolve this Error (GWT)

爱⌒轻易说出口 提交于 2019-12-22 07:07:18

问题


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 SelectChannelConnector@127.0.0.1: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


回答1:


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.




回答2:


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,




回答3:


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.




回答4:


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




回答5:


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




回答6:


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.




回答7:


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



来源:https://stackoverflow.com/questions/12742680/how-to-resolve-this-error-gwt

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!