michelde / telenot

Telenot Adapter
Apache License 2.0
6 stars 5 forks source link

Problem Starting Docker Container #4

Closed cd-tronic closed 3 years ago

cd-tronic commented 3 years ago

Hi @michelde ,

I'm trying to get the Dockercontainer up running on a synology NAS that also hosts openhab and mosquitto broker.

I built the project as it is in docker (didn't change anything). This worked without any issue. I also set the enviroment variables in Synology Docker UI. If i try to start the container it stops after a few seconds with an error:

> telenot_nodejs@1.0.0 start /usr/src/app
> node index.js
debug: MQTT Host: 127.0.0.1
/usr/src/app/node_modules/mqtt/lib/connect/index.js:67
      throw new Error('Missing protocol')
      ^
Error: Missing protocol
    at Object.connect (/usr/src/app/node_modules/mqtt/lib/connect/index.js:67:13)
    at new MqttHandler (/usr/src/app/main/mqttHandler.js:12:28)
    at run (/usr/src/app/index.js:15:23)
    at Object.<anonymous> (/usr/src/app/index.js:21:1)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! telenot_nodejs@1.0.0 start: `node index.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the telenot_nodejs@1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-09-08T17_01_06_049Z-debug.log

Do you have any idea? I can't find the /root/.npm/_logs/2020-09-08T17_01_06_049Z-debug.log file on my synology even as root user.

michelde commented 3 years ago

Hi Carlos,

I think your MQTTHOST variable is set wrong. You need to make it like shown: mqtt://192.168.1.10

cd-tronic commented 3 years ago

Hi @michelde,

thank you. I will try this!

cd-tronic commented 3 years ago

Hi @michelde,

perfect! The Container is running! :)