Questions tagged [mongodb]

MongoDB is a document oriented database (also known as NoSQL database).

Filter by
Sorted by
Tagged with
3 votes
0 answers
806 views

Connecting MongoDB Compass to WSL2 Mongo server [closed]

I am running a mongoDB server on Ubuntu via Windows Subsystem for Linux 2. (Windows build is 19041.) I have MongoDB Compass running on Windows, and it is happy to connect to my Mongo server in Windows,...
user avatar
0 votes
1 answer
1k views

MongoDB root user can't access config database

I'm trying to set up backups on a mongoDB instance (version 4.4) using mongodump. That requires access to the config database and my mongo user doesn't have that, despite being in the root role. (From ...
user avatar
1 vote
0 answers
88 views

How do I upgrade a Mongodb replica set running in a Docker swarm?

I'm running a Mongodb cluster with two routers, 3 config servers as a replica set and 4 single node shard servers. The routers and config servers are running in a Docker swarm but the shards run on ...
user avatar
  • 73
3 votes
1 answer
1k views

How do I resolve a private DNS address from within an AWS Fargate task

I'm trying to setup a connection to a MongoDB Atlas database from an AWS Fargate container. The VPC peering is setup and works and I can successfully connect to the MongoDB Atlas cluster from a ...
user avatar
0 votes
1 answer
161 views

Can this inbound & outbound bandwidth of my server cause issues?

I have a social app where users do the usual stuff of other social apps; upload multiple text and photo posts every hour, like & comment (a notification is created for each action), view custom/...
user avatar
0 votes
1 answer
982 views

start mongos(mongodb 4.4 sharding router) using systemd service

Mongodb 4.4 on centos 8 using official RPM repo. I can start & use mongos from command line just fine: mongos --config /etc/mongos.conf However, if I try to start mongos as systemd service, it ...
user avatar
  • 277
1 vote
1 answer
145 views

Ubuntu MongoDB server not responding?

I have amazon aws ubuntu 18.04 server 8GB RAM and 50GB Storage. I have installed MongoDB 4.2 and Node JS 12 LTS. In current server has 30 GB MongoDB storage. I have 4 micro service on same server. I ...
user avatar
0 votes
1 answer
182 views

Lambda connect to mongodb which only allow localhost connection in ec2

I have a MongoDB which only allow connection from localhost, running on my ec2. Currently, only my nodejs app which runs on the same ec2 instance connects to the mongodb using this command mongoose....
user avatar
  • 83
0 votes
1 answer
361 views

How should my Nginx 'default' file in sites-available be configured for a MERN app?

I'm deploying a MERN app and wondering how the 'default' configuration file in etc/nginx/sites-available should be setup for the server, client, and Mongo database to work? I am using a Ubuntu machine ...
user avatar
  • 101
0 votes
0 answers
1k views

Ubuntu has invalid checksum in blocks ~once a week

I use Ubuntu 18.04 on my server machine. Once a week Ubuntu has invalid checksum for blocks, so Ubuntu enters read only mode, after which processes fails and Ubuntu restart is needed. During booting ...
user avatar
1 vote
0 answers
164 views

“Attempted to use Snappy compression, but Snappy is not installed” on Ubuntu VPS

I have set up a new VPS via Digital Ocean and have installed MongoDB V4.2.8 on an Ubuntu server 18.04 release as per the official Mongo documentation. I'm using Compass version 1.21.2. I have managed ...
user avatar
0 votes
1 answer
104 views

init.d kills my mongod process due to respawning

I'm using Ansible to start the mongod service on a Centos 6.8 VM. The task is pretty straightforward: - name: Start mongod service service: state: started name: mongod However the service ...
user avatar
0 votes
0 answers
293 views

How to backup/restore a large MongoDB database?

How can I backup and restore a large mongodb database (500GB) from a server running an older version (v2.6) than the target one (v3.6)?. The downtime is critical. We've tried by making a straight copy ...
user avatar
1 vote
1 answer
925 views

Impossibile to replicate MongoDB

we are trying to move a MongoDB from an AWS VM to an on premise machine. The MongoDB data directory size is over 2.5TB. The idea is to put the on premise VM in replica with the AWS VM. The problem is ...
user avatar
  • 31
1 vote
1 answer
980 views

Cant connect to mongo db

Any idea why I am not able to connect to the mongo database? I just installed it on a new debian following this https://linuxize.com/post/how-to-install-mongodb-on-debian-9/. Mongo startup logs: https:...
user avatar
  • 111
0 votes
0 answers
238 views

How do I get init.d to respawn a crashed process if the lock file exists?

I'm running a mongod process on my Centos 6.8 box, and I want to provide some level of resilience in the event of process death. So I created an entry in my /etc/inittab - md:2345:respawn:/usr/bin/...
user avatar
1 vote
0 answers
944 views

Adding Mongo WiredTiger node to MMAPv1 replica set leads to "No keys found for HMAC"

I have a 3-node Replica Set (primary + 2 secondaries). They are all running Mongo 4.0.18 using the MMAPv1 engine. I am trying to switch the replica set over to use WiredTiger. I read through the ...
user avatar
1 vote
1 answer
2k views

mongodb cannot start "unknown storage engine"

Note: I checked Mongodb doesn't start on reboot and is not the same problem, I had a rocket chat server, rebooted the server and now mongod cannot start. These are the messages: 2020-06-01T21:...
user avatar
  • 642
0 votes
0 answers
451 views

Persistent storage failure or Authorization Failure after Mongocontainer restart using docker-compose rebuild after Machine restart

I have set up a mongo container connected to a nodejs app. First I do docker-compose up --build where I start mongo as a service without auth, i.e commented out. Then I login to the mongo terminal ...
user avatar
4 votes
0 answers
687 views

Moving Rocket.Chat data to different hard drive

I have Rocket.Chat running on Ubuntu 18.04.4 LTS through Snap. I would like to move the data (but not the entire snap) to another hard drive. So far this is what I have tried: Backup Rocket.Chat ...
user avatar
1 vote
0 answers
259 views

For authentication of MongoDB: How to limit the number of login attempts? How to set session timeout?

I am designing security policies for databases. Is there any way to limit the number of login attempts to protect DB from brute-force attacks? For example, user have to wait for 2 minutes after 3 ...
user avatar
  • 11
0 votes
0 answers
126 views

GCP mongodb external ip connection issue

I have a spring MVC application and I am connecting it to MongoDB cluster This is in the application.properties file mongodb.url=mongodb://userName:Password@xx.xx.x.xx:27017,xx.xx.x.xx:27017,xx.xx.x....
user avatar
2 votes
1 answer
4k views

Unable to connect to Mongo Community server on OS X Catalina

After migrating my old MacBook Pro to a new machine via the Migration Assistant, I am unable to connect to MongoDB. I re-installed it via Homebrew, and when I run: brew services start mongodb-...
user avatar
2 votes
0 answers
47 views

How do I create a web dev environment using a linux command line without a GUI/OS? [duplicate]

Sorry if this is a stupid question or it doesn't make sense. Basically what I'm trying to do is put my local web development project (using Nodejs/Express and MongoDB) onto a server that only ...
user avatar
  • 121
0 votes
1 answer
1k views

directoryperDB is not working under WiredTiger storage Engine

When i enable the directoryperdb option in the mongo.conf file, mongodb server service doesn't start. 2020-03-16T15:37:55.300+0530 I CONTROL [main] Automatically disabling TLS 1.0, to force-enable ...
user avatar
0 votes
1 answer
85 views

Upgrade mongodb replicaset 3.2 to 3.6 on live servers

I want to upgrade mongodb version(3.2 to 3.6) on prd environment W/O downtime. We have one primary node, one secondary node and one arbitrary. We are using ubuntu 16.04. So please guide me how can I ...
user avatar
1 vote
1 answer
6k views

MongoDB keeps failing on startup with exit code, status=100

Everytime I start MongoDB, it runs for about 1 second before crashing with the following error: Active: failed (Result: exit-code) since Thu 2020-03-12 09:47:17 EDT; 6s ago Docs: https://docs.mongodb....
user avatar
0 votes
1 answer
135 views

Can I run mongodb under a Managed Service Account

I'm trying to run MongoDB under a Windows Managed Service Account. This works fine for memcached on the same server, but when I run the MongoDB account I get this: Windows could not start the MongoDB ...
user avatar
  • 53
1 vote
1 answer
554 views

Iterating through an ansible hosts group to modify a templated file at playbook runtime

Let's say I have the following hosts groups in my Ansible inventory [qrouters] devops-qr1 devops-qr2 [shards] devops-shrd1 devops-shrd2 devops-shrd3 I have to add shards to a mongodb cluster with a ...
user avatar
0 votes
1 answer
310 views

How to make AWS resolves domain name to internal IP

I have a VPC peering established with MongoDB Atlas, however when I try to resolve the database cluster's domain from within an EC2 instance in the same VPC, I get back the public IP. This is a ...
user avatar
1 vote
0 answers
1k views

MongoDB - collections and documents lost/disappeared in replica set

I was running three mongo (4.0.4) containers within docker with configured replica set over 10 months without having any problems or issues. Primary mongo container/replica set was connected with ...
user avatar
0 votes
1 answer
32 views

mongodb - require authentication on database basis?

Is it possible to require authentication only on specific mongodb databases (leaving other databases with free access with no authentication requirements)?
user avatar
  • 385
0 votes
2 answers
461 views

How to move Free space from One partition to another 100% Full Partition in Linux CentOS

We have a Linux CentOS server. Our 1 partition "/dev/md3" is 100% used. That's why Mongo DB is not being connected. Can someone let me know how to solve this issue. I think mounting the partition is ...
user avatar
0 votes
1 answer
175 views

Transfer image files from MongoDB to S3

I have a NodeJS app that stores all of its data, even images, to MongoDB. Now I want to use an S3 to store my app's files (images, 43gb) and so, I need to transfer there all files that I have in my ...
user avatar
0 votes
1 answer
761 views

Mongo restore command reduces database size

I have two clusters of mongo database, each having three machines. Say Cluster1 and Cluster2. To reduce cost I have to terminate Cluster2. So I took mongodump of one database from the primary machine ...
user avatar
1 vote
0 answers
73 views

MongoDB connection initialisation delay on certain Windows 10 devices

Ref: https://stackoverflow.com/questions/58856620/mongodb-connection-initialisation-delay-on-certain-windows-10-devices System info OS Name: Microsoft Windows 10 Enterprise OS Version: 10.0.17134 N/...
user avatar
0 votes
0 answers
206 views

Error: Failed to synchronize cache for repo 'mongodb-org-4.2'

I'm try install mongoDb community version by this link: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-red-hat/ The step one it's ok: 1)Configure the package management system (yum). ...
user avatar
0 votes
1 answer
190 views

MongoDB: dilute collections when mongo is down

as you all must know very well- mongo service is stopped when disk space reaches full capacity. my question is- if and how can I dilute \ delete a collection while the mongo service is down?
user avatar
  • 385
1 vote
2 answers
551 views

Running AWS Lambda in same VPC as DocumentDB or DynamoDB

We are currently running our AWS Lambda's in a VPC due to an earlier architectural decision. We are also using MongoDB Atlas and a peering connection setup between the VPC and Atlas. This obviously ...
user avatar
  • 113
1 vote
1 answer
4k views

How to connect to remote mongoDB via ssh (via Sacred)? connection refused

I have two computers: Ubuntu1 and Ubuntu2. Ubuntu1 runs MongoDB with database Sacred3. I want to run connect from U2 to U1 via ssh and store there my experiment results. What I tried and failed: 1. ...
user avatar
  • 111
0 votes
0 answers
924 views

Error on MongoDB 4.0-4.2 upgrade: Invariant failure

I have a 3-member MongoDB replica set running in a Kubernetes cluster, installed from stable/mongodb-replicaset helm chart. I tried to upgrade the cluster as: # helm upgrade mongo-rs ~/mongodb-...
user avatar
  • 11
1 vote
1 answer
108 views

How to copy an 800GB mongoDB in a few hours?

I will visit a client's industry location for a few hours and have to copy the data from his mongoDB server. The data is currently above 800gb in size. I tried to replicate the data remotely but it is ...
user avatar
1 vote
0 answers
3k views

Installing repos with https breaks yum on CentOS

We have a very similar problem to https://stackoverflow.com/questions/48320850/installing-epel-repository-on-centos-7-breaks-yum-functionality/58177576#58177576. I've seen several pleas for help as I'...
user avatar
0 votes
1 answer
321 views

Permission issue starting mongo from a script

If I run the following command, everything works as expected: sudo mongod --fork --dbpath /path/to_data/ --port 27027 --syslog However, if I put the following command in startmongo.sh and run it ...
user avatar
0 votes
2 answers
48 views

Setting up MongoDB in Azure

If I want to run MongoDB in Azure, my options are: Using MongoDB Atlas. Setting up a Linux VPS and install MongoDB. Is this correct? My app is very small, few users and little data. Less than 3GB ...
user avatar
  • 129
0 votes
0 answers
548 views

Unable to run MongoDB as a Service in RHEL 8

systemctl start mongod Doesn't appear to do anything. systemctl status mongod shows no changes. journal -xeu mongod.service is empty. mongod -f /etc/mongodb.conf starts MongoDB successfully. systemd ...
user avatar
  • 161
0 votes
0 answers
2k views

Why did my mongodb shut down due to memory errors and how do I prevent it?

sudo service mongod status ● mongod.service - MongoDB Database Server Loaded: loaded (/lib/systemd/system/mongod.service; enabled; vendor preset: enabled) Active: failed (Result: signal) since ...
user avatar
  • 101
0 votes
1 answer
37 views

Master-Slave replication for Mongo4

I have two databases with the same data (~1TB): one for write with no shards and indexes I need for updating, and the second one for reading sharded and indexes only for reading. How to setup ...
user avatar
0 votes
2 answers
956 views

change name of the pods via helm

I am trying to run mongodb via helm. I want to run 1 primary replica and 2 secondary replicas. I would like to setup the following naming for the 3 mongodb pods once they are created: mongo-0 mongo-...
user avatar
0 votes
0 answers
589 views

RoboMongo Proxy server with two ssh keys | RoboMongo Proxyjump

We have two servers, one with internet access (srv1) and one without (srv2). MongoDB is running on the server which has no internet access (srv2). The only way to access srv2 is via SSH to srv1 and ...
user avatar

1
2
3 4 5
18