tsightler / ring-mqtt

Ring devices to MQTT Bridge
MIT License
569 stars 103 forks source link

Unable to connect to MQTT broker connect ECONNREFUSED #713

Closed farbod1277 closed 1 year ago

farbod1277 commented 1 year ago

Hi there, I'm using mosquitto v1.6.9 on port 1885 (-p 1885) on Ubuntu 20.04 with default config as my MQTT broker. I installed the ring-mqtt package using docker and when I run it I get the following output. I did change the config file to port 1885.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/ring-mqtt.sh
-------------------------------------------------------
| Ring-MQTT with Video Streaming                      |
| Docker Edition                                      |
|                                                     |
| For support questions please visit:                 |
| https://github.com/tsightler/ring-mqtt/discussions  |
-------------------------------------------------------
cont-init: info: /etc/cont-init.d/ring-mqtt.sh exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun ring-mqtt (no readiness notification)
s6-rc: info: service legacy-services successfully started
-------------------------------------------------------
ring-mqtt.js version: 5.5.1
Node version v18.17.0
NPM version 9.1.2
git version 2.38.5
-------------------------------------------------------
Running ring-mqtt...
2023-08-22T02:46:06.192Z ring-mqtt Detected runmode: docker
2023-08-22T02:46:06.194Z ring-mqtt Configuration file: /data/config.json
2023-08-22T02:46:07.531Z ring-mqtt Reading latest data from state file: /data/ring-state.json
2023-08-22T02:46:07.534Z ring-mqtt MQTT URL: mqtt://localhost:1885
2023-08-22T02:46:07.593Z ring-mqtt Attempting connection to Ring API using saved refresh token...
2023-08-22T02:46:11.210Z ring-mqtt Successfully established connection to Ring API using saved token
2023-08-22T02:46:11.213Z ring-mqtt Received updated refresh token
2023-08-22T02:46:11.213Z ring-mqtt Saving updated refresh token to state file
2023-08-22T02:46:12.241Z ring-mqtt Successfully saved updated state file: /data/ring-state.json
2023-08-22T02:46:13.210Z ring-mqtt Attempting connection to MQTT broker...
2023-08-22T02:46:13.305Z ring-mqtt Unable to connect to MQTT broker connect ECONNREFUSED 127.0.0.1:1885

Thanks

tsightler commented 1 year ago

I'm afraid I don't have the resources to provide individual support for configuration of tools other than ring-mqtt. There are plenty of online resources explaining how to install and configure your MQTT broker, please search for them. Based on the logs you are attempting to use anonymouse MQTT connection, but, most likely, your broker is not configured to accept this connection.