CoAP 服务器无法启动

CoAP server could not be started

当我 运行 HelloWorldServer.java of californium(examples) 时,我得到了这个错误。 我该如何解决? 我 运行 这个在 eclipse 中..

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)

您可能仍然有该示例的先前启动版本 运行,因此它已经在使用 UDP 端口 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

为了杀死绑定到 5683 的进程

sudo kill -9 $(lsof -t -i:5683)