简体   繁体   English

Java Lwm2m 引导服务器

[英]Java Lwm2m Bootstrap Server

I would like to connect one LwM2M client to multiple servers LwM2M by bootstrap server.我想通过引导服务器将一个 LwM2M 客户端连接到多个服务器 LwM2M。 I'm using Leshan (LwM2M implementation in Java).我正在使用乐山(Java 中的 LwM2M 实现)。

So I'm using Lwm2m demo from github.com/Eclipse/Leshan.所以我使用来自 github.com/Eclipse/Leshan 的 Lwm2m 演示。 I run the server demo, the bootstrap server demo, and the client demo.我运行服务器演示、引导服务器演示和客户端演示。 I want to register the client in the server User Interface by using bootstrap server (I entered the client endpoint, the server URI, no security mode).我想使用引导服务器在服务器用户界面中注册客户端(我输入了客户端端点、服务器 URI、无安全模式)。

When I run them both, the client is not registered and I have this message in the terminal matching the client :当我同时运行它们时,客户端未注册,我在与客户端匹配的终端中有此消息:

[bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683],
deviceMangements={123=DM Server
[uri=coap://192.168.1.85:8081,lifetime=20, binding=U]}].  
[2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register to
coap://192.168.1.85:8081 ...  
[2016-07-05 12:49:39,113 ERROR RegistrationEngine] Registration failed: Timeout.  
[2016-07-05 12:49:39,116 INFO RegistrationEngine] Unable to connect to any server,
next retry in 600s ...

How can I fix this?我该如何解决这个问题?

coap://192.168.1.85:8081 听起来不像标准的 CoAP 端口,它更像是 5683(或 5684 用于 DTLS)

First you better check your configuration such as IP Address and Port.首先,您最好检查一下您的配置,例如 IP 地址和端口。 Client should point to bootstrap server IP and port.客户端应指向引导服务器 IP 和端口。 Bootstrap server configure client to correct server.引导服务器配置客户端以纠正服务器。 According to your terminal message, lifetime is only 20s.根据你的终端信息,lifetime只有20s。 You can try to extend the life time to 180s (3mins) in Bootstrap.您可以尝试在 Bootstrap 中将寿命延长至 180 秒(3 分钟)。

[bootstrap=Bootstrap Server [uri=coap://192.168.1.100:5683], deviceMangements={123=DM Server [uri=coap://192.168.1.85:8081, lifetime=20, binding=U]}]. [bootstrap=Bootstrap 服务器 [uri=coap://192.168.1.100:5683],deviceMangements={123=DM 服务器 [uri=coap://192.168.1.85:8081, lifetime=20, binding=U]}]。 [2016-07-05 12:48:17,684 INFO RegistrationEngine] Trying to register to coap://192.168.1.85:8081 ... [2016-07-05 12:49:39,113 ERROR RegistrationEngine] Registration failed: Timeout. [2016-07-05 12:48:17,684 INFO RegistrationEngine] 尝试注册到 coap://192.168.1.85:8081 ... [2016-07-05 12:49:39,113 ERROR RegistrationEngine] 注册失败:超时。 [2016-07-05 12:49:39,116 INFO RegistrationEngine] Unable to connect to any server, next retry in 600s ... [2016-07-05 12:49:39,116 INFO RegistrationEngine] 无法连接到任何服务器,下次重试 600 秒...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 乐山LWM2M服务器 - Leshan LWM2M SERVER Eclipse乐山LwM2M构建失败 - Eclipse Leshan LwM2M Build Failure [Californium / CoAP / LWM2M]:无法为服务器重用消息发送端点? - [Californium/CoAP/LWM2M]: Reusing message send endpoint for server not possible? 我正在尝试制作 Java 文件服务器 - I'm trying to make a Java File Server 虽然我在服务器中启用了 Java,但我面临 java 路径问题 - Though I have Java enabled in the server, I'm facing java path issue 拾取 _JAVA_OPTIONS: _Xmx2048M 无法识别的选项:_Xmx2048M Minecraft 服务器 - Picked up _JAVA_OPTIONS: _Xmx2048M Unrecognized option: _Xmx2048M Minecraft server 当必须接受许多连接时,客户端/服务器类型应用程序中的Java套接字出现问题 - I'm having troubles with Java sockets in a client/server type application when having to accept many connections 无法将应用程序从Tomcat部署到Sun Java Web Server 7……我是一个.NET专家:( - Trouble Deploying App From Tomcat to Sun Java Web Server 7…and I'm a .NET guy :( JAVA:我无法将响应(json)从服务器发送回客户端 - JAVA :I'm not able to send response(json) back to the client from server 无法使我的Http Server多线程? 我正在使用Java HttpServer API - Unable to make my Http Server multithreaded? I'm using Java HttpServer API
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM