the following link is for connection to mongodb cloud
https://docs.inductiveautomation.com/display/DOC81/MongoDB#MongoDB-ConnectingtoMongoDB
Is it possible to connect to mongodb local installation?
I tried to install it, create user and password, but it shows "faulted" after setup.
I can use the same setup on mongodb compass to connect.
Is there any actual error in your gateway logs?
If you're using MongoDB locally, make sure that you've created the target database first. You'll likely need to insert some data in order for it to be created. I used mongosh
to perform this bootstrapping in the example below:
1 Like
I imported this example database from the following web link, and created multiple users.
(MongoDB Queries - Google Drive)
I have tried all users and different database, none of them work.
I will follow your video and have another try.
Thanks
Didn't find any error log.
I had a try again.
- I installed a mongodb instance on the machine
- I downloaded mongosh
- I created a db called "gfg", and inserted a few document.
- I created a user "root", password "password" under "gfg" db.
- I created a new mongo connector.
- but it is still showing faulted.
- I am testing it using maker edition. does it matter?
- I tried the same connection Hosts as in the video "mongo", it didn't work either.
- The port 27017 is open.
![image](https://global.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6c971567a419e59109d577752ebcce94e8bb15f.png)
- there's no alarm in the logs.
- I can run some python script to retrieve the values.
![image](https://global.discourse-cdn.com/inductiveautomation/original/3X/3/2/322c5135c76b80fdf570952cab6cbbedd7e651fb.png)
![image](https://global.discourse-cdn.com/inductiveautomation/original/3X/5/0/50f98efb99af74ccf9d5dca6ba6eab9819911c1c.png)
Not sure what is the next step from ignition part?
I think I found the problem.
The created user has to be under "admin" database.
- I created a user "root" under "gfg" database, I can use the set credential to login mongo compass, but not the mongoDB connector.
- I created a user "root1" under "admin" database, I can login both the mongo compass and the mongoDB connector in Ignition with this credential.