0

I have an EC2 instance and a Mongo DB.

Say my DB credentials were as follow:

DB_USERNAME: 'Max',
DB_PASSWORD: 'secretPass',

//DB_HOST: "20.133.122.121",


DB_HOST: "155.5.5.0",

DB_PORT: 27017,
DB_NAME: 'maxowner'

The Custom TCP inbound rule on my EC2 instance is set to my IP address ('My IP') with Port 27017.

I can successfully SSH to my instance using the Mac Terminal.

However, I am unable to access my Mongo DB due to the following error:

SSH Terminal attempt

I have then tried to connect to the Database using the Studio3T Client and here I am getting the following authentication error:

Studio3T Connection attempt

The Database is all set up properly and working, as I can see through a custom cPanel and also the app is running perfectly fine.

What could be the issue here? I have tried everything..

Sammuel
  • 27
  • 5
  • for terminal attempt it's a syntax error & for Studio3T in `SSL` tab did you try to change to `Use SSL Protocol` & authentication method to `Self Signed` ? – whoami - fakeFaceTrueSoul May 12 '20 at 16:37
  • For Terminal: yes, but I don't see any syntax error? For Studio: Not sure how SSL works, but I do have a PEM file for my instance. I have ticked the box for PEM - what do I need to input for the rest: https://paste.pics/8YC15 – Sammuel May 12 '20 at 16:52
  • When providing text, please copy/paste into the question instead of screenshots. It is much nicer to those of us on mobile. – Joe May 12 '20 at 21:12
  • The Studio3T attempt returned `connection refused`. This means that the OS on the remote server actively rejected the connection because there was no process listening on that port. – Joe May 12 '20 at 21:14
  • @Joe yes - but how is that possible? Otherwise how can I SSH from the same OS to my instance? Also the Port is open for that OS – Sammuel May 13 '20 at 06:43
  • If you have a client cert (PEM) file, you need put its file path on the text box after you select "Use Client Certificate", If PEM file also contains a password, you should fill in passphrase text box as well. – relativelyPrime May 14 '20 at 14:59
  • Also, are you sure you configured SSH as well before you attempt to connect? Normally it first shows connection to ssh server and SSL (if available) and lastly show connecting to server. Whereas, your screenshot show direct connection to server. – relativelyPrime May 14 '20 at 15:07
  • @relativelyPrime do you mean on Studio3T ? – Sammuel May 14 '20 at 15:24
  • yes on Studio 3T. – relativelyPrime May 14 '20 at 15:26
  • @relativelyPrime I did put all the details in the SSH section too, yes – Sammuel May 14 '20 at 15:46
  • that's weird it doesn't show details about ssh connection, because it does for me. https://paste.pics/2e283c7cb6f49283b8f0e2d159f76665 – relativelyPrime May 14 '20 at 17:00

0 Answers0