Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

 

Labels (2)
3 Replies
Anonymous
Not applicable
Author

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.

Anonymous
Not applicable
Author

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
thomasmoren
Contributor
Contributor

To solve this in Talend ESB set password like this: "YourPass".toCharArray()