Open nisanth456 opened 5 years ago
Hi, check mongo access logs if you see logs like following
2020-01-21T18:46:25.660+0000 I ACCESS [conn1156] Unauthorized: not authorized on GT100 to execute command { count: "login", $db: "GT100", $readPreference: { mode: "primaryPreferred" }, lsid: { id: UUID("e6f38c72-1cbc-470d-93fb-292320cf8344") } }
2020-01-21T18:46:25.721+0000 I ACCESS [conn1156] Unauthorized: not authorized on GT100 to execute command { count: "login", $db: "GT100", $readPreference: { mode: "primaryPreferred" }, lsid: { id: UUID("e6f38c72-1cbc-470d-93fb-292320cf8344") } }
2020-01-21T18:46:25.784+0000 I ACCESS [conn1156] Unauthorized: not authorized on GT100 to execute command { find: "login", filter: {}, $db: "GT100", $readPreference: { mode: "primaryPreferred" }, lsid: { id: UUID("e6f38c72-1cbc-470d-93fb-292320cf8344") } }
you probably have authentication problem.
Create user on your mongo db
before creating foreign server like this:
db.createUser({ user: 'username', pwd: 'password', roles: ['readWrite'] });
while creating your foreign db use authentication_database
option which db you've user created on it.
@nisanth456 , Are you still facing an issue? If not, can you please close this ticket?
0 rows in foreign table when i using select