cannot connect cluster in amazon documentdb

298 views Asked by At

I am struggling with this issue for a few days, I am trying to connect my db from Robo 3t and Studio 3t, but i got same error with both programs: Note: I can access by ssh from my terminal, it means that the certificate is fine, the EC2 endpoint is fine, port etc... then the problem should be in another place, right?

SSH Tunnel error: I/O error: Not ASN.1 data

Stacktrace: |/ SSH Tunnel error: I/O error: Not ASN.1 data |___/ I/O error: Not ASN.1 data

But I as i said before, I can connect by ssh without any issue: ssh -i "cert.pem" [email protected]

I checked all the steps described in the AWS article below, an I also disabled TLS in the cluster param, as suggested in point 5, but I still having the issue.

https://aws.amazon.com/es/premiumsupport/knowledge-center/documentdb-cannot-connect/

I just edit the post to add a few screenshot from my Robo 3t config:

enter image description here enter image description here enter image description here enter image description here Regards.

1

There are 1 answers

0
Anshu On

I verified the same steps. I am able to connect successfully .

Looks like you are on macOS and you didn't select Self-signed Certificate as recommended in documentation - https://docs.aws.amazon.com/documentdb/latest/developerguide/robo3t.html

These are two additional settings which you require to do on macOS.

i) If you are on Linux/macOS client machine, you might have to change the permissions of your private key using the following command:

chmod 400 /fullPathToYourPemFile/.pem

ii) if you are on macOS Catalina or above, choose Self-signed Certificate as the Authentication Method because the macOS does not accept certificates with validity greater than 825 days.