Uploaded image for project: 'Percona Monitoring and Management'
  1. Percona Monitoring and Management
  2. PMM-2157

Cannot connect to MongoDB using URI style

    XMLWordPrintable

    Details

      Description

      Hello,

       

      I tried to install PMM after suggestion to migrate from mongodb_exporter to PMM.

      To have mongodb_exporter I was doing:

      sudo MONGODB_URL=$MONGODB_URL docker run -p 9216:9216 -e MONGODB_URL  mongodb_exporter -mongodb.tls
      

      With this I was able to connect and grab my informations

      Now I am doing:

      sudo pmm-admin add mongodb:metrics --uri $MONGODB_URL --  --mongodb.tls
      

      But I am getting issue:

      Cannot connect to MongoDB using uri mongodb://mongodb_user:passowrd@mongox.mydomain.com:27017: no reachable servers
      

      If I am running the docker I am able to reach it.

      By using verbose everything is OK until:

       

      ...
      2018/02/26 18:01:03 response:
      < HTTP/1.1 200 OK
      < Content-Length: 376
      < Connection: keep-alive
      < Content-Type: application/json
      < Date: Mon, 26 Feb 2018 18:01:03 GMT
      < Server: nginx
      < X-Consul-Index: 41
      < X-Consul-Knownleader: true
      < X-Consul-Lastcontact: 0
      < X-Remote-Ip: 217.182.141.44
      < X-Server-Time: Monday, 26-Feb-2018 18:01:03 GMT
      <
      < {"Node":{"ID":"","Node":"mongox","Address":"<IP>","Datacenter":"dc1","TaggedAddresses":null,"Meta":null,"CreateIndex":41,"ModifyIndex":41},"Services":{"linux:metrics-42000":{"ID":"linux:metrics-42000","Service":"linux:metrics","Tags":["alias_mongox","scheme_https"],"Address":"","Port":42000,"EnableTagOverride":false,"CreateIndex":41,"ModifyIndex":41}}}
      Cannot connect to MongoDB using uri mongodb://mongodb_user:mongodb_password@mongox.mydomain.com:27017: no reachable servers
      

        Smart Checklist

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  speedflyer Geoffrey MUSELLI
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 2 hours, 30 minutes
                    2h 30m