1
votes

When I run 'python manage.py runserver', I get:

File "/Users/myusername/.virtualenvs/dashboard-server-PG7390RB/lib/python3.6/site-packages/django/db/backends/postgresql/base.py", line 176, in get_new_connection connection = Database.connect(**conn_params) File "/Users/myusername/.virtualenvs/dashboard-server-PG7390RB/lib/python3.6/site-packages/psycopg2/init.py", line 130, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) " to address: nodename nor servname provided, or not known name "rdsaddress.us-east-1.rds.amazonaws.com

This happened when I updated iterm2, but downgrading did not fix it.
I am able to successfully connect to the database using Postico. I am unable to connect to a similar rds using Django as well. I deleted my repository and repulled...

Not sure what to do next.

1
Does your DNS successfully resolve the DB hostname?jDo
Can you connect to the database using psql?LuRsT

1 Answers

0
votes

Hard to say without seeing your connection code, but it should look a little like this:

conn = psycopg2.connect("dbname=your_database user=postgres password=xxxx host=127.0.0.1 port=5432")

The error complains about nodename nor servername provided, hence my inclination to look at your connection string.