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

server returned error on SASL authentication step: Authentication failed. #112

Open
LzxUser opened this issue Mar 8, 2019 · 3 comments
Open

Comments

@LzxUser
Copy link

LzxUser commented Mar 8, 2019

I tried to use mongo to connect, it is correct, I do not know what happened

@Willsms
Copy link

Willsms commented Jul 25, 2019

User rights are not enough,create a dbOwner in mongo.
db.createUser({user: "exporterdb", pwd: "*********", roles: [{role: "dbOwner", db: "user_data"}]})

@jsedy7
Copy link

jsedy7 commented Sep 16, 2019

I have the same problem 🤔

User in mongo:

Successfully added user: {
	"user" : "exporterdb",
	"roles" : [
		{
			"role" : "dbOwner",
			"db" : "proxy"
		}
	]
}

Logs from exporter:

{"level":"error","msg":"Could not get MongoDB BuildInfo: auth error: sasl conversation error: unable to authenticate using mechanism \"SCRAM-SHA-1\": Authentication failed.!","source":"connection.go:192","time":"2019-09-16T17:48:11+02:00"}
{"level":"error","msg":"Problem gathering the mongo server version: auth error: sasl conversation error: unable to authenticate using mechanism \"SCRAM-SHA-1\": Authentication failed.","source":"mongodb_collector.go:213","time":"2019-09-16T17:48:11+02:00"}

What's wrong?

@st-h
Copy link

st-h commented Dec 23, 2019

I would advice to use the role clusterMonitor instead the much more permission dbOwner. In case you are still having trouble after creating a user with appropriate permissions, the issue often seems that the @ character in the connection stream causes issues in cause no escaping is used. Easiest fix seems to be to just quote the whole connection string with single quotes.

Ah, sorry. The exporter was returning some metrics, but I noticed later that it is still printing the error message on each request it serves. I was about to check if the percona fork would fix this issue, however it looks like they do not provide any binaries, and I have no experience with go. So, no good idea how to quickly fix this right now :/

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

4 participants