I cannot connect to postgresql database and kafka cluster.

1

I cannot connect to postgresql database and kafka cluster. I get an error even though I use the connection parameters that appear on the dashboard. postgresql database connection error

kafka nestjs connection error

2 Answers
0

Check the security group on your database and Kafka cluster allows access from the IP address of your client.

Warning your DNS entry is public but points to a private IP address in your VPC. If you are trying to connect from a public (Internet) connections, you will have to change the DNS entry to point to the Public IP of your resources but this would not be wise. From a security perspective, you do not want to open access to your database or Kafka cluster from the entire internet. Ideally your client would be in the same VPC as your servers or have private network connectivity through a VPN. If you must enable access over the internet limit the IPs with access to only trusted IPs of your clients in the security groups.

profile pictureAWS
EXPERT
iBehr
answered a year ago
  • hello, we have done these configurations. it gives us this error even though we have done them.

  • Looks like your DNS record is no longer public, so that is good. Can you provide some information about your environment? VPC/subnet that your DB and Kafka are in? Where is your client that you are configuring? What is the network between them? What are the SG rules that you have on each? \

  • hi, I solved the problem in postgres but I cannot give public access to kafka

  • Here is documentation on making an MSK cluster public: https://docs.aws.amazon.com/msk/latest/developerguide/public-access.html

0

I am getting a timeout error, do you allow the connection in the inbound rules of the PostgreSQL security group?

profile picture
EXPERT
answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions