Skip to content
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

Failing to start database mongodb #7

Open
errorkallu opened this issue Mar 7, 2021 · 11 comments
Open

Failing to start database mongodb #7

errorkallu opened this issue Mar 7, 2021 · 11 comments
Labels
Hacktoberfest Hacktoberfest help wanted Extra attention is needed

Comments

@errorkallu
Copy link

Hi
I installed the addon-nightscout on my Home assistent and wen i start the addon it is giving me an error saying
"INFO: Nginx waiting for Nightscout...

  • Starting database mongodb
    ...fail!
  • Starting database mongodb
    ...fail!
  • Starting database mongodb
    ...fail!
  • Starting database mongodb

Can you Please Help me to fix it

Thanking you
-sri

@marciogranzotto
Copy link
Owner

please check if this issue still happens with the new 1.2.0 version

@BaQs
Copy link

BaQs commented Oct 17, 2021

@marciogranzotto : I think this comes WITH the new version:

2021-10-17T10:39:37.116+0200 I CONTROL [main] ***** SERVER RESTARTED *****
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] MongoDB starting : pid=1623 port=27017 dbpath=/var/lib/mongodb 64-bit host=1dd81675-nightscout
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] db version v3.6.3
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] git version: 9586e557d54ef70f9ca4b43c26892cd55257e1a5
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] OpenSSL version: OpenSSL 1.1.1 11 Sep 2018
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] allocator: tcmalloc
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] modules: none
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] build environment:
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] distarch: x86_64
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] target_arch: x86_64
2021-10-17T10:39:37.130+0200 I CONTROL [initandlisten] options: { config: "/etc/mongodb.conf", net: { bindIp: "127.0.0.1" }, storage: { dbPath: "/var/lib/mongodb", journal: { enabled: true } }, systemLog: { destination: "file", logAppend: true, path: "/var/log/mongodb/mongodb.log" } }
2021-10-17T10:39:37.131+0200 I - [initandlisten] Detected data files in /var/lib/mongodb created by the 'mmapv1' storage engine, so setting the active storage engine to 'mmapv1'.
2021-10-17T10:39:37.158+0200 I JOURNAL [initandlisten] journal dir=/var/lib/mongodb/journal
2021-10-17T10:39:37.158+0200 I JOURNAL [initandlisten] recover : no journal files present, no recovery needed
2021-10-17T10:39:37.209+0200 I JOURNAL [durability] Durability thread started
2021-10-17T10:39:37.209+0200 I JOURNAL [journal writer] Journal writer thread started
2021-10-17T10:39:37.210+0200 I CONTROL [initandlisten]
2021-10-17T10:39:37.210+0200 I CONTROL [initandlisten] ** WARNING: Access control is not enabled for the database.
2021-10-17T10:39:37.210+0200 I CONTROL [initandlisten] ** Read and write access to data and configuration is unrestricted.
2021-10-17T10:39:37.210+0200 I CONTROL [initandlisten]
2021-10-17T10:39:37.246+0200 F CONTROL [initandlisten] ** IMPORTANT: UPGRADE PROBLEM: The data files need to be fully upgraded to version 3.4 before attempting an upgrade to 3.6; see http://dochub.mongodb.org/core/3.6-upgrade-fcv for more details.
2021-10-17T10:39:37.246+0200 I NETWORK [initandlisten] shutdown: going to close listening sockets...
2021-10-17T10:39:37.246+0200 I NETWORK [initandlisten] removing socket file: /tmp/mongodb-27017.sock
2021-10-17T10:39:37.247+0200 I REPL [initandlisten] shutdown: removing all drop-pending collections...
2021-10-17T10:39:37.247+0200 I REPL [initandlisten] shutdown: removing checkpointTimestamp collection...
2021-10-17T10:39:37.247+0200 I STORAGE [initandlisten] shutdown: waiting for fs preallocator...
2021-10-17T10:39:37.247+0200 I STORAGE [initandlisten] shutdown: final commit...
2021-10-17T10:39:37.247+0200 I JOURNAL [initandlisten] journalCleanup...
2021-10-17T10:39:37.247+0200 I JOURNAL [initandlisten] removeJournalFiles
2021-10-17T10:39:37.247+0200 I JOURNAL [initandlisten] old journal file will be removed: /var/lib/mongodb/journal/j._0
2021-10-17T10:39:37.248+0200 I JOURNAL [initandlisten] Terminating durability thread ...
2021-10-17T10:39:37.349+0200 I JOURNAL [journal writer] Journal writer thread stopped
2021-10-17T10:39:37.350+0200 I JOURNAL [durability] Durability thread stopped
2021-10-17T10:39:37.350+0200 I STORAGE [initandlisten] shutdown: closing all files...
2021-10-17T10:39:37.352+0200 I STORAGE [initandlisten] closeAllFiles() finished
2021-10-17T10:39:37.352+0200 I STORAGE [initandlisten] shutdown: removing fs lock...
2021-10-17T10:39:37.352+0200 I CONTROL [initandlisten] now exiting
2021-10-17T10:39:37.352+0200 I CONTROL [initandlisten] shutting down with code:62`

@BaQs
Copy link

BaQs commented Oct 17, 2021

From what I can read on the web, this command was missing before the upgrade:

db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } )

@marciogranzotto marciogranzotto added Hacktoberfest Hacktoberfest help wanted Extra attention is needed labels Oct 21, 2021
@marciogranzotto
Copy link
Owner

@BaQs strange... maybe try to uninstall the add-on and add it again so it can recreate the database instead of using your old one

@BaQs
Copy link

BaQs commented Oct 21, 2021

Can I backup the db somehow?

@BaQs
Copy link

BaQs commented Nov 14, 2021

Ok I managed by installing few packages within the docker container.
Then mongodump
Copy the file somewhere
Fresh-install the addon
restore the mongo database

\o/

@commputethis
Copy link

commputethis commented Sep 11, 2022

I am having this exact issue. I have tried uninstalling/re-installing multiple times. I am running Home Assistant 22.9.2.
image
image

I've tried with and without SSL enabled (API key in screenshot is not the one I am using, but is the same length).
image

This is the end of the log file.
image

I can see the add-on installed properly, at least according to supervisor logs:
image

What can I try to fix this?

@commputethis
Copy link

Uninstalled NightScout AddOn
Updated Home Assistant
Installed NightScout AddOn
Added proper configuration fields
Started NightScout AddOn

Problem pesists. :-(
image

@jonathanware
Copy link

I'm getting this issue as well. Any chance this can be fixed?

@marciogranzotto
Copy link
Owner

hmm... I've noticed that @commputethis is using it on a raspberry pi. I've only used it on x86_64 and have no way of easily test in on raspberry

@marciogranzotto
Copy link
Owner

I've just released v1.4.1 with a possible fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Hacktoberfest Hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants