Questions tagged [mongodb]

MongoDB is a scalable, high-performance, open source, document-oriented database. Official builds are available for Linux, Windows, OS X and Solaris. Database administration questions are generally better suited to dba.stackexchange.com

Filter by
Sorted by
Tagged with
0 votes
0 answers
9 views

Mongoose embeded document relation [migrated]

user schema product schema I want populate user.cart with product.stock data. How I can do it?
nullfound's user avatar
0 votes
0 answers
7 views

Issues upgrading from MongoDB version 3.6 to 4.0 on Debian 10 - Buster

Im running mongo 3.6.23 on Debian 10 and I'd like to upgrade it to 7.0. From what I've read online, mongo needs to be updated in release order to avoid errors. However, it seems like there is no ...
michael36345's user avatar
0 votes
0 answers
20 views

Does finetuning a host make sense when using docker?

I have a dedicated machine for a mongodb-instance. For ease of deployment, I am running that mongodb from within a docker-container. At the mongo-manuals they suggest some settings, one should adopt ...
Sven's user avatar
  • 1
1 vote
1 answer
20 views

mongoDb stays connected only as long as the user remains logged on the server

When I connect (ssh@..) to our server and run the mongoDb (mongod --dbPath..), all runs fine. But as soon as I close the powershell, mongoDb closes too. Why is that? Could it be related to a user, or ...
Tania's user avatar
  • 13
3 votes
0 answers
569 views

zsh: killed in Terminal

After trying to install mongoDB on macOS Ventura, I'm getting error zsh: killed. When I open Terminal, I see: zsh: killed mkdir -m 700 -p "$SHELL_SESSION_DIR" Whenever I try to run a ...
Диана Середа's user avatar
0 votes
1 answer
136 views

MongoDB replicaset on docker swarm

I try to create a MongoDB replicaset in docker swarm services. So far so good. The problem im facing is, when a container stops or is moved to a other docker host, the cluster breaks and i cant ...
Marc's user avatar
  • 265
0 votes
0 answers
84 views

MongoDB on CentOS server enable remote access

I have installed a MongoDB on a CentOS server and would like to set up remote access for this database. This server is a virtual machine hosted by a major cloud provider. I have proceeded according to ...
TobKel's user avatar
  • 103
0 votes
1 answer
725 views

How to deploy Express.js MongoDB using .ejs to vercel

I want to deploy a node express app with mongoDB using .ejs to vercel. The structure of my folder is: -models -public -temp-uploads -uploads -views .env app.js db.js firebase.js package.json router.js ...
Khalif's user avatar
  • 11
1 vote
0 answers
1k views

how can I upgrade mongodb directly from 4.4 to 6.0?

After recent OS upgrade my mongodb is upgraded to 6.0. Then I have following error: "msg":"Wrong mongod version","attr":{"error":"UPGRADE PROBLEM: Found an ...
Wang's user avatar
  • 773
0 votes
0 answers
343 views

Unable to connect to MongoDB after update to from version 4 to 6

After updating MongoDB from version 4 to 6 via Homebrew, I am now unable to connect to the server: ==> Successfully started `mongodb-community` (label: homebrew.mxcl.mongodb-community) btaylor@...
Brandon Taylor's user avatar
1 vote
0 answers
82 views

I forgot the VMs password, can I retrieve it from MongoDB Compass?

Hi, I have a VM that I forgot the password to. However, I store a database there (which unfortunately is not backed up) and it's no longer responding for some unknown reason. There is an agent that's ...
Ms01's user avatar
  • 101
0 votes
1 answer
79 views

Bash script doesn't work as expected for importing mongodb

host=localhost port=27017 db=cms for c in `mongo --quiet $host:$port/$db --eval 'db.getCollectionNames()' | sed 's/,/ /g'` do mongoexport --host $host --port $port -d $db -c $c > $c.json done ...
Sayaman's user avatar
  • 211
1 vote
0 answers
75 views

Is there a bandwidth/speed limitation with MongoDB?

Is there a bandwidth/speed limitation with MongoDB? Ideally the insert speeds should come near the file transfer speeds, but it’s 1/3 at best. Details below. Server: MongoDB v4.4 community edition, ...
Daniel Lyubin's user avatar
0 votes
1 answer
2k views

I just cannot install Mongodb in my Ubuntu 20.04

First I used the documentation of Ubuntu. https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/ Step1: After that I ran commands according to documentation. wget -qO - https://www....
user avatar
1 vote
1 answer
844 views

Error: (InvalidBSON) incorrect BSON length in element with field name 'clone_class_metrics.CE' in object with _id: ObjectId

I have windows 10 on my system with enough storage. I have a database that is 208 GB in a file with the .agz extension. When I import the database into my MongoDB, I face the following error: 2021-09-...
Balive13's user avatar
0 votes
0 answers
237 views

How to install mongodb on Debian 11 (bullseye)?

How should i install MongoDB on debian 11? There nothing about debian 11 on mongo docs https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/ what should i do?
hiwyn's user avatar
  • 11
1 vote
0 answers
658 views

High percentage of IO in iotop

I have a problem with a very slow process (mongod), so I downloaded iotop to see how is my drive going. I can see a very high percentage in the IO< column, constantly about 70-99%. Can someone ...
P. Paul's user avatar
  • 111
0 votes
1 answer
143 views

Set MongoDB 2.6 log without restarting

I am trying to set a new log destination without restarting. It is unclear to me what to set / how to set it. I am running localhost > db.version() 2.6.3 I want to change the system log to /var/...
user2763081's user avatar
0 votes
0 answers
2k views

What is the best way to store and use big JSON data?

I have downloaded a bibliographic corpus that consists of 10,000 zipped JSON files with the total size of ~200GB (zipped, ~800GB unzip) I have no experience in dealing with this amount of data, and I ...
Tom Leung's user avatar
  • 101
0 votes
0 answers
31 views

mongodb-prebuilt hidden directory in my Mac home dir

I am cleaning up my mac to free up spaces and I found this .mongodb-prebuilt in my /Users/username directory. I did not know what installed this folder. I had installed these mongo related apps ...
addicted's user avatar
  • 161
0 votes
1 answer
1k views

NordVPN blocking Mongodb Atlas connection

When I try to connect to Mongodb Atlas cluster, NordVPN blocks it (connecting via the Mongo shell). When I turn off Nord it is able to connect. More Information: Database is on the cloud so it might ...
flyingCode's user avatar
2 votes
0 answers
210 views

Expose MongoDB from docker container

I am trying to expose my mongodb that is running in a docker container to be accessible from the outside. I found out that it should be able with docker compose or the mongod.conf file to set the ...
Kai's user avatar
  • 161
0 votes
0 answers
83 views

how to connect to MongoDB deployed in Kubernetes from Studio3t?

I'm wondering on how do I connect to a Kubernetes deployed mongoldb instance, I have been using studio3t its fairly easy to use when DB hosted on AWS and all. I am finding it difficult to connect to ...
cross_handle's user avatar
1 vote
1 answer
28k views

Mongodb, mongoimport, uncaught exception: SyntaxError: unexpected token: identifier : @(shell):1:15

Getting the below error while importing a csv file in MongoDB database. command: mongoimport -d test -c FAQ --drop --type csv --file C:\Users\KUMA\Desktop\FAQ.csv --headerline --host localhost:27017 --...
Kumar Sundaram's user avatar
0 votes
1 answer
6k views

How to fix the mongoDB/node.js issue "MongoTimeoutError: Server selection timed out after 30000 ms"

Please help to fix the mongoDB/node.js events.js:174 throw er; // Unhandled 'error' event ^ MongoTimeoutError: Server selection timed out after 30000 ms at Timeout.setTimeout (E:\Digital\...
user2323199's user avatar
0 votes
2 answers
1k views

Upgrade mongodb replicaset docker container using ansible

Trying to update mongodb in my docker container from 3.6 to 4.2 using ansible, but docker container keeps restarting. The reason it restarting is because the compatibility level is set to 3.6. More ...
Xeizzeth's user avatar
  • 111
0 votes
0 answers
1k views

Update the Rocketchat administrator password from mongoDB

I would like to change the password of a Rocketchat user from the mongo command prompt. I followed to the letter the documentation provided by Rocketchat at this address:https://rocket.chat/docs/...
GotExx's user avatar
  • 1
0 votes
3 answers
2k views

Can't install mongodb on debian 10 using official instructions

Following the official documentation sudo apt-get install -y mongodb-org returns The following packages have unmet dependencies: mongodb-org : Depends: mongodb-org-shell but it is not going to be ...
normad's user avatar
  • 1
2 votes
1 answer
5k views

Putty SSH Tunnel Portforwarding not working with remote MongDB database

I'm having trouble connecting to a remote database server. I'm on a Windows 10 client and can successfully connect to my Ubuntu 16 server with putty over SSH, including with a keypair. Now I have a ...
r .r's user avatar
  • 141
0 votes
1 answer
262 views

two mongoDB version commands returning different versions

when i am running mongo -version it showing a different version than when i am running db.version() from Mongo shell. how this is possible and which is the correct version.
Sharma_Abhinav's user avatar
0 votes
1 answer
96 views

javascript in mongoshell

I want to make a join query in mongodb. Mongo doesn't have any join operator so i have to split the query in two parts. first: var a = db.articoli.find({_id: 4010}, {ordini:1}); var b = a[0].ordini; ...
Tiziano Pacifico's user avatar
0 votes
1 answer
2k views

Mongodb 2.6 Packages Removed from Mongo Repo?

I am attempting to build Mongodb 2.6.7 from the Mongo repos and am now unable to download them, as I was able to last week... root@591d529e0497:/# echo 'deb http://downloads-distro.mongodb.org/repo/...
Smuggla's user avatar
36 votes
4 answers
19k views

Error: mongodb: unknown version :mountain_lion

I am running these simple commands on mac: brew upgrade mongodb or brew install mongodb I am getting this error below: Error: mongodb: unknown version :mountain_lion If i run the simple ...
Tray Fleary's user avatar
0 votes
1 answer
97 views

Google Cloud Compute MongoDB Deployment security issue and keyFile issue

I've ran into this super annoying issue today. Basically, I have setup a MongoDB database using the GCP Marketplace offering. It sets up a primary node, secondary, and an arbiter. Which is super cool....
Dom Berk's user avatar
0 votes
1 answer
992 views

how to login to mongodb in bigbluebutton html5

How do I connect to the installed mongodb? How many users are defined for mongodb when bbb is installed? root@srv53607:~# mongo mongo MongoDB shell version v3.4.22 connecting to: mongodb://127.0.0....
bijan behvandi's user avatar
1 vote
0 answers
230 views

Cannot open MongoDB Compass 1.19.3

I recently updated MongoDB Compass to 1.19.3 from 1.16 on my system(Ubuntu 14.04 LTS)and now it does not open. Every time I launch the compass the window screen of the compass crashes and I cannot ...
Pratik Tayshete's user avatar
1 vote
0 answers
67 views

What does config shard mean here?

I created a MongoDB sharded cluster with replica set rsa, rsb and rsc. Configuration server replica set is configRS. Initially shard status listed only these shards as primary shard for the sharded ...
abc's user avatar
  • 11
1 vote
0 answers
588 views

Upgrading OpenSSL to v1.1.0 broke mongo (SSL peer certificate validation failed)

I was trying to connect to a MongoDB Atlas cluster using the srv syntax, but it wasn't working. So I did the following: Update my mongo client to the latest version (v4.0.11). Then every time I ran ...
mightimaus's user avatar
0 votes
1 answer
392 views

How to change MongoDB storage engine for replica set member from MMAPv1 to WiredTiger

I am running Mongodb-3.4x version in a Replica set environment (in all 3 different systems on AWS) i.e. One Primary, One secondary (replica) and an arbiter. Issue that I am seeing is for some reason; ...
sylvan-dee's user avatar
0 votes
1 answer
74 views

Issues attempting to use MongoDB connector for BI

I am trying to add MongoDB as a linked server to MSSQL server but it is not working. I need to set up MongoDB connector for BI and then add it in the system DSN of the ODBC driver. I am following the ...
Shm3nt1's user avatar
  • 11
1 vote
1 answer
906 views

MongoDB Compass loading forever on start page

When I start MongoDB Compass 1.18, it loads forever and never starts.  It displays the word "LOADING..." under a logo consisting of two blue squares:
Tapors's user avatar
  • 11
1 vote
1 answer
2k views

Debian 10 and MongoDB

Has anyone successfully installed Mongo on Debian 10? I am new to working on Debian. I'm getting these messages when I try to install. I tried MySQL too and got similar messages. Are these databases ...
rosech27's user avatar
1 vote
0 answers
345 views

Mongodb Replication primery high cpu usage during secondary stopped

We use mongo replicaSet version 4.0.6 on our environments. The replicaSet works with 3 nodes , one primary, one secondary and one arbiter. We do some test for failover,we stopped the secondary node, ...
周世涛's user avatar
0 votes
1 answer
40 views

Trying to use old desktop tower as server for mongodb, but cant resolve a public IP

I am trying to bind to my public IP. However when editing the contents in nano /etc/mongod.conf It does not work. Now I think this might be the issue. Running ifconfig only shows my private ip address:...
Kyle's user avatar
  • 115
0 votes
0 answers
3k views

mongoDb connectivity issue with cluster

I am new to using Mongo DB data base and need help in establishing JDBC connection, I have followed instructions available online but some error is occurring. import com.mongodb.MongoClient; import ...
Sudhanva Paturkar's user avatar
0 votes
1 answer
985 views

Can't start mongos process: Address already in use

I'm working with Debian 4.9.168 and I want to configure mongoDB replica set monitoring through google cloud, and I found the best solution is through bindplane bluemedora (currect me if I wrong). So,...
Idan Chau's user avatar
0 votes
1 answer
485 views

Mongo 2.6.12 VS Mongo 4.0 benchmark

I have problem, I use the old 2.6.12 version of mongodb on a new computer and it does not show high speed results and I do not know why. Mongo 2.6.12 doesn’t even try to use my computer at 100% using ...
darklord's user avatar
0 votes
0 answers
238 views

MongoDB db.serverStatus() has no storageEngine output

I have an instance of MongoDB 4.0.6 with WiredTiger and the documentation says that db.serverStatus() has a storageEngine section in the output with some info on the Wired Tiger flags. On my instance ...
david's user avatar
  • 1
4 votes
2 answers
2k views

MongoDB: Can't drop local database with root user

I am trying to drop the local database in my replica set so that I can rename the replica set, but I keep getting the below error errmsg" : "not authorized on local to execute command { dropDatabase: ...
siddhu's user avatar
  • 195
3 votes
0 answers
1k views

repair mongodb 4 after crash due to a full storage

I have an issue on mongod. One day ago , my hard disk storage was full so mongodb shut down. I add Go on my hard disk and now when i want to restart my mongo , it doesn't work . I m on unbutu 16 ...
thomas poidevin's user avatar