-
Notifications
You must be signed in to change notification settings - Fork 49
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
Error after reboot Pi #23
Comments
Hi!
What does
docker ps
return?
JerryEnt <notifications@github.com> schrieb am So. 15. Nov. 2020 um 19:00:
… After rebooting the Pi I get this error:
Oops - Nightscout is having trouble
Don't panic, we can work this out! This happens to the best of us.
Check the errors below and then refer to the troubleshooting documentation.
Errors occurred during startup:
Unable to connect to Mongo
{"stack":"Error: MongoDB connection failed! Double check the MONGODB_URI
setting in Heroku.
at /home/node/app/lib/storage/mongo-storage.js:63:32
at processTicksAndRejections
(internal/process/task_queues.js:97:5)","message":"MongoDB connection
failed! Double check the MONGODB_URI setting in Heroku."}
Anny idea?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#23>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYPBFOZ4KIYDYSX6HRRNH3SQAJMJANCNFSM4TWKTJ4Q>
.
|
Got permission denied while trying to connect to the Docker daemon socket at uni x:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers /json: dial unix /var/run/docker.sock: connect: permission denied |
As root user: CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES |
Looks like your mongodb has a problem. If you don‘t have lots of data
inside. You can simply kill and restart.
JerryEnt <notifications@github.com> schrieb am So. 15. Nov. 2020 um 20:21:
… As root user:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
aae586668988 dhermanns/rpi-nightscout:latest "docker-entrypoint.s…" 2
hours ago Up 40 minutes 0.0.0.0:1337->1337/tcp rpinightscout_nightscout_1
9d1f16cfb71e dhermanns/rpi-mongo:2.6.4 "/opt/mongodb/bin/mo…" 2 hours ago
Restarting (100) 22 seconds ago rpinightscout_mongo_1
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYPBFNDBN2AIOEUNK2QRWTSQAS5HANCNFSM4TWKTJ4Q>
.
|
I will make a new image |
docker-compose down
should do the trick.
JerryEnt <notifications@github.com> schrieb am So. 15. Nov. 2020 um 21:38:
… Restart making a image?
Or kill and restart a proces?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYPBFPMUKBLZ6IGOWMIFU3SQA345ANCNFSM4TWKTJ4Q>
.
|
Thank you for the help! |
Welcome ;-)
JerryEnt <notifications@github.com> schrieb am So. 15. Nov. 2020 um 22:14:
… Thank you for the help!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYPBFMMMIPQKN2NU4WSYTDSQBAETANCNFSM4TWKTJ4Q>
.
|
Hello, It is any method to avoid this? docker-compose ps
rpinightscout_mongo_1 /opt/mongodb/bin/mongod Up Because, I format the sd card from RPI, I installed all and it works until first rpi reboot. Another thing: I create the image again and then, after mofdification os docker-compose.yml file, the following error is present (in this care, RPI wasn't restarted): HypriotOS/armv7: root@black-pearl in ~/rpi-nightscout docker-compose logsAttaching to rpinightscout_nightscout_1, rpinightscout_mongo_1 nightscout_1 | Error connecting to MongoDB: {"name":"MongoNetworkError"} - retrying in 15 sec Thank you, Mihai |
Hi Antonia!
This normally happens if you restart your pi without shutting it down
properly. E.g. by just pulling the cord.
When i restart e.g. by
sudo shutdown now
I don‘t experience this.
Cu,
Dirk
Antonia-place <notifications@github.com> schrieb am Sa. 28. Nov. 2020 um
20:54:
… Hello,
I have the same issue like in first post. I installed all, I received data
from xDrip+ application and then, I restarted mu raspberry Pi device. Then,
"Oops - Nightscout is having trouble" in brobser and "nightscout_1 | Error
connecting to MongoDB: {"name":"MongoNetworkError"} - retrying in 60 sec
" in console logs.
It is any method to avoid this?
docker-compose ps
Name Command State Ports
------------------------------
rpinightscout_mongo_1 /opt/mongodb/bin/mongod Up
rpinightscout_nightscout_1 docker-entrypoint.sh node ... Up 0.0.0.0:1337
->1337/tcp
Because, I format the sd card from RPI, I installed all and it works until
first rpi reboot.
Thank you, Mihai
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYPBFLW4UUN3OUXIPTHKRTSSFIPRANCNFSM4TWKTJ4Q>
.
|
Hello Dirk,
I ask this in case in power failure only. Thank you, Mihai |
You could try to search in a mongodb forum how to repair an inconsistent
MongoDB instance. Should be for sure possible.
In my case I have a simple (and cheap) universal power supply to keep the
pi up and running even in case of a blackout.
Antonia-place <notifications@github.com> schrieb am Sa. 28. Nov. 2020 um
22:43:
… Hello Dirk,
Yes, you are right. I tested now wit this command, sudo shutdown now, and
everythimg works great after restart.
But, in case of power failure, it is any possibility to save the data from
mongo db?
Because, I observed this:
- set the rpi, receive data from xDrip+, is working; power off from
power supply (pull the cable off); power on the rpi: the mongo connection
is not possible. In this case, I have to do that:
- docker-compose stop
- docker-compose rm
- docker-compose up -d
After that, everything is working, but no previous data in mongo db.
I ask this in case in power failure only.
Thank you, Mihai
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#23 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAYPBFMIH3NMWBEEV7GRHTDSSFVGJANCNFSM4TWKTJ4Q>
.
|
Ok, I will try to search on mongo forum a solution. |
Hi, Thank you, Mihai |
You would like to modify the environment variables of nightscout? Have a look here: -modify your Nightscout Settings Or do you want to access your Nightscout Site? It is reachable by typing http://:1337 |
Since I wanted to raise the same issue: All my other services running in docker have no problems to boot up again (e.g. after power loss). We should improve this here. The easiest way to restart the service manually is |
In my case docker-compose restart works find - in most cases. I would assume that in cases mongo isn't able to recover from a restart, you would have to do a Have a look here: I noticed that in some cases, mongo wasn't simple able to remove the lock file from its data directory. Further more, I would suggest running k3s in a production environment. I have documented my setup here: I keep the data-directory outside the mongo-image there. So you can easily remove the lock-file in case of problems after a restart. Hope that helps. |
I also have my mongo data volume outside the image (see code below), but still I get the error often enough. I still don't know how to fix this error manually.
|
Did you try the —repair option? |
Because it just happened to me again, I still looking for a robust way. |
Yes - that was what I meant before. Have a look here: https://docs.mongodb.com/manual/tutorial/recover-data-following-unexpected-shutdown/ mongod --repair should do the trick. |
And this is how you do it inside a container: https://stackoverflow.com/questions/39270058/repair-command-in-mongodb-in-docker-container |
After rebooting the Pi I get this error:
Oops - Nightscout is having trouble
Don't panic, we can work this out! This happens to the best of us.
Check the errors below and then refer to the troubleshooting documentation.
Errors occurred during startup:
Unable to connect to Mongo
{"stack":"Error: MongoDB connection failed! Double check the MONGODB_URI setting in Heroku.
at /home/node/app/lib/storage/mongo-storage.js:63:32
at processTicksAndRejections (internal/process/task_queues.js:97:5)","message":"MongoDB connection failed! Double check the MONGODB_URI setting in Heroku."}
Anny idea?
Before rebooting it works fine.
It looks like the Mongo db is not running.
How to try to start the db
The text was updated successfully, but these errors were encountered: