当我运行californium的HelloWorldServer.java(例子)时,我收到了这个错误。 我该如何解决? 我在日食中运行它。
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.config.NetworkConfig createStandardWithFile
INFO: Loading standard properties from file Californium.properties
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.CoapServer start
INFO: Starting server
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at /127.0.0.1:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.CoapEndpoint stop
INFO: Stopping endpoint at address /127.0.0.1:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.CoapServer start
SEVERE: Address already in use: Cannot bind at /127.0.0.1:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at /0:0:0:0:0:0:0:1:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.CoapEndpoint stop
INFO: Stopping endpoint at address /0:0:0:0:0:0:0:1:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.CoapServer start
SEVERE: Address already in use: Cannot bind at /0:0:0:0:0:0:0:1:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at /192.168.1.102:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.network.CoapEndpoint stop
INFO: Stopping endpoint at address /192.168.1.102:5683
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.CoapServer start
SEVERE: Address already in use: Cannot bind at /192.168.1.102:5683
Exception in thread "main" java.lang.IllegalStateException: None of the server endpoints could be started
at org.eclipse.californium.core.CoapServer.start(CoapServer.java:202)
at org.eclipse.californium.examples.HelloWorldServer.main(HelloWorldServer.java:46)
答案 0 :(得分:1)
日志本身说明发生了什么错误
Mar 08, 2016 8:30:01 PM org.eclipse.californium.core.CoapServer start
SEVERE: Address already in use: Cannot bind at /127.0.0.1:5683
为了杀死绑定到5683的过程
sudo kill -9 $(lsof -t -i:5683)
答案 1 :(得分:0)
您可能以前仍在运行该示例的启动版本,因此它已经使用UDP端口5683.尝试使用Console视图或Debug视图中的Debug视图将其终止。