2017-02-01 10 views
0

Anypoint Studio 6.1とMule 3.8.1を使用していて、Mongo Atlas(mongodb v3.4)に接続するためにAnypoint Mongo Connector v4.1を設定しようとしています。MuleoからMuleo Atlasに接続する際の認証エラー

私はモンゴシェルを経由して接続することができますが、私はMongoのコネクタ構成に同じ内容を追加するとき、私は次のエラーを取得:

org.mule.api.ConnectionException: Authentication failed 
org.mule.api.ConnectionException: Authentication failed 
    at org.mule.modules.mongo.Config.testConnect(Config.java:190) 
    at org.mule.modules.mongo.generated.connectivity.ConfigMongoCloudConnectorAdapter.test(ConfigMongoCloudConnectorAdapter.java:27) 
    at org.mule.modules.mongo.generated.connectivity.MongoCloudConnectorConfigConnectionManagementConnectionManager.test(MongoCloudConnectorConfigConnectionManagementConnectionManager.java:442) 
    at org.mule.tooling.metadata.api.utils.ConnectionTester.internalTestConnection(ConnectionTester.java:88) 
    at org.mule.tooling.metadata.api.utils.ConnectionTester.testConnectionFor(ConnectionTester.java:113) 
    at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1$1$1.call(TestConnectorConnectionFromMuleConfigAction.java:68) 
    at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1$1$1.call(TestConnectorConnectionFromMuleConfigAction.java:1) 
    at org.mule.tooling.utils.SilentRunner.run(SilentRunner.java:25) 
    at org.mule.tooling.core.StudioDesignContextRunner.runSilentWithMuleProject(StudioDesignContextRunner.java:17) 
    at org.mule.tooling.core.StudioDesignContextRunner.runSilentWithMuleProject(StudioDesignContextRunner.java:37) 
    at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1$1.run(TestConnectorConnectionFromMuleConfigAction.java:65) 
    at java.lang.Thread.run(Unknown Source) 
Caused by: com.mongodb.MongoTimeoutException: Timed out after 5000 ms while waiting for a server that matches ReadPreferenceServerSelector{readPreference=primary}. Client view of cluster state is {type=UNKNOWN, servers=[{address=shard0.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='admin-user', source='mydatabase', password=<hidden>, mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server shard0.mongodb.net:27017. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" }}}, {address=shard1.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='admin-user', source='myDatabase', password=<hidden>, mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server shard1.mongodb.net:27017. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" }}}, {address=shard2.mongodb.net:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSecurityException: Exception authenticating MongoCredential{mechanism=null, userName='admin-user', source='myDatabase', password=<hidden>, mechanismProperties={}}}, caused by {com.mongodb.MongoCommandException: Command failed with error 18: 'Authentication failed.' on server shard2.mongodb.net:27017. The full response is { "ok" : 0.0, "errmsg" : "Authentication failed.", "code" : 18, "codeName" : "AuthenticationFailed" }}}] 
    at com.mongodb.connection.BaseCluster.createTimeoutException(BaseCluster.java:369) 
    at com.mongodb.connection.BaseCluster.selectServer(BaseCluster.java:101) 
    at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.<init>(ClusterBinding.java:75) 
    at com.mongodb.binding.ClusterBinding$ClusterBindingConnectionSource.<init>(ClusterBinding.java:71) 
    at com.mongodb.binding.ClusterBinding.getReadConnectionSource(ClusterBinding.java:63) 
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:89) 
    at com.mongodb.operation.CommandOperationHelper.executeWrappedCommandProtocol(CommandOperationHelper.java:84) 
    at com.mongodb.operation.CommandReadOperation.execute(CommandReadOperation.java:55) 
    at com.mongodb.Mongo.execute(Mongo.java:773) 
    at com.mongodb.Mongo$2.execute(Mongo.java:760) 
    at com.mongodb.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:130) 
    at com.mongodb.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:124) 
    at com.mongodb.MongoDatabaseImpl.runCommand(MongoDatabaseImpl.java:114) 
    at org.mule.modules.mongo.api.MongoClientImpl.executeCommand(MongoClientImpl.java:321) 
    at org.mule.modules.mongo.api.MongoClientImpl.isAlive(MongoClientImpl.java:335) 
    at org.mule.modules.mongo.Config.testConnect(Config.java:183) 
    ... 11 more 

    java.lang.Throwable: org.mule.api.ConnectionException: Authentication failed 
    at org.mule.modules.mongo.Config.testConnect(Config.java:190) 
    at org.mule.modules.mongo.generated.connectivity.ConfigMongoCloudConnectorAdapter.test(ConfigMongoCloudConnectorAdapter.java:27) 
    at org.mule.modules.mongo.generated.connectivity.MongoCloudConnectorConfigConnectionManagementConnectionManager.test(MongoCloudConnectorConfigConnectionManagementConnectionManager.java:442) 
    at org.mule.tooling.metadata.api.utils.ConnectionTester.internalTestConnection(ConnectionTester.java:88) 
    at org.mule.tooling.metadata.api.utils.ConnectionTester.testConnectionFor(ConnectionTester.java:113) 
    at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1$1$1.call(TestConnectorConnectionFromMuleConfigAction.java:68) 
    at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1$1$1.call(TestConnectorConnectionFromMuleConfigAction.java:1) 
    at org.mule.tooling.utils.SilentRunner.run(SilentRunner.java:25) 
    at org.mule.tooling.core.StudioDesignContextRunner.runSilentWithMuleProject(StudioDesignContextRunner.java:17) 
    at org.mule.tooling.core.StudioDesignContextRunner.runSilentWithMuleProject(StudioDesignContextRunner.java:37) 
    at org.mule.tooling.messageflow.action.TestConnectorConnectionFromMuleConfigAction$1$1$1.run(TestConnectorConnectionFromMuleConfigAction.java:65) 
    at java.lang.Thread.run(Unknown Source) 

モンゴミュールコネクタコンフィグ(上記のエラーで失敗)

<mongo:config name="Mongo_DB__Configuration" username="admin-user" password="pass1234" database="myDatabase" host="shard0.mongodb.net:27017, shard1.mongodb.net:27017, shard2.mongodb.net:27017" doc:name="Mongo DB: Configuration" ssl="true"/> 

モンゴシェル接続文字列(作品)

mongo "mongodb://shard0.mongodb.net:27017,shard1.mongodb.net:27017,shard2.mongodb.net:27017/myDatabase?replicaSet=shard0" --ssl --username admin-user --password pass1234 

おかげ

答えて

0

あなたは、接続文字列でadminするauthenticationDBを述べていることを確認してください。これはあなたのログ出力から見えないようです。

関連する問題