HiveMQ systemctl服务没有监听端口(HiveMQ systemctl service not listening to port)

编程入门 行业动态 更新时间:2024-10-25 03:33:14
HiveMQ systemctl服务没有监听端口(HiveMQ systemctl service not listening to port)

我正在尝试使用本指南在我的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 hivemq

It 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

更多推荐

本文发布于:2023-08-07 20:24:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1465528.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:端口   systemctl   HiveMQ   port   listening

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!