Mosquitto:以仅本地模式启动 [英] Mosquitto: Starting in local only mode

查看:78
本文介绍了Mosquitto:以仅本地模式启动的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个虚拟机,它应该是主机,可以接收和发送数据.第一张图片是我在我的主机上遇到的错误(我试图从中发送数据).第二张图是我虚拟机上的mosquitto登录.此外,我正在使用默认配置,据我所知,这不会导致这些问题,至少从我从其他示例中看到的情况来看.我对所有这些工作原理知之甚少,因此非常感谢您的帮助.

I have a virtual machine that is supposed to be the host, which can receive and send data. The first picture is the error that I'm getting on my main machine (from which I'm trying to send data from). The second picture is the mosquitto log on my virtual machine. Also I'm using the default config, which as far as I know can't cause these problems, at least from what I have seen from other examples. I have very little understanding on how all of this works, so any help is appreciated.

我在主机上的尝试:

  1. 禁用 Windows 防御程序
  2. 为mosquitto.exe"添加防火墙规则
  3. 在 Linux 机器上安装 mosquitto

推荐答案

从 Mosquitto 2.0.0 版(您正在运行 v2.0.2)开始,默认配置只会绑定到 localhost作为转向更安全的默认状态的举措.

Starting with the release of Mosquitto version 2.0.0 (you are running v2.0.2) the default config will only bind to localhost as a move to a more secure default posture.

如果您希望能够从其他机器访问代理,您将需要显式编辑配置文件以添加一个新的 listener 绑定到外部 IP 地址(或 0.0.0.0) 或为默认侦听器添加 bind 条目.

If you want to be able to access the broker from other machines you will need to explicitly edit the config files to either add a new listener that binds to the external IP address (or 0.0.0.0) or add a bind entry for the default listener.

默认情况下,它也只允许来自 localhost 的匿名连接(没有用户名/密码),以允许来自远程添加的匿名:

By default it will also only allow anonymous connections (without username/password) from localhost, to allow anonymous from remote add:

allow_anonymous true 

更多详细信息可以在 2.0 发行说明中找到 这里

More details can be found in the 2.0 release notes here

这篇关于Mosquitto:以仅本地模式启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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