我正在尝试使用带有用户名和密码的身份验证在Windows上配置Mosquitto MQTT代理。
我在mosquitto.conf文件中添加了以下行:
allow_anonymous false
用户名测试 remote_username测试
remote_password Test123
发生运行代理跟踪错误时:
C:\ Program Files(x86)\ mosquitto> mosquitto.exe -c mosquitto.conf -p 1883错误:桥配置无效。发现错误 mosquitto.conf:750。错误:无法打开配置文件。
没有用户名和密码,我可以启动代理并与MQTTLens客户端连接。
谢谢, 阿肖克
答案 0 :(得分:4)
var formData = {
filename: filename,
file: fs.createReadStream(fileloc)
}
var req = request.post({url: 'http://myvendorsapi/Upload_PDF', formData: formData})
req.pipe(fs.createWriteStream('OUTPUT FILE NAME'))
和remote_username
选项用于配置网桥。您应该查看remote_password
选项。例如
password_file
使用
生成文件password_file /etc/mosquitto/pwfile
并添加更多用户
mosquitto_passwd -c /etc/mosquitto/pwfile ashok