Hi, I have had this issue before, reset my gateway and started from scratch and am getting a similar error. Have gotten a bit further this time though.
I have my gateway on a RPi 4 connected by ethernet and wifi. I primarily access it through my domain name. This evening, I noticed that my automations were not running. I could not access my gateway through the domain or the local IP addresses. I rebooted by Pi and it still would not work.
My Pi is seen on my network though by my router. I was able to SSH into it from my PC. I checked the running processes and only got:
pi@gateway:~ $ ps
PID TTY TIME CMD
1436 pts/0 00:00:00 bash
1635 pts/0 00:00:00 ps
So it looked like Gateway was not running? So i navigated to ~/mozilla-iot/gateway and ran run-app.sh. After a bunch of printout, I got the following error:
Opening database: /home/pi/.mozilla-iot/config/db.sqlite3
2020-01-16 17:09:19.257 INFO : Opening database: /home/pi/.mozilla-iot/log/logs.sqlite3
2020-01-16 17:09:19.942 INFO : DNS config is: gateway
2020-01-16 17:09:19.944 INFO : Service Discovery: changing profile - local domain is now: gateway
2020-01-16 17:09:21.622 INFO : Service Discovery: state changed to: true
2020-01-16 17:09:21.839 ERROR : Error: listen EADDRINUSE :::4443
at Server.setupListenHandle [as _listen2] (net.js:1360:14)
at listenInCluster (net.js:1401:12)
at Server.listen (net.js:1485:7)
at promises.push.Promise (/home/pi/mozilla-iot/gateway/build/webpack:/src/app.js:133:1)
at new Promise ()
at startHttpsGateway (/home/pi/mozilla-iot/gateway/build/webpack:/src/app.js:132:1)
at serverStartup.promise.TunnelService.userSkipped.then (/home/pi/mozilla-iot/gateway/build/webpack:/src/app.js:381:1)
at
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! webthings-gateway@0.10.0 run-only: node build/gateway.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webthings-gateway@0.10.0 run-only 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! /home/pi/.npm/_logs/2020-01-16T22_09_21_875Z-debug.log
No idea if run-app.sh is even how I would try and manually start the gateway. I never have had to before, it has always just worked.
Any help would be greatly appreciated. Really don’t want to start over from scratch again as I have MUUCCCCHHHH more automations and devices now.
Thanks!