Unable to start old version of mongodb - mongodb

In one of our server (Ubuntu 16.04.6), I'm trying to install an older version (2.6, to mimic our production) of mongo DB using the instruction given here.
All commands in the instructions went well, but when I tried to execute the command to start the mongo(sudo service mongod start), I'm getting the below error,
Failed to start mongod.service: Unit mongod.service not found.
No idea, what exactly I'm missing. Why this is not working? And how else can I install the version 2.6?

I had to execute this command to start the mongod.
/usr/bin/mongod --config /etc/mongod.conf

Related

strapi start command not working

I want to start strapi cms in the browser but Tells me :
Make sure your MongoDB database is running
In the event MongoDB is running
How can I solve this problem?
Mongod & mongo is running
I had the same problem and I had to update mongo to 3.6, stop the mongod service using
$ sudo service mongod stop
and run mongod in a terminal and leave it open.
$ mongod
The next time it seemed to recognise the mongo service started by the command
$ sudo service mongod start
Go to your project file.
go to the config/environments/development folder and click on database.json. for username and password you leave it empty. and host you put 127.0.0.1 port: 27017 as in the picture
if you have finished the modifications you open two terminal:
on the first you start mongoDB by doing:
mongod
and once mongoDB has started you start on the other console strapi by making:
strapi start or npm start
Try removing the new plugins (if any) that you have installed.
I have faced this issue 2 times
Once I installed strapi command plugin
Another time I installed seo plugin.
I do no the root cause. But removing those packages and re-installed worked.

Failed to restart mongod.service : Unit mongod.service not found

There are a lot of variations for this question, on different forums. I tried a lot of things to get it to work. I am using AWS EC2 and MEAN by Bitnami, I tried connecting using Node JS and I realized that my monogodb service is not running. I checked it by running on the terminal (connected using Putty)
service mongod status
This is the error I get
mongodb.service Loaded:not-found (Reason: No such file or directory)
Active: inactive(dead)
To try my luck, I tried
sudo service mongod restart
And I get this error:
Failed to restart mongod.service : Unit mongod.service not found
Now, just to probe more I tried looking if I have this service installed.
I ran this command: ls /lib/systemd/system
And it gave a huge list, but I couldn't find mongod.service anywhere.
My Ubuntu Ver: 16.04
I am guessing it's not present or maybe I am looking for the wrong stuff. Please let me know how do I get the service to run. I am sort of new to MongoDB and Bitnami.
Each Bitnami MEAN stack includes a control script that lets you easily stop, start and restart services.
The script is located at /opt/bitnami/ctlscript.sh.
To start all services:
sudo /opt/bitnami/ctlscript.sh start
To start a single service:
sudo /opt/bitnami/ctlscript.sh start <service name>
So to answer your question:
sudo /opt/bitnami/ctlscript.sh start mongod
You can obtain a list of available services and operations by running the script without any arguments:
sudo /opt/bitnami/ctlscript.sh

Debian 8.5 - Service : command not found

I've installed MongoDB following this (https://docs.mongodb.com/master/tutorial/install-mongodb-on-debian/?_ga=2.104926336.2025310627.1509020418-427799538.1509020418) but when trying to start MongoDB with : sudo service mongod start , i get a error indicating zsh: command not found: service
It would help to know your operating system. You may be on something
modern enough to support Systemd. In that case, the appropriate
command is something close to:
% sudo systemctl start mongodb
That works on an Arch Linux system. Yours might be called mongod or
something similar. You can just type the mongo part of it and hope
that Zsh will complete it appropriately.

Can not run MongoDB using Ubuntu 14.04

I have installed mongoDB in my Ubuntu system but unable to start it.while i am running this service mongod start it throwing the following message.
start: Unknown job: mongod
Here i need to start the MongoDB. Please help me.
Looks like the mongod is not installed properly. Verify this by checking the presence of System V init script in location /etc/init.d/mongod. If not present, try installing the mongod again.

Mongo 2.6.3 does not start on init

On fresh install of Ubuntu 14.04, I have installed mongodb 2.6.3 from mongo package,
problem is, that it does not start on reboot. It starts normally when I do
sudo service mongod start
and there are no errors in log file.
but when I reboot, log file has no new entries and
service mongod status
produces
mongod stop/waiting
I have tried mongod --repair, with no effect. I have tried fresh install of Ubuntu 14.04, as I thought that my older many times upgraded OS might have something wrong with it, but nothing changed.
With older version mongo that comes from ubuntu package manager, everything was starting up nicely.
Can you please give some advice on where to look to fix this issue and make mongod start up when system is booted up. Thanks!
Had the same problem. In the log file there was an:
************
Unclean shutdown detected
Please visit http://dochub.mongodb.org/core/repair for recovery instructions.
************
To solve this error, I just removed the lock file and it worked again.
sudo rm /var/lib/mongodb/mongod.lock
I believe the issue is that mongo upstart job checks if mongo is installed by the package manager. You need to edit the upstart job to use the new from-source binary location (which I think is /opt/mongodb/bin/mongod).