Mongodb fails with exit code 14 on startup - mongodb

I`m trying to start up mongo and I keep getting this message when I check the status.
mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; disabled)
Active: failed (Result: exit-code) since Tue 2016-12-27 15:14:43 CST; 56s ago
Process: 29940 ExecStart=/usr/bin/mongod $OPTIONS run (code=exited, status=14)
Process: 29928 ExecStartPre=/usr/bin/percona-server-mongodb-helper.sh (code=exited, status=0/SUCCESS)
Main PID: 29940 (code=exited, status=14)
Dec 27 15:14:43 debian systemd[1]: Started High-performance, schema-free document-oriented database.
Dec 27 15:14:43 debian mongod[29940]: 2016-12-27T15:14:43.177-0600 I STORAGE Compression: snappy
Dec 27 15:14:43 debian mongod[29940]: 2016-12-27T15:14:43.177-0600 I STORAGE MaxWriteMBPerSec: 1024
Dec 27 15:14:43 debian mongod[29940]: 2016-12-27T15:14:43.177-0600 I STORAGE Crash safe counters: 0
Dec 27 15:14:43 debian systemd[1]: mongod.service: main process exited, code=exited, status=14/n/a
Dec 27 15:14:43 debian systemd[1]: Unit mongod.service entered failed state.
Any ideas on what the issue potentially is? I have tried all the acepted answers along the subject to fix it like deleting the lock file, restarting, and redownloading but Have gotten the same issue. I am using the preconda mongo build

Related

Cant start mongo DB in ubuntu 20.04

mongod.service - MongoDB Database Server
Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2022-10-24 13:22:56 IST; 11s ago
Docs: https://docs.mongodb.org/manual
Process: 3811 ExecStart=/usr/bin/mongod --config /etc/mongod.conf (code=exited, status=1/FAILURE)
Main PID: 3811 (code=exited, status=1/FAILURE)
CPU: 58ms
Oct 24 13:22:56 Nithyanandha systemd[1]: Started MongoDB Database Server.
Oct 24 13:22:56 Nithyanandha mongod[3811]: {"t":{"$date":"2022-10-24T07:52:56.619Z"},"s":"F", "c":"CONTROL", "id":205>
Oct 24 13:22:56 Nithyanandha systemd[1]: mongod.service: Main process exited, code=exited, status=1/FAILURE
Oct 24 13:22:56 Nithyanandha systemd[1]: mongod.service: Failed with result 'exit-code'.
i am new to Mongodb i tried to install mongodb in ubuntu
at first it runs after some days it doest work
Mongodb Does't start it gives more error

Why I got the next errors?

could someone help me with this error please:
Output for command: systemctl start postgresql-13.service
Job for postgresql-13.service failed because the control process exited with error code.
See "systemctl status postgresql-13.service" and "journalctl -xeu postgresql-13.service" for details.
Output for command systemctl status postgresql-13.service
× postgresql-13.service - PostgreSQL 13 database server
Loaded: loaded (/usr/lib/systemd/system/postgresql-13.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2022-08-23 12:17:50 CDT; 1min 47s ago
Docs: https://www.postgresql.org/docs/13/static/
Process: 1079 ExecStartPre=/usr/pgsql-13/bin/postgresql-13-check-db-dir ${PGDATA} (code=exited, status=0/SUCCESS)
Process: 1110 ExecStart=/usr/pgsql-13/bin/postmaster -D ${PGDATA} (code=exited, status=1/FAILURE)
Main PID: 1110 (code=exited, status=1/FAILURE)
CPU: 40ms
Aug 23 12:17:47 fedora systemd[1]: Starting PostgreSQL 13 database server...
Aug 23 12:17:50 fedora postmaster[1110]: 2022-08-23 12:17:50.144 CDT [1110] LOG: redirecting log output to logging collector process
Aug 23 12:17:50 fedora postmaster[1110]: 2022-08-23 12:17:50.144 CDT [1110] HINT: Future log output will appear in directory "log".
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Main process exited, code=exited, status=1/FAILURE
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Killing process 1132 (postmaster) with signal SIGKILL.
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Killing process 1132 (postmaster) with signal SIGKILL.
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Failed with result 'exit-code'.
Aug 23 12:17:50 fedora systemd[1]: postgresql-13.service: Unit process 1132 (postmaster) remains running after unit stopped.
Aug 23 12:17:50 fedora systemd[1]: Failed to start PostgreSQL 13 database server.
Already I uninstall and reinstall postgresql but nothing works. Also I tried to install postgresql-14 but I get the same error.
I have to install postgresql to work alongs with Ruby on Rails.

mongod.service: Failed at step USER spawning /usr/bin/mkdir: No such process

I'm running ec2 instance of os Ubuntu 16.04.
I recently tried to upgrade my mongodb from 3.2 to 3.6.
And I tried to run sudo service mongod start and mongod service failed to start.
Below is the error message.
mongod.service - High-performance, schema-free document-oriented
database
Loaded: loaded (/etc/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-03-05 05:48:12 UTC; 11s ago
Docs: https://docs.mongodb.org/manual
Process: 18587 ExecStartPre=/usr/bin/mkdir -p /var/run/mongodb (code=exited, status=217/USER)
Main PID: 16567 (code=exited, status=100)
Mar 05 05:48:12 ip-172-31-18-34 systemd[1]: Starting High-performance, schema-free document-oriented database...
Mar 05 05:48:12 ip-172-31-18-34 systemd[18587]: mongod.service: Failed at step USER spawning /usr/bin/mkdir: No such proc
Mar 05 05:48:12 ip-172-31-18-34 systemd[1]: mongod.service: Control process exited, code=exited status=217
Mar 05 05:48:12 ip-172-31-18-34 systemd[1]: Failed to start High-performance, schema-free document-oriented database.
Mar 05 05:48:12 ip-172-31-18-34 systemd[1]: mongod.service: Unit entered failed state.
Mar 05 05:48:12 ip-172-31-18-34 systemd[1]: mongod.service: Failed with result 'exit-code'.
And I never edited a single line of default mongod.service file.
How can I fix this issue?
If you have just copied mongod.service file from somewhere you should edit User in [Service] section
Changing ownership of "/var/lib/mongodb" directory worked for me
Command to change ownership:
"sudo chown -R mongodb:mongodb /var/lib/mongodb"
**Old response:**
$ sudo systemctl status mongodb
● mongodb.service - MongoDB Database
Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2019-07-31 18:52:49 IST; 17h ago
Docs: https://docs.mongodb.org/manual
Main PID: 13728 (code=exited, status=217/USER)
Jul 31 18:52:49 LAP-LIN-712 systemd[1]: Started MongoDB Database.
Jul 31 18:52:49 LAP-LIN-712 systemd[13728]: mongodb.service: Failed to determine user credentials: No such process
Jul 31 18:52:49 LAP-LIN-712 systemd[13728]: mongodb.service: Failed at step USER spawning /usr/bin/mongod: No such process
Jul 31 18:52:49 LAP-LIN-712 systemd[1]: mongodb.service: Main process exited, code=exited, status=217/USER
Jul 31 18:52:49 LAP-LIN-712 systemd[1]: mongodb.service: Failed with result 'exit-code'.
**New Response:**
$ sudo systemctl status mongodb
● mongodb.service - MongoDB Database
Loaded: loaded (/etc/systemd/system/mongodb.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2019-08-01 11:54:10 IST; 8s ago
Docs: https://docs.mongodb.org/manual
Main PID: 8143 (mongod)
Tasks: 20 (limit: 4915)
CGroup: /system.slice/mongodb.service
└─8143 /usr/bin/mongod --quiet --config /etc/mongod.conf
/usr/bin/mongod - No such process. ---> This error means you have placed the mongod binary in someother path instead of the default one. Try changing the path in mongod.service file and reattempt it using service start mongodb
For me it was solved by commenting "User" and "Group" directives in the service file as described here.
I hope it helps somebody.

service mongod status "Active: failed ..."

When i tape this command to show the status of mongodb
sudo service mongod status
i have this error output
● mongod.service - High-performance, schema-free document-oriented database
Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2017-07-06 12:57:03 CEST; 3min 52s ago
Docs: https://docs.mongodb.org/manual
Process: 6233 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=100)
Main PID: 6233 (code=exited, status=100)
Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: Started High-performance, schema-free document-oriented database.
Jul 06 12:57:03 ns3067256.ip-94-23-35.eu mongod[6233]: 2017-07-06T12:57:03.090+0200 I CONTROL [main] WARNING: Cannot detect if NUMA interleaving is enabled. Failed to pr
Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: mongod.service: Main process exited, code=exited, status=100/n/a
Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: mongod.service: Unit entered failed state.
Jul 06 12:57:03 ns3067256.ip-94-23-35.eu systemd[1]: mongod.service: Failed with result 'exit-code'.
so what is the solution !?
Go to /etc/mongod.conf and look for dbPath: /xyz/xyz
Use the following command to provide the rights to mongodb
sudo chown -R mongodb:mongodb /xyz/xyz

Mongo DB not working in Ubuntu0.16.04.2

I just installed mongodb by following the instructions at here.
When I try to start mongodb using command
sudo systemctl status mongodb
it goes to next command line and after that i run the command
sudo systemctl status mongodb
I got the following message
mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/etc/systemd/system/mongodb.service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2016-08-13 16:37:29 IST; 2min 50s ago
Process: 10572 ExecStart=/usr/bin/mongod --quiet --config /etc/mongod.conf (code=exited, status=14)
Main PID: 10572 (code=exited, status=14)
Aug 13 16:37:28 nagainfo-Lenovo-G50-70 systemd[1]: Started High-performance, schema-free document-oriented database.
Aug 13 16:37:29 nagainfo-Lenovo-G50-70 systemd[1]: mongodb.service: Main process exited, code=exited, status=14/n/a
Aug 13 16:37:29 nagainfo-Lenovo-G50-70 systemd[1]: mongodb.service: Unit entered failed state.
Aug 13 16:37:29 nagainfo-Lenovo-G50-70 systemd[1]: mongodb.service: Failed with result 'exit-code'.
Please help me to resolve this. I have tried many things like giving permission to log and lib fies. But nothing work for me.
Thanks in advance :)