2016-03-08 38 views
1

當我運行californium的HelloWorldServer.java(例子),我得到了這個錯誤。 我該如何解決這個問題? 我在Eclipse中運行這個..CoAP服務器無法啓動

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

你可能有例子的以前版本的推出仍然在運行,所以它已經使用UDP端口5683.請嘗試使用控制檯視圖或調試視圖將其殺死Debug透視圖。

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) 
過程中的錯誤