Using Compass can't connect to AWS instance of MongoDB Community 3.6

501 views
Skip to first unread message

NOTiFY

unread,
Feb 19, 2018, 6:09:08 AM2/19/18
to mongodb-user
I have MongoDB running on my AWS EC2 instance. I can run all my unit tests on my local (host) MacBook and get the JSON back connecting using my AWS public IP address.

>>>>> test04IsProductInformation .....
>>>>> test04IsProductInformation response = 200
>>>>> test04IsProductInformation response getStatus = 200
>>>>> test04IsProductInformation response json = {
  "products": [
    {
      "gtin": "05000157024671",
      "tpnb": "050020522",
      "tpnc": "252261477",
      "description": "Heinz Baked Beans In Tomato Sauce 415G",
      "brand": "HEINZ",
      "qtyContents": {
        "quantity": 415.0,
        "totalQuantity": 415.0,
        "quantityUom": "g",
        "netContents": "415g ℮",
        "avgMeasure": "Average Measure (e)"
      },
      "productCharacteristics": {
        "isFood": true,
        "isDrink": false,
        "healthScore": 84,
        "isHazardous": false,
        "storageType": "Ambient",
        "isNonLiquidAnalgesic": false,
        "containsLoperamide": false
      },
      "pkgDimensions": [
        {
          "no": 1,
          "height": 10.8,
          "width": 7.4,
          "depth": 7.4,
          "dimensionUom": "cm",
          "weight": 469.0,
          "weightUom": "g",
          "volume": 591.408,
          "volumeUom": "cc"
        }
      ]
    }
  ]
}
>>>>> test04IsProductInformation tescoProducts getProducts = [com.notifywell.gson.tesco.Product@b3d7190]
>>>>> test04IsProductInformation tescoProducts = 05000157024671
>>>>> test04IsProductInformation tescoProducts = null

Process finished with exit code 0


However when I try and connect to MongoDB:

> db.version()

3.6.2



using MongoDB Compass Community Beta version 1.12.0-beta.4 (1.12.0-beta.4) I get:

MongoDB not running on the provided host and port

Any issues?

Wan Bachtiar

unread,
Feb 26, 2018, 2:22:44 AM2/26/18
to mongodb-user

However when I try and connect to MongoDB:

Hi,

How are you trying to connect ?
Are you trying to use the same URL as url = http://35.xxx.xx.xxx:8080/NOTiFYwell/notifywell/product-by-ean/5000157024671 ?

MongoDB Compass enables you to connect to a MongoDB instance (but not a REST API server).
See also Compass: Connect to MongoDB for more information.

Regards,
Wan.

Reply all
Reply to author
Forward
0 new messages