user163169
user163169

Reputation: 135

Mongodb on linux mint I get error mongodb.service: Main process exited, code=exited, status=62/n/a

I am running

DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=18.2
DISTRIB_CODENAME=sonya
DISTRIB_DESCRIPTION="Linux Mint 18.2 Sonya

"

I have installed mongodb

db version v3.6.1
git version: 025d4f4fe61efd1fb6f0005be20cb45a004093d1
OpenSSL version: OpenSSL 1.0.2g  1 Mar 2016
allocator: tcmalloc
modules: none
build environment:
    distmod: ubuntu1604
    distarch: x86_64
    target_arch: x86_64

I get this error when I run mongod

Jan 10 09:34:35 kat35601-Precision-7510 systemd[1]: Started High-performance, schema-free document-oriented database.
Jan 10 09:34:36 kat35601-Precision-7510 systemd[1]: mongodb.service: Main process exited, code=exited, status=62/n/a
Jan 10 09:34:36 kat35601-Precision-7510 systemd[1]: mongodb.service: Unit entered failed state.
Jan 10 09:34:36 kat35601-Precision-7510 systemd[1]: mongodb.service: Failed with result 'exit-code'.

What is wrong????

Upvotes: 4

Views: 5680

Answers (1)

Alex Blex
Alex Blex

Reputation: 37058

Exit statuses are documented at https://github.com/mongodb/mongo/blob/master/src/mongo/util/exit_code.h

status=62 in particular reads:

EXIT_NEED_DOWNGRADE = 62, // The current binary version is not appropriate to run on the existing datafiles.

which suggests you have files in your data directory that are binary not compatible with your version of the db, i.e. were created by previous version of the database.

You can either downgrade the db to the matching version, or mongodump/mongorestore data to match version of the db.

Upvotes: 10

Related Questions