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
Related
Platform: Magento 2 (V2.4.0) |
Server: Linux Centos
When I run the command below,
COMPOSER_MEMORY_LIMIT=-1 php bin/magento setup:static-content:deploy -f
I get the error,
Could not validate a connection to Elasticsearch. No alive nodes found in your cluster
When I run,
systemctl restart elasticsearch.service
I get the error,
Failed to restart elasticsearch.service: Unit not found.
And when I run the command,
systemctl status elasticsearch
I get the error,
Unit elasticsearch.service could not be found
However, I can see Elasticsearch folder and files in the following path:
vendor/elasticsearch/elasticsearch
Any suggestions?
Thank you!
Hi try using these commands, i use them on my ubuntu instance
sudo -i service elasticsearch start
service elasticsearch restart
sudo -i service elasticsearch stop
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
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.
I am trying to integrate flocker with docker, for that I found plugin flocker-docker-plugin. I installed it by using the commands on my flocker agents.-
$ yum install -y clusterhq-flocker-docker-plugin
$ systemctl enable flocker-docker-plugin
$ systemctl restart flocker-docker-plugin
It shows flocker-docker-plugin is running. However after few seconds when I checked status by using $ systemctl status flocker-docker-plugin, I got error saying
flocker-docker-plugin.service: main process exited, code=killed, status=11/SEGV
Based on the information you have given there could be multiple reasons for this error:
Check if you can reach the flocker control service and more so if your node-agents can reach the control-service.
Check if the flocker-dataset-agent and the flocker-container-agent are running on your nodes.
Check if you have provided certificates for the flocker-docker-plugin as mentioned on their site (https://docs.clusterhq.com/en/latest/docker-integration/generate-api-plugin.html).
While installing flocker i also got the same error as we have just installed the docker plugin and by default it does't start's up.
First use the command systemctl start flocker-docker-plugin and then check the running status of flocker using systemctl status flocker-docker-plugin
Make sure the control service and dataset agent are running correctly first, you can find logs by looking in /var/log/flocker/, journalctl -u flocker-dataset-agent or running flocker-diagnostics.
Read through any error in these logs such as communication with control service issues, certificates issues, agent.yml config issues etc, or feel free to post them for more help.
You can also find flocker-docker-plugin logs the same way to see specific errors that may be occurring.
Here is more information about how to debug flocker.
I have mongodb installed on a new Amazon Linux AMI after implementing the guide here. When running "service mongod start" though, I just get a Starting mongod FAILED message. Nothing else. Blank log file also.
service mongod stop yields a FAILED also.
service mongod status yields "mongod is stopped"
Any thoughts or next steps?
I faced the same problem with my master mongodb instance. I have a replica set of 3 instances on EC2 and I had the same problem after one reboot that we needed for it, mongod simply failed to start.
First thing I did, was changed the ownership of the log file that is set up in the mongod.conf:
sudo chown mongod:mongod <LOG FILE>
After this I tried only sudo mongod and this will log the problem why the service won't start in the log file.
Mine appeared to be some ownership issues with the WiredTiger conf files in the dbPath directory (were set to root ownership instead to mongod user)
What I do in that case is use
sudo killall mongod
and after that it starts ok. My suspicion is that there is a running instance and that's why it fails to start.