Four Stars

Problems connecting MongoDB with authentication

I have a component 'tMongoDBConnection" with the following parameters:

 

Server "127.0.0.1"
Database "test"
Port 30158

The problem is that I need authentication. Talend raises this error: The method authenticate(String, char[]) in the type DB is not applicable for the arguments (String, String).

 

The parameters are:

Username: "test"
Password: "test"

 

What I could do? Thanks.

 

  • Data Integration
2 REPLIES
Four Stars

Connecting MongoDB with authentication "Connection Refused"

Hello,

 

I'm trying to connect to MongoDB with the component tMongoDBConnection. The problem is that I need authentication because I have username and password on DB, but it says the following:

Detail Message: The method authenticate(String, char[]) in the type DB is not applicable for the arguments (String, String)

The parameters are the following:

Server: "192.168.56.101"
Database: "test"
Port: 30158

Username: "test"
Password: "test"

If I try to connect without authentication the following error is raised:

Caused by: java.io.IOException: couldn't connect to [/192.168.56.101:30158] bc:java.net.ConnectException: Connection refused: connect

I don't know how to connect to the mongoDB, can anyone help me?

 

Thanks.

Community Manager

Re: Connecting MongoDB with authentication "Connection Refused"

Hello
By default, the port is 27017, just check if you have changed it to 30158. In addition, try to execute the telnet command from CMD to see if you able to to ping to the server with the port.
...>telnet 192.168.56.101 30158
About the error "The method authenticate(String, char[]) in the type DB is not applicable for the arguments (String, String)", it seems you did't input the password value, click the ... button near the Password field to input the password value.

Regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business