cluster-ClusterId{value='3241234134234', description='null'}-<host>:<port> org.mongodb.driver.cluster Exception in monitor thread while connecting to server <host>:<port>
com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='<username>', source='<db>', password=<hidden>, mechanismProperties={}}
at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:61)
at com.mongodb.connection.DefaultAuthenticator.authenticate(DefaultAuthenticator.java:32)
at com.mongodb.connection.InternalStreamConnectionInitializer.authenticateAll(InternalStreamConnectionInitializer.java:99)
at com.mongodb.connection.InternalStreamConnectionInitializer.initialize(InternalStreamConnectionInitializer.java:44)
at com.mongodb.connection.InternalStreamConnection.open(InternalStreamConnection.java:115)
at com.mongodb.connection.DefaultServerMonitor$ServerMonitorRunnable.run(DefaultServerMonitor.java:128)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server <host>:<port>. The full response is { "ok" : 0.0, "code" : 18, "errmsg" : "Authentication failed." }
at com.mongodb.connection.CommandHelper.createCommandFailureException(CommandHelper.java:170)
at com.mongodb.connection.CommandHelper.receiveCommandResult(CommandHelper.java:123)
at com.mongodb.connection.CommandHelper.executeCommand(CommandHelper.java:32)
at com.mongodb.connection.SaslAuthenticator.sendSaslStart(SaslAuthenticator.java:95)
at com.mongodb.connection.SaslAuthenticator.authenticate(SaslAuthenticator.java:45)
... 6 more
connector.name=mongodb
mongodb.seeds=<host>:<port>
mongodb.credentials=<username>:<password>@<db>
I am able to connect to mongo from a java program using the above credential.
We use mongo java driver 3.2.0.
Thanks,
Baskar.S
presto:<schemaName>>
When i try sql like queries here, it is throwing error.
May I know the query syntax to be used here?
Thanks,
Baskar.S
./presto --server localhost:8080 --catalog mongodb --schema <DB_Name>
Client Error,
presto:esdbd1> select * from mongodb.<schemaName>.<collectionName>;
Query 20160124_215502_00007_2y3wq failed: line 1:8: SELECT * not allowed in queries without FROM clause
select * from mongodb.esdbd1.businessGroupReference
2016-01-24T14:01:49.296-0800 ERROR Query-20160124_220149_00008_2y3wq-204 com.facebook.presto.execution.QueryStateMachine Query 20160124_220149_00008_2y3wq failed
com.facebook.presto.sql.analyzer.SemanticException: line 1:8: SELECT * not allowed in queries without FROM clause
at com.facebook.presto.sql.analyzer.StatementAnalyzer.analyzeSelect(StatementAnalyzer.java:1548)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:939)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuerySpecification(StatementAnalyzer.java:209)
at com.facebook.presto.sql.tree.QuerySpecification.accept(QuerySpecification.java:125)
at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:735)
at com.facebook.presto.sql.analyzer.StatementAnalyzer.visitQuery(StatementAnalyzer.java:209)
at com.facebook.presto.sql.tree.Query.accept(Query.java:103)
at com.facebook.presto.sql.tree.AstVisitor.process(AstVisitor.java:22)
at com.facebook.presto.sql.analyzer.Analyzer.analyze(Analyzer.java:60)
at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:254)
at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:240)
at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:204)
at com.facebook.presto.execution.QueuedExecution.lambda$start$335(QueuedExecution.java:68)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Do let me know if you need further details in this regards.
Thanks