[英]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.