发送消息给Iot Hub [英] Send Message to Iot Hub

查看:81
本文介绍了发送消息给Iot Hub的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,

我有一个在Raspberry Pi上运行的java程序,用于向Azure发送RFID选项卡信息。  ;当检测到运动时,Pi连接到RFID阅读器,告诉扫描仪扫描标签,并将读取的任何标签发送到Azure。 这是使用MQTT
和AMQPS(即必须切换到AMQPS,因为MQTT刚刚停止工作)。  AMQPS可以工作,但现在只有当我使用我们的内部网络(即完全上网)从我的电脑运行代码时才会这样做。 我们有一个单独的物联网设备网络
就像Pi一样,它有一个防火墙规则允许pi设备连接到Azure(经过测试,它运行良好,但过去一周它还没有工作。) 我已在两个设备(pc和Pi)上运行traceroutes,我可以确认两者都解析了
与Azure资源相同的IP地址(因此DNS不是问题)。 我在程序日志中收到的错误是"IoT Hub响应消息xxxxxxxxxxxxx,状态为MESSAGE_CANCELLED_ONCLOSE"。 

I have a java program that runs on a Raspberry Pi to send RFID tab information to Azure.  The Pi connects to the RFID Reader when motion is detected, tells the scanner to scan for tags, and send any tags read to Azure.  This was working using MQTT and AMQPS (i.e. had to switch over to AMQPS as MQTT just stopped working altogether).  AMQPS works but now but only when I run the code from my pc using our internal network (i.e full internet access).  We have a separate network for IoT devices like the Pi, and it has a firewall rule to allow the pi devices to connect to Azure (was tested and it worked perfectly, but for the past week it hasn't been working).  I have run traceroutes on both devices (pc and Pi) and I can confirm that both resolve the same ip address for Azure resources (so DNS isn't an issue).  The error i get in my program logs is "IoT Hub responded to message xxxxxxxxxxxxx with status MESSAGE_CANCELLED_ONCLOSE". 

谢谢,

Reggie

推荐答案

嗨Reggie,

看看这个  问题  看看是否有帮助。

Take a look at this issue and see if it helps.

您还可以查看

监控和故障排除

启用诊断日志
,帮助您找出问题的根本原因。

You can also check the Monitoring and troubleshooting and Enable the diagnostic logs which helps you to get the root cause of the issue.

< span style ="font-size:10.0pt;行高:107%; font-family:'Verdana',sans-serif">如果有帮助,请告诉我们。


这篇关于发送消息给Iot Hub的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆