colloqi/pisignage-server

MongoDB Process not running

amffej opened this issue · 5 comments

Tried following the instructions on this video but kept getting the the Pisignage-server container restarting:
https://www.youtube.com/watch?v=6AP8QvPkTno

Compose file used:
https://github.com/colloqi/pisignage-server/blob/docker-build/docker-compose.yml

Pisignage-server container logs:

2022-11-19 20:24:19 ********************************************
2022-11-19 20:24:19 *          MongoDB Process not running     *
2022-11-19 20:24:19 ********************************************
2022-11-19 20:24:19 
2022-11-19 20:24:06 wait-for-it.sh: waiting 15 seconds for mongo:27017
2022-11-19 20:24:06 wait-for-it.sh: mongo:27017 is available after 0 seconds
2022-11-19 20:24:06 (node:1) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
2022-11-19 20:24:06 (Use `node --trace-deprecation ...` to show where the warning was created)
2022-11-19 20:24:06 (node:1) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2022-11-19 20:24:11 wait-for-it.sh: waiting 15 seconds for mongo:27017
2022-11-19 20:24:11 wait-for-it.sh: mongo:27017 is available after 0 seconds
2022-11-19 20:24:11 (node:1) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
2022-11-19 20:24:11 (Use `node --trace-deprecation ...` to show where the warning was created)
2022-11-19 20:24:11 (node:1) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2022-11-19 20:24:19 wait-for-it.sh: waiting 15 seconds for mongo:27017
2022-11-19 20:24:19 wait-for-it.sh: mongo:27017 is available after 0 seconds
2022-11-19 20:24:19 (node:1) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
2022-11-19 20:24:19 (Use `node --trace-deprecation ...` to show where the warning was created)
2022-11-19 20:24:19 (node:1) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2022-11-19 20:24:34 wait-for-it.sh: waiting 15 seconds for mongo:27017
2022-11-19 20:24:34 wait-for-it.sh: mongo:27017 is available after 0 seconds
2022-11-19 20:24:34 ********************************************************************
2022-11-19 20:24:34 *    After update if you do not see your groups, please change     *
2022-11-19 20:24:34 *    change the uri variable to "mongodb://localhost/pisignage-dev"*
2022-11-19 20:24:34 *    in config/env/development.js and restart the server           *
2022-11-19 20:24:34 ******************************************************************
2022-11-19 20:24:34 
2022-11-19 20:24:34 info: socket.io started
2022-11-19 20:24:34 (node:1) DeprecationWarning: current URL string parser is deprecated, and will be removed in a future version. To use the new parser, pass option { useNewUrlParser: true } to MongoClient.connect.
2022-11-19 20:24:34 (Use `node --trace-deprecation ...` to show where the warning was created)
2022-11-19 20:24:34 (node:1) [MONGODB DRIVER] Warning: Current Server Discovery and Monitoring engine is deprecated, and will be removed in a future version. To use the new Server Discover and Monitoring engine, pass option { useUnifiedTopology: true } to the MongoClient constructor.
2022-11-19 20:24:34 Express server listening on port 3000 in production mode
2022-11-19 20:24:34 ********************************************
2022-11-19 20:24:34 *          MongoDB Process not running     *
2022-11-19 20:24:34 ********************************************`

I'm having the same problem. For the time being I'm using an older, local image. Not sure if it's best practice but here's what I did to get pisignage working again until I have time to investigate further (with my limted abilities...)

List local images:

docker images | grep pisignage

pisignage/pisignage-server          latest    fba24002f1dc   4 days ago      341MB
pisignage/pisignage-server          <none>    d8a6693559dd   2 weeks ago     341MB
pisignage/pisignage-server          <none>    35470575b642   3 months ago    338MB

Tag an older image:

docker tag 35470575b642 pisignage/pisignage-server:old1

pisignage/pisignage-server          latest    fba24002f1dc   4 days ago      341MB
pisignage/pisignage-server          <none>    d8a6693559dd   2 weeks ago     341MB
pisignage/pisignage-server          old1      35470575b642   3 months ago    338MB

Reference the image in the docker-compose file

...
  pisignage-server:
    image: pisignage/pisignage-server:old1
...
  1. First ensure that your mongodb process is running. This will vary per system (and container usage) but on linux it would be sudo service mongod status
    You should see it as active
  2. Follow the debugging instructions in the log message
2022-11-19 20:24:34 ********************************************************************
2022-11-19 20:24:34 *    After update if you do not see your groups, please change     *
2022-11-19 20:24:34 *    change the uri variable to "mongodb://localhost/pisignage-dev"*
2022-11-19 20:24:34 *    in config/env/development.js and restart the server           *
2022-11-19 20:24:34 ******************************************************************
  • Open the file located at config/env/development.js
  • Change the uri variable located on line 8-9 to be "mongodb://localhost/pisignage-dev"
  • Restart pi signage server

I ran into this issue at one point. Don't remember exactly how I fixed it but I do remember following step 2

I also have this issue. Changing the uri variable did not resolve. Any resolutions?

P.S. - Since this issue has been open for almost a year, should I create a new/duplicate issue?

Can you specify whether it is docker or git installation, also what is the issue you are facing?

Can you specify whether it is docker or git installation, also what is the issue you are facing?

My problem ended up being a redundant installation of mongo still running from when I was running pisignage directly.

In my case I just uninstalled the redundant mongod service. Other solutions would be to change the port that it listens to.