Skip to content
Advertisement

Tag: mongodb

Can’t connect to a MongoDB server

I’m trying to deploy this Fullstack app to a DigitalOcean droplet: https://github.com/maismin/stock-portfolio-app-demo I installed MongoDB like how to documentation said and then I started it and didn’t do anything else (I don’t know if I need to actually make a database or not this is the first time I’m using MongoDB). Then I cloned the repo, then I installed NPM

Shell Script : MongoDB Dump

I’m creating a shell script to automatically dump the database. I have the current code below. The problem is when I’m opening the zip file it shows a single binary file. Usually, when I dump manually it consists of bson and json files. I don’t know what I’m doing wrong I’m expecting a zip file with bson and json file.

Problems establishing connection with DB

Platform: LINUX. I am a beginner of MongoDB and pymongo. After installing pymongo, here is a simple test I tried on ipython: At this point, it chokes. And in the end, spits out a “Error 111: connection refused” error. So, I tried invoking MongoDB straight from the terminal and I still got the error below [look at the far end].

mongodb wrong members id

I’m trying to change the priority of the members of the replica set: cfg = rs.conf(); output: } cfg.members[5].priority = 0.5 cfg.members[4].priority = 0.5 but id:3 change normaly: cfg.members[3].priority = 0.5 what am I doing wrong? And why my version of the config too big? So many times that I couldn’t change the configuration) Answer You should address to elements

Docker-compose – mongodb could not be authenticated

After installing Docker Toolbox on Windows 10 and starting docker-machine, I run docker-compose up, I run into this error: The following packages cannot be authenticated mongodb-org-shell The code in the dockerfile: RUN apt-key adv –keyserver hkp://keyserver.ubuntu.com:80 –recv EA312927 RUN echo “deb http://repo.mongodb.org/apt/ubuntu trusty/mongodb-org/3.2 multiverse” | tee /etc/apt/sources.list.d/mongodb-org-3.2.list RUN apt-get update RUN apt-get install -y mongodb-org-shell RUN apt-get install -y mongodb-org-tools

Advertisement