1

当我运行 californium(examples) 的 HelloWorldServer.java 时,出现此错误。我该如何解决?我在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)
4

2 回答 2

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) 
于 2016-07-03T16:15:02.710 回答
0

您可能有该示例的先前启动版本仍在运行,因此它已经在使用 UDP 端口 5683。尝试使用 Console 视图或从 Debug 透视图中的 Debug 视图终止它。

于 2016-03-18T06:44:35.737 回答