Discussion:
unable to connect to mongodb
Bhavik Shah
2018-09-26 17:33:04 UTC
Permalink
Hello
When I try to connect to MongoDB database I get the following error:


o.a.d.e.s.m.s.MongoSchemaFactory - Failure while loading databases in
Mongo. Timed out after 30000 ms while waiting for a server that matches
ReadPreferenceServerSelector{readPreference=primary}. Client view of
cluster state is {type=UNKNOWN, servers=[{address=localhost:27017,
type=UNKNOWN, state=CONNECTING,
exception={com.mongodb.MongoSecurityException: Exception authenticating
MongoCredential{mechanism=null, userName='drillbit', source='admin',
password=<hidden>, mechanismProperties={}}}, caused by
{com.mongodb.MongoCommandException: Command failed with error 18:
'Authentication failed.' on server localhost:27017. The full response is {
"ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" :
"AuthenticationFailed" }}}]


Following is my mongo connector configuration:


{
"type": "mongo",
"connection": "mongodb://drillbit:***@localhost:27017/",
"enabled": true
}
Abhishek Girish
2018-10-11 03:34:19 UTC
Permalink
Hey Bhavik,

The error indicates a authentication failure - can you double check your
login info? Also can you try specifying the IP address of the Mongo
instance instead of localhost - in case you have multiple Drillbits? I
haven't used Drill with Mongo - so hopefully someone who has can chime in
with their suggestions.

Regards,
Abhishek
Post by Bhavik Shah
Hello
o.a.d.e.s.m.s.MongoSchemaFactory - Failure while loading databases in
Mongo. Timed out after 30000 ms while waiting for a server that matches
ReadPreferenceServerSelector{readPreference=primary}. Client view of
cluster state is {type=UNKNOWN, servers=[{address=localhost:27017,
type=UNKNOWN, state=CONNECTING,
exception={com.mongodb.MongoSecurityException: Exception authenticating
MongoCredential{mechanism=null, userName='drillbit', source='admin',
password=<hidden>, mechanismProperties={}}}, caused by
'Authentication failed.' on server localhost:27017. The full response is {
"AuthenticationFailed" }}}]
{
"type": "mongo",
"enabled": true
}
Loading...