Home > Mobile >  connecting aws rds retun Is the server running on that host and accepting TCP/IP connections?
connecting aws rds retun Is the server running on that host and accepting TCP/IP connections?

Time:04-14

I'm trying to connect my app with aws rds postgresql database, that i hosted the app on heroku server but its throws me an error when i'm trying to run python manage.py makemigrations.

THE ERROR:

 Is the server running on that host and accepting TCP/IP connections?

i added rds.force_ssl in aws and i download it certificate and put inside my project directory, as heroku recommended that. I also added my username, password, and url endpoint in heroku setting under DATABASE_URL sections. this is my first time connecting live server for my django app. and I did not download and installed postgresql in my windows machine which i think is not the problem.

DATABASE CONFIGURATION:

DATABASES = {
'default': {
    'ENGINE': 'django.db.backends.postgresql',
    'NAME': '',
    'USER': '',
    'PASSWORD': '',
    'HOST': '',
    'PORT': '5432',
}

}

i don't know what's going on. is anyone who can help me please

CodePudding user response:

You can see How to Control Access to RDS with Security Groups

Your issue seems to be related to Security Groups, you need to edit the one you have set on the RDS Cluster to allow connections from your Heroku IP address to the Database Port

CodePudding user response:

ohh I solve my problem by adding two rules in my Security Group and set those to: FOR TYPE to POSTGRESQL and for the SOURCE to AnywhereIPv4

For those that does'nt set their database to be accessible you can follow this link here

  • Related