![failed to start mongodb server on port 3002 failed to start mongodb server on port 3002](https://i.stack.imgur.com/1hn6s.png)
The 0.0.0.0 line which should have been there indicating that it is open to all connections was still missing.Ĭan this possibly be a configuration error or is some internal firewall blocking the connection?Įdit: I even made sure iptables isn't causing this. If you create a directory other than this one, you must specify that directory in the dbpath option when starting the mongod process later in this procedure. By default, the mongod process uses the /data/db directory. I only got the following line for MongoDB: Before you start MongoDB for the first time, create the directory to which the mongod process will write data. I ran sudo netstat -tlnp via SSH on the VM, If you get a message saying the user was granted login as a service right, try hitting retry on the MSI dialog and see if it starts.
#FAILED TO START MONGODB SERVER ON PORT 3002 PASSWORD#
the mongo shell installed on my local machine, MongoDB Compass, the server_ip:27017 format on Google Chrome, all fail to connect. Mongodb uses Mongo to report error: could’t connect to server 127.0.0.1:27017, connection attempt failed: socket. Try locating the service under the name of MongoDB Server and set the Startup Type manually to Automatic - In addition to that, you could set the username and password manually. mongo.exe is used to start Mongo Shell, while mongod.exe is used to run Mongo Server. Note that the program we are running is mongod.exe and not mongo.exe. However, the database is still inaccessible via all means, i.e. To start MongoDB Server in Windows, start Mongo Daemon (mongod.exe) using the following command: C:> 'C:Program '. Disclaimer: this how-to guide only applies to self-managed MongoDB servers. Restarted the service service mongod restartĪlso opened the TCP port 27017 on the Google Cloud Platform Firewall. Changing the port in which MongoDB listens is a good way to hide your server from spiders, crawlers and automated attacks. Now I wanted to access the database remotely from my desktop.įollowing this guide, I edited my /etc/nf file and commented out the bind_ip line in the following code: Installed successfully, working well with the mongo shell via SSH. So I installed MongoDB v4.0 on an Ubuntu 18.10 VM running on Google Compute Engine.