我正在尝试使用本指南在我的Amazon EC2实例(ubuntu / images / hvm-ssd / ubuntu-xenial-16.04-amd64-server-20170414)上设置HiveMQ: http ://www.hivemq.com/docs/hivemq /最新/#hivemqdocs_installation_for_specific_operating_systems
安装完成后,我可以使用以下方法成功运行HiveMQ:
将目录更改为HiveMQ目录cd /opt/hivemq
执行启动脚本./bin/run.sh
HiveMQ将开始运行,并侦听端口1883,我可以连接并订阅代理。
当我将HiveMQ作为systemctl服务运行时:
对于像Debian,Ubuntu这样基于Debian的linux,使用systemd systemctl enable hivemq Raspbian systemctl enable hivemq它作为一项服务开始,没有任何问题
但是,运行netstat -an|grep 1883它不会显示任何活动。 HiveMQ似乎不听任何端口,我无法连接我的MQTT客户端。 可能是什么问题?
I am trying to set up HiveMQ on my Amazon EC2 instance (ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20170414) using this guide: http://www.hivemq.com/docs/hivemq/latest/#hivemqdocs_installation_for_specific_operating_systems
After installing I can succesfully run HiveMQ using:
Change directory to HiveMQ directory cd /opt/hivemq
Execute startup script ./bin/run.sh
HiveMQ will start running, and listening to port 1883 and I can connect and subscribe to the broker.
When I run HiveMQ as a systemctl service:
For Debian-based linux like Debian, Ubuntu, Raspbian using systemd systemctl enable hivemqIt starts as a service withoutany issues
However, when running netstat -an|grep 1883 it does not show any activity. HiveMQ do not seem to listen to any ports and I can not connect with my MQTT client. What could be the issue?
最满意答案
没有任何其他信息,我的猜测将是权限问题。
chown -R hivemq:hivemq /opt/hivemq (将hivemq文件夹的所有者更改为hivemq用户)
将解决此问题
without any additional information my guess would be an issue with permissions.
chown -R hivemq:hivemq /opt/hivemq (changing the owner of the hivemq folder to the hivemq user)
will resolve this issue
更多推荐
发布评论