Poolcontroller docker container keeps restarting (fresh install) #473
Unanswered
MaxVonEvil
asked this question in
App and O/S Config Questions
Replies: 1 comment 6 replies
-
The error message indicates that the process running njsPC does not have access to read the config.json and defaultConfig.json files. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everone and @tagyoureit @emes, @wurmr
I'm currently working on getting the latest poolcontroller+dashpanel docker image running via docker-compose on a Pi4.
Yet it seems the containers keeps restarting due to an illegal read operation on a directory inside the container?
As I'm not a Docker guru by any stretch (but hey, I can google ;) I could use a kick in the right direction or a bit of help how to solve this. Here's the steps I took:
Used the unmodified docker-compose.yml which includes both server and dash panel, published in the wiki
Did a docker-compose pull and docker-compose up -d So far so good
Yet when checking status with docker container ls -a it's status never changes from 'Restarting (1) 5 seconds ago'
Running a docker logs --tail 50 --follow --timestamps poolcontroller shows repeats of this block of errormessages:
2022-06-04T20:06:18.704201739Z Error reading configuration information. Aborting startup: Error: EISDIR: illegal operation on a directory, read
2022-06-04T20:06:18.751804539Z Error: EISDIR: illegal operation on a directory, read
2022-06-04T20:06:18.751888818Z at Object.readSync (node:fs:723:3)
2022-06-04T20:06:18.751906670Z at tryReadSync (node:fs:433:20)
2022-06-04T20:06:18.751923170Z at Object.readFileSync (node:fs:479:19)
2022-06-04T20:06:18.751938893Z at new Config (/app/config/Config.ts:37:69)
2022-06-04T20:06:18.751954412Z at Object. (/app/config/Config.ts:192:31)
2022-06-04T20:06:18.751971504Z at Module._compile (node:internal/modules/cjs/loader:1101:14)
2022-06-04T20:06:18.751987486Z at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
2022-06-04T20:06:18.752002875Z at Module.load (node:internal/modules/cjs/loader:981:32)
2022-06-04T20:06:18.752018561Z at Function.Module._load (node:internal/modules/cjs/loader:822:12)
2022-06-04T20:06:18.752034061Z at Module.require (node:internal/modules/cjs/loader:1005:19)
It would seem evident that Docker is not happy about something in /app/config/Config.ts
I also tried composing with all the bells and verbose whistles I could think (sudo docker-compose --verbose up --force-recreate --build --renew-anon-volumes) But all I got was the same.
I made a copy of the container image and shelled into it:
docker commit poolcontroller mypcdebug
docker run -it --rm --entrypoint sh mypcdebug
Checking the /app/config/Config.ts, it's in there alright and it's got 755 permissions, so it would seem permissions are in order.
Opening the file with vi, line 37:69 as referenced above is: this._cfg = fs.existsSync(this.cfgPath) ? JSON.parse(fs.readFileSync(this.cfgPath, "utf8")) : {};^M it seems that it's the existSync() method throwing the error, yet I could be wrong..?
NOTE1: It should be said that running the container manually with docker run --rm -it --group-add dialout -p 4200:4200 --device /dev/ttyUSB0 msmi/nodejs-poolcontroller seems to work fine, yet I really need to run it in the background.
NOTE2: I know the docker install to be kosher as it's currently running Zwavejs2MQTT in another container without issue.
Would appreciate any suggestions to help crack this nut. Let me know if I need to do a bug-report or anything else.
Thanks
/Max
Beta Was this translation helpful? Give feedback.
All reactions