1

I'm trying to establish an AWS Glue connection with MongoDB on self-hosted EC2.

  • The connection is in the same subnet(private) as MongoDB.
  • The connection has same security group as the MongoDB instance, with all the ports open within the same SG.
  • No NaCl level blocking either.

Whenever I test the connection, it throws this error enter image description here

with cloudwatch logs saying this (No matter what I do it's always this error). PS: I've tested the creds on Mongo Compass, and they work fine: enter image description here

But MongoDB logs on the instance tells a different story:

2022-08-26T07:18:50.819+0000 I  NETWORK  [listener] connection accepted from X.X.X.X:47220 #1684844 (7 connections now open)
2022-08-26T07:18:50.822+0000 I  NETWORK  [conn1684844] end connection X.X.X.X:47220 (6 connections now open)
2022-08-26T07:18:51.323+0000 I  NETWORK  [listener] connection accepted from X.X.X.X:47222 #1684845 (7 connections now open)
2022-08-26T07:18:51.327+0000 I  NETWORK  [conn1684845] end connection X.X.X.X:47222 (6 connections now open)
2022-08-26T07:18:51.562+0000 I  NETWORK  [listener] connection accepted from X.X.X.X:47224 #1684846 (7 connections now open)
2022-08-26T07:18:51.562+0000 I  NETWORK  [conn1684846] SSL mode is set to 'preferred' and connection 1684846 to X.X.X.X:47224 is not using SSL.
2022-08-26T07:18:51.562+0000 I  NETWORK  [conn1684846] received client metadata from X.X.X.X:47224 conn1684846: { driver: { name: "mongo-java-driver|legacy", version: "3.10.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "4.14.238-125.422.amzn1.x86_64" }, platform: "Java/Oracle Corporation/1.8.0_111-8u111-b14-2~bpo8+1-b14" }
2022-08-26T07:18:51.584+0000 I  NETWORK  [listener] connection accepted from X.X.X.X:47226 #1684847 (8 connections now open)
2022-08-26T07:18:51.585+0000 I  NETWORK  [conn1684847] SSL mode is set to 'preferred' and connection 1684847 to X.X.X.X:47226 is not using SSL.
2022-08-26T07:18:51.585+0000 I  NETWORK  [conn1684847] received client metadata from X.X.X.X:47226 conn1684847: { driver: { name: "mongo-java-driver|legacy", version: "3.10.1" }, os: { type: "Linux", name: "Linux", architecture: "amd64", version: "4.14.238-125.422.amzn1.x86_64" }, platform: "Java/Oracle Corporation/1.8.0_111-8u111-b14-2~bpo8+1-b14" }
2022-08-26T07:18:51.615+0000 I  ACCESS   [conn1684847] Successfully authenticated as principal <masked-user> on <masked-db> from client X.X.X.X:47226
2022-08-26T07:18:51.687+0000 I  NETWORK  [conn1684847] end connection X.X.X.X:47226 (7 connections now open)

The mongodb logs clearly says: Successfully authenticated as principal <masked-user> on <masked-db> from client X.X.X.X:47226 still glue keeps failing the connection.

The logs prove that:

  • Glue is able to establish connection, meaning SG rules are fine
  • The user is authenticated, meaning creds are apt.

Not sure what I'm missing here. The crawlers are not working since Glue connection keeps failing. Any help would be really appreciated.

Omisha gupta
  • 121
  • 1
  • 6

0 Answers0