You are not logged in.
Pages: 1
Topic closed
Hi. Is there a way to completely re-install mongodb, configurations and all? My mongodb is failing to start, and I think it would be easiest to just start over with a clean slate. It would be nice to keep my databases, but I won't cry if I lose them.
systemctl status mongodb
● mongodb.service - High-performance, schema-free document-oriented database
Loaded: loaded (/usr/lib/systemd/system/mongodb.service; disabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2018-01-10 09:41:07 EST; 1h 31min ago
Process: 25583 ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf (code=exited, status=62)
Main PID: 25583 (code=exited, status=62)
Jan 10 09:41:06 archiral systemd[1]: Started High-performance, schema-free document-oriented database.
Jan 10 09:41:07 archiral systemd[1]: mongodb.service: Main process exited, code=exited, status=62/n/a
Jan 10 09:41:07 archiral systemd[1]: mongodb.service: Failed with result 'exit-code'.I tried pacman -Rsn mongodb, then pacman -S mongodb. And also tried mongod with --repair.
Last edited by Pacopag (2018-01-10 17:26:04)
Offline
This is a perfect XY problem. If your goal is to revert the config to the package original, just do that. There is only one config file for mongodb:
tar -xOf /var/cache/pacman/pkg/mongodb${whatever}.pkg.tar.xz etc/mongodb.conf | sudo tee /etc/mongodb.confLast edited by Trilby (2018-01-10 17:00:58)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
It seems that my mongodb.conf file hadn't changed. It looks the same now. What about finding the original systemd service file? Mine looks like this.
[Unit]
Description=High-performance, schema-free document-oriented database
After=network.target
[Service]
User=mongodb
ExecStart=/usr/bin/mongod --quiet --config /etc/mongodb.conf
[Install]
WantedBy=multi-user.targetI can't figure out what has changed to cause mongodb to stop working.
Offline
What about finding the original systemd service file?
Have at it. If you can't extrapolate from the previous command how to get a different file you are on the wrong distro. If you can but you just expect someone else to spoon-feed it to you anyways, you are on the wrong forums.
But if you want to end the XY cycle you should probably describe the actual problem not just what you think might be a solution. If mongodb is failing to start, you might want to read the wiki page that covers such issues explicitly.
Or you might try googling "mongodb staut 62" which brought me directly to informative results despite my never having used mongodb before.
Last edited by Trilby (2018-01-10 17:17:51)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Sorry. Wasn't paying enough attention. The systemd service file is the same too.
Offline
Thank you, Trilby. I guess deleting the data directory was the simplest solution. If anyone with this issue can afford to lose their data
mv /var/lib/mongodb /var/lib/mongodb_backup
mkdir /var/lib/mongodb
chmod 700 /var/lib/mongodb
chown mongodb:daemon /var/lib/mongodb
systemctl restart mongodbOffline
I know this is an old thread, but this can be fixed without losing data with the following commands
systemctl stop mongodb
sudo pacman -U https://archive.archlinux.org/packages/ … pkg.tar.xz
sudo pacman -U https://archive.archlinux.org/packages/ … pkg.tar.xz
systemctl start mongodb
#make sure mongo is running
systemctl startus mongodb
# continue to the next steps if it's run
mongo
db.adminCommand( { setFeatureCompatibilityVersion: "3.6" } )
exit
systemctl stop mongodb
sudo pacman -S mongodb wiredtiger
systemctl start mongodb
# make sure mongo is running
systemctl startus mongodb
# continue to the next steps if it's run
mongo
db.adminCommand( { setFeatureCompatibilityVersion: "4.0" } )
exit
systemctl restart mongodb
Offline
Thanks for sharing, it's too late to help OP, but perhaps this information will benefit someone else.
I'm going to go ahead and close this old topic now.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
Pages: 1
Topic closed