Hi, I did my best to run my own mqtt-gateway.
Shortly: did someone run it in 2022 or still using it? I really need help with “Error starting Mosca Server”.
It seems this code comes from farmbot team. I have no idea why they did this in nodejs but OK is it cold be helpfull then no problem.
But it is not very helpful.
-
First nodejs build errors. Last work on this was in 2017. So in combination with nodejs is this quite problem - ubuntu 22 respectively. It does match nothing so I got nice error generator. Finally I found nodejs version 8 match. And the build was done with last error whis I solved with help from stackoverflow.
-
So can I be happy, no. I see another obscure error:
honza@honza-VirtualBox:~/mqtt-gateway$ WEB_API_URL=http://localhost:3000 sudo npm start
[sudo] password for honza:
> farmbot-mqtt-gateway@1.1.0 start /home/honza/mqtt-gateway
> nodemon ./app/index.js
[nodemon] 1.19.4
[nodemon] to restart at any time, enter `rs`
[nodemon] watching dir(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node ./app/index.js`
Using http://localhost:3000 as API URL
{"pid":10241,"hostname":"honza-VirtualBox","name":"mosca","level":50,"time":1662391106351,"msg":"Error starting Mosca Server","v":1}
events.js:183
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE :::1883
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at Server.setupListenHandle [as _listen2] (net.js:1367:14)
at listenInCluster (net.js:1408:12)
at Server.listen (net.js:1492:7)
at /home/honza/mqtt-gateway/node_modules/mosca/lib/server.js:225:16
at makeCall (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:119:7)
at NoResultsHolder.release (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:67:9)
at series (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:39:14)
at Object.eachSeries (/home/honza/mqtt-gateway/node_modules/steed/steed.js:47:5)
at Server.steed.series.logInfo (/home/honza/mqtt-gateway/node_modules/mosca/lib/server.js:211:13)
at makeCall (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:117:7)
at ResultsHolder.release (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:96:9)
at Server.steed.series.steed.eachSeries.fallback (/home/honza/mqtt-gateway/node_modules/mosca/lib/server.js:204:9)
at makeCall (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:117:7)
at ResultsHolder.release (/home/honza/mqtt-gateway/node_modules/fastseries/series.js:96:9)
at /home/honza/mqtt-gateway/node_modules/ascoltatori/lib/ascoltatori.js:93:9
at TrieAscoltatore.<anonymous> (/home/honza/mqtt-gateway/node_modules/ascoltatori/lib/abstract_ascoltatore.js:61:7)
at emitTwo (events.js:126:13)
at TrieAscoltatore.emit (events.js:214:7)
at _addListener (events.js:249:14)
at TrieAscoltatore.addListener (events.js:297:10)
[nodemon] app crashed - waiting for file changes before starting...
Did someone see this error. Has someone idea what is going on?
Thanks, Jan