-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Can't run v8.0.0 or 8.0.1 docker image #716
Comments
You appear to not have the proper version of nodejs in your container. It needs to be rebuilt with node 16+ for v8+ of nodejs-PoolController. |
Very well could be... But shouldn't that be a dependency that is already defined in the docker container? I did not build a custom docker container, rather just used the docker hub one. I get the exact same result if I do this, too:
Since the container stops/dies, I can't check the nodejs version it is using. The build file on docker hub would make it seem it is using 16.13.1 though. Unless something weird is happening when the ARMv7 version of the container was built? |
Removed the containers, removed all images, and did this - same issue. Container dies.
Log:
|
Very well could be but my limited knowledge of Dockerfile syntax has me puzzled. I believe if you look at the the Dockerfile it has the following lines in it I believe this determines which node version is included but for the world of me I cannot figure out which version is in this and how to ensure node v16+ is included. Is it as simple as changing the lines to |
I think you are right. Do we know who "msmi" is that maintains the docker containers linked to in the wiki? Is it @emes ? EDIT: Might be more to it than that... I tried building a custom container with 16-alpine, and lts-alpine (which should be 18?) and got the same results with both builds. |
No errors in the logs it just simply looks like it is restarted over and over again. |
This is all I see in the docker container logs when I built it with 16-alpine:
I could probably go back to a local install instead of using Docker. I went to Docker as (historically) it was much easier to install, get running, and update than managing node-js versions and app versions manually. |
if the question is, which version of node is created by the Dockerfile in the root of the repo, it's v16
To reproduce:
I also tried this with the pre-built image in the wiki and it returns v16 also:
The |
Thanks for confirming. OK, then I'm stumped. I have no idea why the docker containers that were built on v8 and later won't run for me for more than a second before stopping/restarting. For me the container doesn't stay running long enough to even do a "docker exec". Not a big problem, I can just stick with 7.6.1. My whole goal in reporting it was really in case there is an actual bug/something that will affect others. If it is something that is only happening to me, then it might not be worth chasing. I will say that I tested some more, and even with the data folder cleared out and a default config file the v8+ containers still won't run for me on my rpi 4. Yet the 7.x containers all work with no issues. |
I don't run njspc from docker, but I spun up an image/container on my production pi out at the pad and it seems to be working - or at least not getting stuck on the log loop you posted above. Output below:
The errors are just because my rs485 runs on a different port than what njsPC uses by default. Not sure how to help but maybe try and spin one up with a different name than your current container and see if you have similar output as above? If that works, you can copy over config files or restore from backup. |
@johnny2678 you didn't grant device access to the docker container, so it's unable to connect to the /dev/ttyUSB0 device. If you were to run this command |
Yep @treyrich - I wasn't trying to actually run njspC. Just confirming the version of node used in the docker container. My production setup runs on a Mega-BAS/pi |
Sorry to be late to this. I've done a bunch of testing and remain stumped. As has been said, works pre v8. I've built with above and ubuntu. Same results on all. It works fine with no mounted volumes (thereby giving a default, but not saved config). I cannot make it work with /app/config.sys mounted. I'm getting this...
|
'Unexpected token' means it can't read a JSON file properly. If you created an empty file you will get that. Try to create a config.json file with '{}' and see if that resolves the error. |
Had already done that. It was not an empty file but a valid config. Works fine with .trim() added. Anyone else feel free to test by pulling msmi/nodejs-poolcontroller:latest |
I accepted the PR and pushed v8.0.2 release. |
@emes latest has the same issue for me. It actually doesn't work for me with no mounted volumes either though. The following command fails for me on latest:
|
@treyrich hmm. It's working for me with or without mounted volumes/config now.
Can you post output of:
|
|
Would also like to confirm that I'm running successfully on version 7.6.1 on docker with no problems at all. So definitely some difference between 7.6.1 and 8.x.x images. I also tried 8.0.2 today just in case something had changed, but same issue persists. |
I upgraded to be on same versions as you and am still good. You're definitely right that something changed between v7 and v8 of the app, but it wasn't how the docker images are built. I've been going through the commits to try and find something. Have you tried to build the docker image locally? |
Yes, I have, building the image doesn't change anything. From what I can tell the app is crashing with a segmentation fault, I may have some time tomorrow to try to dig deeper into the crash. I can confirm the following though:
Like I said, tomorrow I'll see if I can dig a little deeper into this, so far I've only had a minute here and there to look at it. |
Ok. I've found the issue, it seems it's an upstream issue here serialport/node-serialport#2438 As a fix I've submitted PR #785 which I've tested and is working for me. Not sure if there's anyone else who cares to test this, but I believe that this should close this issue out once merged. |
Released v8.0.3 with the serialport updates and other bug changes. |
nodejs-poolController Version/commit
8.0.1
nodejs-poolController-dashPanel Version/commit
No response
relayEquipmentManager Version/commit
No response
Node Version
No response
Platform
No response
RS485 Adapter
No response
Are you using Docker?
OCP
No response
Pump(s)
No response
Chlorinator(s)
No response
What steps will reproduce the bug?
Update 7.6.1 docker image with 8.0.1, run it.
What happens?
Docker comtainer continually stops/restarts.
What should have happened?
Docker container should run.
Additional information
I have been running 7.6.1 for a long time with no issues on a rpi with USB RS485 dongle.
Tried 8.0.1 today, and I can not get the docker image to run at all. All I see in the docker logs is:
And the container continually restarts. Not sure what other logs/info to look at to see what is happening?
Going back to the 7.6.1 image worked fine, so it isn't a huge issue or anything for me.
Docker compose file:
Simply changing " image: msmi/nodejs-poolcontroller:7.6.1" to " image: msmi/nodejs-poolcontroller" or " image: msmi/nodejs-poolcontroller:latest" will cause the container to continually restart.
The text was updated successfully, but these errors were encountered: