Hono CLI 启动问题
我最近使用 Minikube 部署了 hono。我按照说明操作,对集群进行隧道传输,以便可以通过本地主机使用它。我还成功设置了一个租户,我想用 Mosquitto 测试 MQTT 适配器。
我尝试启动 CLI 来连接到 Northbound API,如教程中所示,但出现以下错误:
23:25:23.718 [vert.x-eventloop-thread-0] INFO o.e.h.client.impl.HonoConnectionImpl - max number of attempts [5] to re-connect to server [127.0.0.1:15672, role: unknown] have been made, giving up
23:25:23.746 [vert.x-eventloop-thread-0] ERROR org.eclipse.hono.cli.app.Receiver - Error occurred during initialization of receiver: failed to connect
我尝试使用的命令:
java -jar hono-cli-*-exec.jar --hono.client.host=127.0.0.1 --hono.client.port=15672 --hono.client.username=consumer@HONO --hono.client.password=verysecret --tenant.id=$TENANT
我尝试了 15672 和 15671 端口,但都不起作用。这是荣誉服务的日志:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
eclipse-hono-adapter-amqp-vertx LoadBalancer 10.99.195.237 127.0.0.1 5672:32672/TCP,5671:32671/TCP 36h
eclipse-hono-adapter-http-vertx LoadBalancer 10.97.63.200 127.0.0.1 8080:30080/TCP,8443:30443/TCP 36h
eclipse-hono-adapter-mqtt-vertx LoadBalancer 10.100.216.206 127.0.0.1 1883:31883/TCP,8883:30883/TCP 36h
eclipse-hono-artemis ClusterIP 10.104.81.61 <none> 5671/TCP 36h
eclipse-hono-dispatch-router ClusterIP 10.104.214.176 <none> 5673/TCP 36h
eclipse-hono-dispatch-router-ext LoadBalancer 10.100.97.6 127.0.0.1 15671:30671/TCP,15672:30672/TCP 36h
eclipse-hono-service-auth ClusterIP 10.99.59.114 <none> 5671/TCP 36h
eclipse-hono-service-command-router ClusterIP 10.104.190.85 <none> 5671/TCP 36h
eclipse-hono-service-device-registry ClusterIP 10.111.164.103 <none> 5671/TCP,8080/TCP,8443/TCP 36h
eclipse-hono-service-device-registry-ext LoadBalancer 10.109.24.98 127.0.0.1 28080:31080/TCP,28443:31443/TCP 36h
eclipse-hono-service-device-registry-headless ClusterIP None <none> <none> 36h
我感谢任何建议。 谢谢!
更新:
nano@dhcp-646 hono % java -jar hono-cli-*-exec.jar --hono.client.host=127.0.0.1 --spring.profiles.active=receiver,local --hono.client.port=15672 --hono.client.username=consumer@HONO --hono.client.password=verysecret --tenant.id=$TENANT
______ _ _ _ _
| ____| | (_) | | | |
| |__ ___| |_ _ __ ___ ___ | |__| | ___ _ __ ___
| __| / __| | | '_ \/ __|/ _ \ | __ |/ _ \| '_ \ / _ \
| |___| (__| | | |_) \__ \ __/ | | | | (_) | | | | (_) |
|______\___|_|_| .__/|___/\___| |_| |_|\___/|_| |_|\___/
| |
|_|
Eclipse Hono Example Client (v1.12.1)
using Spring Boot (v2.5.9)
Go to https://www.eclipse.org/hono for more information.
12:26:58.881 [main] INFO org.eclipse.hono.cli.Application - Starting Application v1.12.1 using Java 17.0.2 on dhcp-646.q.wlan.net.bme.hu with PID 22476 (/Users/nano/Documents/hono/hono-cli-1.12.1-exec.jar started by nano in /Users/nano/Documents/hono)
12:26:58.882 [main] INFO org.eclipse.hono.cli.Application - The following profiles are active: receiver,local
12:26:59.122 [main] INFO org.eclipse.hono.cli.Application - running command line client in role(s): receiver,local
12:26:59.273 [main] INFO o.e.h.a.c.a.ProtonBasedApplicationClient - connecting to Hono endpoint
12:26:59.320 [main] INFO org.eclipse.hono.cli.Application - Started Application in 0.744 seconds (JVM running for 1.079)
12:26:59.338 [vert.x-eventloop-thread-0] WARN i.n.r.d.DnsServerAddressStreamProviders - Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS.
12:27:10.457 [vert.x-eventloop-thread-0] INFO o.e.h.client.impl.HonoConnectionImpl - max number of attempts [5] to re-connect to server [127.0.0.1:15672, role: unknown] have been made, giving up
12:27:10.465 [vert.x-eventloop-thread-0] ERROR org.eclipse.hono.cli.app.Receiver - Error occurred during initialization of receiver: failed to connect
更新:Minikube 服务列表 -n hono
命名空间 | 名称 | 目标端口 | URL |
---|---|---|---|
hono | eclipse-hono-adapter-amqp-vertx | amqp/5672 | |
amqps/5671 | |||
hono | eclipse-hono-adapter-http-vertx | http/8080 | |
https/8443 | |||
hono | eclipse-荣誉适配器 mqtt-vertx | mqtt/1883 | |
secure-mqtt/8883 | |||
hono | eclipse-hono-artemis | 否 节点端口 | |
hono | eclipse-hono-dispatch-router | 否 节点端口 | |
hono | eclipse-hono-dispatch-router-ext | amqps/15671 | |
amqp/15672 | |||
hono | eclipse-hono-service-auth | 否节点端口 | |
hono | eclipse-hono-service-command-router | 没有节点端口 | |
hono | eclipse-hono-service-device-registry | 无节点端口 | |
hono | eclipse-hono-service-device-registry-ext | http/28080 | |
https/28443 | |||
hono | eclipse-hono-service-device-registry-headless | 无节点端口 | |
----------- | ------------------------------------------ - - | - - - | - - - - - - - - - - - |
更新: 库伯内特服务:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 8d
I recently deployed hono using Minikube. I followed the instructions, tunneled the cluster so it is available through localhost. I also successfully set up a tenant and I would like to test the MQTT Adapter with Mosquitto.
I tried to start the CLI to connect to the Northbound API as shown in the tutorial and I got the following error:
23:25:23.718 [vert.x-eventloop-thread-0] INFO o.e.h.client.impl.HonoConnectionImpl - max number of attempts [5] to re-connect to server [127.0.0.1:15672, role: unknown] have been made, giving up
23:25:23.746 [vert.x-eventloop-thread-0] ERROR org.eclipse.hono.cli.app.Receiver - Error occurred during initialization of receiver: failed to connect
The command I tried to use:
java -jar hono-cli-*-exec.jar --hono.client.host=127.0.0.1 --hono.client.port=15672 --hono.client.username=consumer@HONO --hono.client.password=verysecret --tenant.id=$TENANT
I tried both 15672 and 15671 ports but none of them worked. Here is a log of the hono service:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
eclipse-hono-adapter-amqp-vertx LoadBalancer 10.99.195.237 127.0.0.1 5672:32672/TCP,5671:32671/TCP 36h
eclipse-hono-adapter-http-vertx LoadBalancer 10.97.63.200 127.0.0.1 8080:30080/TCP,8443:30443/TCP 36h
eclipse-hono-adapter-mqtt-vertx LoadBalancer 10.100.216.206 127.0.0.1 1883:31883/TCP,8883:30883/TCP 36h
eclipse-hono-artemis ClusterIP 10.104.81.61 <none> 5671/TCP 36h
eclipse-hono-dispatch-router ClusterIP 10.104.214.176 <none> 5673/TCP 36h
eclipse-hono-dispatch-router-ext LoadBalancer 10.100.97.6 127.0.0.1 15671:30671/TCP,15672:30672/TCP 36h
eclipse-hono-service-auth ClusterIP 10.99.59.114 <none> 5671/TCP 36h
eclipse-hono-service-command-router ClusterIP 10.104.190.85 <none> 5671/TCP 36h
eclipse-hono-service-device-registry ClusterIP 10.111.164.103 <none> 5671/TCP,8080/TCP,8443/TCP 36h
eclipse-hono-service-device-registry-ext LoadBalancer 10.109.24.98 127.0.0.1 28080:31080/TCP,28443:31443/TCP 36h
eclipse-hono-service-device-registry-headless ClusterIP None <none> <none> 36h
I appreciate any advise.
Thanks!
Update:
nano@dhcp-646 hono % java -jar hono-cli-*-exec.jar --hono.client.host=127.0.0.1 --spring.profiles.active=receiver,local --hono.client.port=15672 --hono.client.username=consumer@HONO --hono.client.password=verysecret --tenant.id=$TENANT
______ _ _ _ _
| ____| | (_) | | | |
| |__ ___| |_ _ __ ___ ___ | |__| | ___ _ __ ___
| __| / __| | | '_ \/ __|/ _ \ | __ |/ _ \| '_ \ / _ \
| |___| (__| | | |_) \__ \ __/ | | | | (_) | | | | (_) |
|______\___|_|_| .__/|___/\___| |_| |_|\___/|_| |_|\___/
| |
|_|
Eclipse Hono Example Client (v1.12.1)
using Spring Boot (v2.5.9)
Go to https://www.eclipse.org/hono for more information.
12:26:58.881 [main] INFO org.eclipse.hono.cli.Application - Starting Application v1.12.1 using Java 17.0.2 on dhcp-646.q.wlan.net.bme.hu with PID 22476 (/Users/nano/Documents/hono/hono-cli-1.12.1-exec.jar started by nano in /Users/nano/Documents/hono)
12:26:58.882 [main] INFO org.eclipse.hono.cli.Application - The following profiles are active: receiver,local
12:26:59.122 [main] INFO org.eclipse.hono.cli.Application - running command line client in role(s): receiver,local
12:26:59.273 [main] INFO o.e.h.a.c.a.ProtonBasedApplicationClient - connecting to Hono endpoint
12:26:59.320 [main] INFO org.eclipse.hono.cli.Application - Started Application in 0.744 seconds (JVM running for 1.079)
12:26:59.338 [vert.x-eventloop-thread-0] WARN i.n.r.d.DnsServerAddressStreamProviders - Can not find io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider in the classpath, fallback to system defaults. This may result in incorrect DNS resolutions on MacOS.
12:27:10.457 [vert.x-eventloop-thread-0] INFO o.e.h.client.impl.HonoConnectionImpl - max number of attempts [5] to re-connect to server [127.0.0.1:15672, role: unknown] have been made, giving up
12:27:10.465 [vert.x-eventloop-thread-0] ERROR org.eclipse.hono.cli.app.Receiver - Error occurred during initialization of receiver: failed to connect
Update: Minikube service list -n hono
NAMESPACE | NAME | TARGET PORT | URL |
---|---|---|---|
hono | eclipse-hono-adapter-amqp-vertx | amqp/5672 | |
amqps/5671 | |||
hono | eclipse-hono-adapter-http-vertx | http/8080 | |
https/8443 | |||
hono | eclipse-hono-adapter-mqtt-vertx | mqtt/1883 | |
secure-mqtt/8883 | |||
hono | eclipse-hono-artemis | No node port | |
hono | eclipse-hono-dispatch-router | No node port | |
hono | eclipse-hono-dispatch-router-ext | amqps/15671 | |
amqp/15672 | |||
hono | eclipse-hono-service-auth | No node port | |
hono | eclipse-hono-service-command-router | No node port | |
hono | eclipse-hono-service-device-registry | No node port | |
hono | eclipse-hono-service-device-registry-ext | http/28080 | |
https/28443 | |||
hono | eclipse-hono-service-device-registry-headless | No node port | |
----------- | ----------------------------------------------- | ------------------ | ----- |
Update:
Kubernetes services:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 8d
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论