Hello. I have the following problem. I install the Unraid-API docker on UnRaid server and everything seems to work. Home Assistant receives data from the server.
As soon as I reboot the server, the Unraid-API docker does not start and even if I start it manually it stops by itself. What could be the problem? This is the log:
>
[email protected] start /app
> cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js
READY Server listening on http://0.0.0.0:80
Connected to mqtt broker
Error: ENOENT: no such file or directory, open 'config/mqttKeys'
at Object.openSync (fs.js:461:3)
at Proxy.readFileSync (fs.js:364:35)
at updateMQTT (/app/mqtt/index.js:268:30)
at MqttClient.<anonymous> (/app/mqtt/index.js:49:7)
at MqttClient.emit (events.js:327:22)
at MqttClient.EventEmitter.emit (domain.js:485:12)
at Readable.<anonymous> (/app/node_modules/mqtt/lib/client.js:1449:14)
at Readable.emit (events.js:315:20)
at Readable.EventEmitter.emit (domain.js:485:12)
at endReadableNT (/app/node_modules/mqtt/node_modules/readable-stream/lib/_stream_readable.js:1010:12) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'config/mqttKeys'
}
The secure keys for mqtt may have not been generated, you need to make 1 authenticated request via the API first for this to work
Error: ENOENT: no such file or directory, open 'config/mqttKeys'
at Object.openSync (fs.js:461:3)
at Proxy.readFileSync (fs.js:364:35)
at updateMQTT (/app/mqtt/index.js:268:30)
at Timeout._onTimeout (/app/mqtt/index.js:300:5)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'config/mqttKeys'
}
The secure keys for mqtt may have not been generated, you need to make 1 authenticated request via the API first for this to work
Failed to retrieve config file, creating new.
ERROR ENOENT: no such file or directory, open 'config/mqttKeys'
at Object.openSync (fs.js:461:3)
at Proxy.readFileSync (fs.js:364:35)
at default (api/getServers.js:27:36)
at call (node_modules/connect/index.js:239:7)
at next (node_modules/connect/index.js:183:5)
at next (node_modules/connect/index.js:161:14)
at next (node_modules/connect/index.js:161:14)
at SendStream.error (node_modules/serve-static/index.js:121:7)
at SendStream.emit (events.js:315:20)
at SendStream.EventEmitter.emit (domain.js:485:12)
Error: ENOENT: no such file or directory, open 'config/mqttKeys'
at Object.openSync (fs.js:461:3)
at Proxy.readFileSync (fs.js:364:35)
at updateMQTT (/app/mqtt/index.js:268:30)
at Timeout._onTimeout (/app/mqtt/index.js:300:5)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7) {
errno: -2,
syscall: 'open',
code: 'ENOENT',
path: 'config/mqttKeys'
}
The secure keys for mqtt may have not been generated, you need to make 1 authenticated request via the API first for this to work
Get Docker Details for ip: 192.168.1.3 Failed
Cannot read property 'forEach' of undefined
Get Dashboard Details for ip: 192.168.1.3 Failed with status code: undefined
connect ECONNREFUSED 192.168.1.3:80
Get VM Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get Docker Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get USB Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get Main Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get Dashboard Details for ip: 192.168.1.3 Failed with status code: undefined
connect ECONNREFUSED 192.168.1.3:80
Get VM Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get Docker Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get USB Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
Get Main Details for ip: 192.168.1.3 Failed
connect ECONNREFUSED 192.168.1.3:80
>
[email protected] start /app
> cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js
Connected to mqtt broker
READY Server listening on http://0.0.0.0:80
Get Docker Details for ip: 192.168.1.3 Failed
Cannot read property 'forEach' of undefined
/app/mqtt/index.js:547
let docker = server.docker.details.containers[dockerId];
^
TypeError: Cannot read property 'containers' of undefined
at ModuleContainer.getDockerDetails (/app/mqtt/index.js:547:38)
at listOnTimeout (internal/timers.js:551:17)
at processTimers (internal/timers.js:492:7)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR!
[email protected] start: `cross-env NUXT_HOST=0.0.0.0 NODE_ENV=production node server/index.js`
npm ERR! Exit status 1
npm ERR! Failed at the
[email protected] 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/2021-01-26T11_45_32_250Z-debug.log