Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connection Refused #4

Open
jsmithgmail opened this issue May 6, 2018 · 3 comments
Open

Connection Refused #4

jsmithgmail opened this issue May 6, 2018 · 3 comments

Comments

@jsmithgmail
Copy link

Hi,
Can you provide some direction on the error below?

docker run -ti --net=host --name harmony-api turlvo/harmony-api:latest /home/harmony-api/harmony-api/script/server
warn:    --minUptime not set. Defaulting to: 1000ms
warn:    --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
Starting discovery.
events.js:161
      throw er; // Unhandled 'error' event
      ^

Error: Connection refused: Not authorized
    at MqttClient._handleConnack (/home/harmony-api/harmony-api/node_modules/mqtt/lib/client.js:735:9)
    at MqttClient._handlePacket (/home/harmony-api/harmony-api/node_modules/mqtt/lib/client.js:296:12)
    at process (/home/harmony-api/harmony-api/node_modules/mqtt/lib/client.js:238:12)
    at Writable.writable._write (/home/harmony-api/harmony-api/node_modules/mqtt/lib/client.js:248:5)
    at doWrite (/home/harmony-api/harmony-api/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:237:10)
    at writeOrBuffer (/home/harmony-api/harmony-api/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:227:5)
    at Writable.write (/home/harmony-api/harmony-api/node_modules/mqtt/node_modules/readable-stream/lib/_stream_writable.js:194:11)
    at Socket.ondata (_stream_readable.js:555:20)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:189:7)
error: Forever detected script exited with code: 1
error: Script restart attempt #1
Starting discovery.
events.js:161
      throw er; // Unhandled 'error' event
      ^
@turlvo
Copy link
Owner

turlvo commented May 10, 2018

Hello,

Hm...
Would you try to retry like this ‘sudo docker run~~~~’?

Thank you.

@jsmithgmail
Copy link
Author

using sudo produces the same error, any other suggestions?

@jsmithgmail
Copy link
Author

So is there anyway to pass username/password for mqtt, I have my mqtt configured to not allow anonymous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants