Skip to main content
Announcements
Save $600 on Qlik Connect registration! Sign up by Dec. 6 to get an extra $100 off with code CYBERSAVE: REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Eloy
Contributor II
Contributor II

Use MongoDB connector to connect to an Atlas hosted database

Hi everyone,

I was able to connect my database using the MongoDB connector when I was hosted in Mlab but we have been obligated to migrate to Atlas.

Since then, I'm not able to connect to my database using the native MongoDB connector of Qlik Sense online and I don't know where I am wrong. There are 5 fields:

-Server: xxxx-xxxx.azure.mongodb.net

-Port: 27017

-Database, username and password have not changed.

Somebody had the same problem or knows how to solve it?

Thanks in advance

Labels (1)
2 Solutions

Accepted Solutions
Eloy
Contributor II
Contributor II
Author

Hello @Sebs030 

This I what I did :

I don't have the MongoDB BI Connector. I use the native connection to MongoDB from Qlik :

I have a replica set with members

dbname-shard-00-0x-serverid.host.mongodb.net:port  (example prod-shard-00-00-kljqd.aw3s.mongodb.net:27017)

-> Zone database properties

Server: serverid.host.mongodb.net (kljqd.aw3s.mongodb.net)

Port: port (27017)

Database: dbname (prod)

-> Authentication

Your user and password

-> SSL options

In my case I click on Enable SSL and Allow Self-signed Server Certificate and that's all

-> Replica Set

Replica Set Name: empty, i think it's optional

Secondary Servers: separated by comma, dbname-shard-00-00-serverid.host.mongodb.net:port,dbname-shard-00-01-serverid.host.mongodb.net:port... (prod-shard-00-00-kljqd.aw3s.mongodb.net:27017,prod-shard-00-01-kljqd.aw3s.mongodb.net:27017)

Tell me if you get it to work or not !

Regards 

View solution in original post

Sebs030
Contributor II
Contributor II

@Eloy great thanks a lot, the "Allow Self-signed Server Certificate" and providing the secondary servers did the job! To find out the exact name of the secondary servers i connected using the mongoshell, because the shards started with 01 instead of 00, but now it works👍

View solution in original post

11 Replies
Sebs030
Contributor II
Contributor II

I have the same issue when i want to connect from qlik cloud to a mongoDB Atlas cluster. The process described here https://docs.atlas.mongodb.com/tutorial/connect-bic-qlik/ only worked from Qlik Sense Desktop but not Qlik Cloud. I am getting an error: ERROR [HY000] [unixODBC][Qlik][MongoDBODBC] (110) Error from MongoDB Client: No suitable servers found (`serverSelectionTryOnce` set): [Invalid reply from server. calling ismaster on 'xxxx-biconnector.zzzzz.mongodb.net:27015'] (Error Code: 13053).

As said with Qlik Sense Desktop it worked

Eloy
Contributor II
Contributor II
Author

Hi, in the latest version of Qlik online i was able to connect to the cluster, have you tried their new connector ? They dont have the srv yet, but it works

Sebs030
Contributor II
Contributor II

@Eloy  could you please kindly share how you connected from an MongoDB Atlas cluster to Qlik Sense Cloud using the native MongoDB Connector, i don´t get it working.

Do you use a MongoDB BI Connector ( wich connects on Port 27015 at XXX-biconnector.XXX.mongodb.net or a "normal" connection with port 27017? I always get the following error: 

ERROR [HY000] [Qlik][MongoDBODBC] (110) Error from MongoDB Client: No suitable servers found (`serverSelectionTryOnce` set): [Invalid reply from server. calling ismaster on 'XXX-biconnector.XXX.mongodb.net:27015'] (Error Code: 13053)

Thansks a lot

Eloy
Contributor II
Contributor II
Author

Hello @Sebs030 

This I what I did :

I don't have the MongoDB BI Connector. I use the native connection to MongoDB from Qlik :

I have a replica set with members

dbname-shard-00-0x-serverid.host.mongodb.net:port  (example prod-shard-00-00-kljqd.aw3s.mongodb.net:27017)

-> Zone database properties

Server: serverid.host.mongodb.net (kljqd.aw3s.mongodb.net)

Port: port (27017)

Database: dbname (prod)

-> Authentication

Your user and password

-> SSL options

In my case I click on Enable SSL and Allow Self-signed Server Certificate and that's all

-> Replica Set

Replica Set Name: empty, i think it's optional

Secondary Servers: separated by comma, dbname-shard-00-00-serverid.host.mongodb.net:port,dbname-shard-00-01-serverid.host.mongodb.net:port... (prod-shard-00-00-kljqd.aw3s.mongodb.net:27017,prod-shard-00-01-kljqd.aw3s.mongodb.net:27017)

Tell me if you get it to work or not !

Regards 

Sebs030
Contributor II
Contributor II

@Eloy great thanks a lot, the "Allow Self-signed Server Certificate" and providing the secondary servers did the job! To find out the exact name of the secondary servers i connected using the mongoshell, because the shards started with 01 instead of 00, but now it works👍

Eloy
Contributor II
Contributor II
Author

@Sebs030 can you write here the commands you used in the mongoshell for the people with the same problem in the future? Happy to know it worked

Sebs030
Contributor II
Contributor II

yes, its just the normal mongo command to connect to a DB:  "mongo mongodb+srv://serverid.host.mongodb.net/DB_NAME" --username USER_NAME"

The user is then prompted to provide his password and then mongo reveals to which shards the user is connected

galaplexus
Contributor
Contributor

Enabling SSL and Allowing self-signed Server Certificate makes Qlik crash with the message "Error connecting to the Sense service".

I am running the hosted Qlik Sense Business (not Entreprise) and a shared MongoDB M0 cluster version 4.4. I have tried with serverless cluster version 5.0.2 and I get the same results.

The connection works well with a self hosted mongodb on a VM on Azure.

Can you confirm that we don't need to specify a keyfile or a trusted certificate? Or any other ideas?

Thanks!

John_SM
Contributor III
Contributor III

Hello, where can I find in Qlik Sense the options for SSL and Replica Set (or is it available only in QlikView)?