robo3t

Cannot connect Robomongo using MongoDB docker image

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 03:50:09
I am running mongo docker image that I pulled from docker hub mongo image It works ok but when I start Robomongo I cannot connect to localhost. With following error message: Cannot connect to the MongoDB at localhost:27017. Error: Network is unreachable I appreciate any help, thanks. EDIT: I solved the issue by using the following command: docker run -p 27017:27017 --name mongo_instance_001 -d mongo Don't forget to map port to host port: docker run --name some-mongo -p 27017:27017 -d mongo Then docker-machine ip gives me 192.168.99.100 Type in terminal mongo 192.168.99.100 prints MongoDB shell

Convert ObjectID to String in mongo Aggregation

梦想的初衷 提交于 2019-12-03 15:41:16
问题 I'm in this scenario right now: I have a collection X: { _id:ObjectId('56edbb4d5f084a51131dd4c6'), userRef:ObjectId('56edbb4d5f084a51131dd4c6'), serialNumber:'A123123', ... } I need to aggregate all documents, grouping them by the userRef + serialNumber, so I'm trying to use concat like this: $group: { _id: { '$concat': ['$userRef','-','$serialNumber'] }, ... So basically in my aggregation in MongoDB, I need to group documents by the concatenation of a ObjectId and a string. However, It seems

Robo 3T Error : Network is unreachable

巧了我就是萌 提交于 2019-12-03 14:48:43
问题 I am trying to connect Robo 3T to my online database and it doesn't seem to be working. I am able to connect to local database with it. I tried connecting using MongoDB Compass and the Details and Auth are working fine and I am able to connect. But when I connect with the same details in Robo 3T, it doesn't seem to be working. How do I fix this? I am using Robo 3T Version 1.1 I tried same with Robomongo 1.0, and still getting the same error 回答1: Just change your bind_ip in /etc/mongod.conf

connect robomongo to mongoDB docker container

不想你离开。 提交于 2019-12-03 07:22:45
问题 I'm running a NodeJS App with docker-compose. Everything works fine and I can see all my data by connecting to Mongo inside container. But when I connect to RoboMongo I don't see any data. How can I deal with this problem? 回答1: You should do a Robomongo SSH tunnel connection to MongoDB inside docker container. First of all you should install a ssh server inside your docker container. https://docs.docker.com/engine/examples/running_ssh_service/ After that you should configure your connection

Convert ObjectID to String in mongo Aggregation

感情迁移 提交于 2019-12-03 06:08:08
I'm in this scenario right now: I have a collection X: { _id:ObjectId('56edbb4d5f084a51131dd4c6'), userRef:ObjectId('56edbb4d5f084a51131dd4c6'), serialNumber:'A123123', ... } I need to aggregate all documents, grouping them by the userRef + serialNumber, so I'm trying to use concat like this: $group: { _id: { '$concat': ['$userRef','-','$serialNumber'] }, ... So basically in my aggregation in MongoDB, I need to group documents by the concatenation of a ObjectId and a string. However, It seems that $concat only accepts strings as parameters: uncaught exception: aggregate failed: { "errmsg" :

Robo 3T Error : Network is unreachable

♀尐吖头ヾ 提交于 2019-12-03 05:34:26
I am trying to connect Robo 3T to my online database and it doesn't seem to be working. I am able to connect to local database with it. I tried connecting using MongoDB Compass and the Details and Auth are working fine and I am able to connect. But when I connect with the same details in Robo 3T, it doesn't seem to be working. How do I fix this? I am using Robo 3T Version 1.1 I tried same with Robomongo 1.0, and still getting the same error Just change your bind_ip in /etc/mongod.conf from 127.0.0.1 to 0.0.0.0 then restart the service, and it works for me~ If you get the following error then

How to export json from Mongodb using robomongo

三世轮回 提交于 2019-12-03 02:32:49
问题 So I do not know much about MongoDB . I have RoboMongo using which I connect to a MongoDB. What I need to do is this - there is a collection in that MongoDB. I want to export the data from that collection so that I can save it into a file. I used the interface to open the data from the collection as text and did a CTRL + A and pasted into a text file. However I found that not all data is copied and also that there were many comments in the text data which naturally breaks the JSON. I am

How to export json from Mongodb using robomongo

不羁岁月 提交于 2019-12-02 14:24:53
So I do not know much about MongoDB . I have RoboMongo using which I connect to a MongoDB. What I need to do is this - there is a collection in that MongoDB. I want to export the data from that collection so that I can save it into a file. I used the interface to open the data from the collection as text and did a CTRL + A and pasted into a text file. However I found that not all data is copied and also that there were many comments in the text data which naturally breaks the JSON. I am wondering if RoboMongo has a Export As JSON facility so that I can do a clean export. Any pointers are

How can I connect to MongoDB server using JAVA from OpenShift?

你说的曾经没有我的故事 提交于 2019-12-02 01:21:20
I have created a MongoDB instance in OpenShift . I can connect to it via RockMongo , which is a service offered by OpenShift . I'm trying to connect to my instance using JAVA , but I just receive a Connection refuesed error. Moreover, I cannot connect it using RoboMongo . In my RockMongo status tab, I see the following information: Host: 127.11.201.2 Port: 27017 Using RoboMongo with MongoLab instance works just fine giving it the right credentials, but here with OpenShift it fails on connecting to the instance. In my JAVA app I'm trying the following: MongoCredential credential =

RoboMongo can't use array filters?

流过昼夜 提交于 2019-12-01 20:44:10
问题 Following on from "How to update collection and increment hours for ISO date". It seem that RoboMongo can't execute a query with an array filter: This same query if find when executed through the Mongo shell though: > db.collection.update({ ... "results.score": { ... "$exists": true ... } ... }, { ... "$mul": { ... "results.$[result].score": 10 ... } ... }, { ... "arrayFilters": [{ ... "result.score": { ... "$exists": true ... } ... }], ... "multi": true ... }) WriteResult({ "nMatched" : 1,