Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I got a error: ..... no reachable servers #118

Open
liamliu1986 opened this issue Sep 26, 2019 · 1 comment
Open

I got a error: ..... no reachable servers #118

liamliu1986 opened this issue Sep 26, 2019 · 1 comment

Comments

@liamliu1986
Copy link

My mongodb has a username = [email protected] password=xxx.xxx.xxx
I used the command:

mongodb_exporter -mongodb.uri mongodb://[email protected]:[email protected]:27017

but , I got the Error notice
E0926 16:30:13.003667 44532 connection.go:48] Cannot connect to server using url mongodb://[email protected]:[email protected]:27017: no reachable servers

I can use this uri access the mongodb through CIL

@cassioseffrin
Copy link

Hello @liamliu1986,

I have same issue with the latest version v1.0.0, the same error.

./mongodb_exporter-v1.0.0 --mongodb.uri=mongodb://mongodb_exporter:password@localhost:27017 --web.listen-address=:9126

Listening on :9126 (scheme=HTTP, secured=no, clientValidation=no)
E0710 16:21:24.572022 257980 connection.go:48] Cannot connect to server using url mongodb://mongodb_exporter:password@localhost:27017: no reachable servers

so, i have succed with version 0.7.1:

wget https://github.com/percona/mongodb_exporter/releases/download/v0.7.1/mongodb_exporter-0.7.1.linux-amd64.tar.gz

./mongodb_exporter-v0.7.1 --mongodb.uri=mongodb://mongodb_exporter:password@localhost:27017 --web.listen-address=:9126

mongodb_exporter_build_info{branch="v0.7.1",goversion="go1.11.10",revision="3002738d50f689c8204f70f6cceb8150b98fa869",version="0.7.1"} 1
mongodb_exporter_last_scrape_duration_seconds 0.157312024
mongodb_exporter_last_scrape_error 1
mongodb_exporter_scrape_errors_total 5
mongodb_exporter_scrapes_total 5
mongodb_up 0

I am still to try make the v1.0.1 to work with mongo v7.0.0. PS: (my mongodb server is running with docker in a replica set)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants