Is mongodb running?

I have installed mongodb and the php drivers on my unix server. My question is how can I tell if mongodb is running? Is there a simple command line query to check status? If I start it once from...

mongo command not recognized when trying to connect to a mongodb server

I am following the tutorials at docs.mongodb.org, I have completed the first tutorial which was to install mongodb on a Windows machine. I am now at the second stage which is getting started with...

How to connect with username/password to mongodb using native node.js driver

I'm using native mongo driver in Joyent cloud, the node.js application runs fine locally but in Joyent when i run with usrname/pswd that they provided it fails to connect. following is the code...

How to connect to Mongo database locally using python

I am using ipython 2.7. I am creating database name enron in mongodb. I have tried to connect to this database locally but the following error occurred - how do I fix it? this my code: import...

MongoDB on a Windows 7 machine: No connection could be made

After I have started Mongo using mongod.exe on a Windows 7 machine, I tried to start the mongo shell that failed with the error: Failed to connect to 127.0.0.1:27017, reason: errno:10061...

Memory leak with Mongo Java Connection

I am constructing MongoClient Connection in the below manner : public static synchronized MongoClient getInstance(String mongoDbUri) { try { // Standard URI format:...

Calculating needed memory for n connection pools for mongodb running on node.js app

I am trying to profile the performance of my node.js app running mongodb currently configured to use 50 connection pools. Using Blazemeter I have been trying to do a test that sends 1000 simulated...

Exception in monitor thread while connecting to server localhost:27017 while accessing MongoDB with Java

I have the following exception when running Java app for MongoDB: [localhost:27017] org.mongodb.driver.cluster : Exception in monitor thread while connecting to server localhost:27017 while...

Install ONLY mongo shell, not mongodb

As mentioned above, I need to install only the mongo shell on a RHEL instance (machine A). I have a mongodb server on a separate instance (machine B) and need to connect to that from A to run...

Overriding providers in NestJS Jest tests

I want to use an in-memory Mongo instance to mock data for testing purposes in my NestJS application. I have a database provider which connects to my production db using mongoose, which is part of...

SSL Handshake issue with Pymongo on Python3

Trying to connect to Azure CosmosDB mongo server results into an SSL handshake error. I am using Python3 and Pymongo to connect to my Azure CosmosDB. The connection works fine if I run the code...

Heroku logs error is Mongoose error uri parameter to openURI() must be a string and it is a string

I am trying to deploy my work on heroku and after solving some errors, one error is not getting fixed and i tried so many methods but all are failing added : useNewUrlParser: true,useCreateIndex:...

mongodb how to get the correct uri

I've inherited node.js, mongodb system. The original dev used a mlab db on his own account, I was asked to copy to a different db. When I tried to create a mlab user I was redirected to...

Error Message: MongoError: bad auth Authentication failed through URI string

I'm trying to connect to my mongoDB server via the connection string given to me by mongo: "mongodb+srv://david:[email protected]/test?retryWrites=true" In my code I am calling...

How to disable spring-data-mongodb in spring-boot

I am new to SpringBoot. I have built a simple application which should use fake data in the development environment, and connect to MongoDb in the test environment. Dev environment does not have...

Sync MongoDB with ElasticSearch

I want to sync my MongoDB data to ElasticSearch, I read a lot of posts talking about elasticsearch river plugin and mongo connector, but all of them are deprecated for mongo 4 and elasticsearch...

Mongo URI with self signed certificate

Im trying to get Mongo URI connections to work with a self signed cert. Command line works just fine, so the following connects: mongo mongodb://Qlik:[email protected]:27017 --ssl...

mongorestore failing on shard cluster v4.2.x | Error: "panic: close of closed channel"

Scenario: I had a standalone MongoDB Server v3.4.x where I had several DBs and collections respectively. As the plan was to upgrade to lastest 4.2.x, I have created a mongo dump of all...

mongodb dump fails with cannot unmarshal DNS message

I am using a mongo db server version MongoDB shell version v4.0.16 installed on a EC2 instance. I am able to get into the instance using mongo command mongo...

Apollo-server-express Session undefined problem

Hello I want to make session with ApolloServer and Express but when i get console log from req.session, it gives me undefined. Whats the problem?? When i get console log from req.session inside...

mongoose connection to Replica Sets always fails

I am having some trouble wrapping head around how to connect to a replica set - I need to .watch() collection events, which requires a replica set - see:...

MongooseError: The `uri` parameter to `openUri()` must be a string, got "undefined". Make sure the first parameter to `mongoose.connect()` is a string

When I try to deploy my app on heroku it gives me this error: MongooseError: The uri parameter to openUri() must be a string, got "undefined". Make sure the first parameter to mongoose.connect()...

How can I set TLS for Mongoose connection

I'm trying to migrate my mongo database from Compose to IBM Cloud Databases for Mongo and in their documnetations...

Connect-mongo package with Jest leads to error "Jest did not exit one second after the test run has completed"

I built a middleware for session-based authentication with express-session package and as a session store I use the connect-mongo package. When I run this Jest test: //.. const createServer =...

Connecting pymongo client to mongodb server with TLS

I have 2 instances on Google Cloud : Instance A and Instance B - Both have a static external IP address. Instance A running the community edition of the MongoDB server v4.4.6. I have generated...

Kafka connector "Unable to connect to the server" - dockerized kafka-connect worker that connects to confluent cloud

I'm following similar example as in this blog post: https://rmoff.net/2019/11/12/running-dockerised-kafka-connect-worker-on-gcp/ Except that I'm not running kafka connect worker on GCP but...

Error :couldn't connect to server 127.0.0.1:27017, connection attempt failed: NetworkTimeout Error connecting caused by Socket operation timed out

MongoDB shell version v4.4.6 connecting to: mongodb://127.0.0.1:27017/?compressors=disabled&gssapiServiceName=mongodb Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed:...

Unable to run mongo express with docker compose

This is my first post in node js and docker so bear with me. I am running a mongo and mongo express container with the docker-compose but mongo express is not running. When I run mongo and mongo...

How do I connect to MongoDB, running in Github codespaces, using MongoDB Compass?

I'm trying out Github codespaces, specifically the "Node.js & Mongo DB" default settings. The port is forwarded, and my objective is to connect with MongoDB Compass running on my local...

Connect Mongo Auto Reconnect

I am using connect-mongo I am using mongo connect as following for session storage. import session from 'express-session'; import connectMongo from 'connect-mongo'; session({ store:...