Advertisement
xm4dn355x

Docker PostgreSQL error

Dec 1st, 2020
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.92 KB | None | 0 0
  1. Traceback (most recent call last):
  2.   File "main.py", line 67, in <module>
  3.     update_channel_loop()
  4.   File "main.py", line 46, in update_channel_loop
  5.     data_list = parse_all()
  6.   File "/usr/src/app/news_parser.py", line 57, in parse_all
  7.     db_data = read_db()
  8.   File "/usr/src/app/db_engine.py", line 19, in read_db
  9.     conn = psycopg2.connect(dbname=DB_NAME, user=DB_USERNAME, password=DB_PASS, host=DB_HOST)
  10.   File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
  11.     conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
  12. psycopg2.OperationalError: could not connect to server: Connection refused
  13.         Is the server running on host "localhost" (::1) and accepting
  14.         TCP/IP connections on port 5432?
  15. could not connect to server: Connection refused
  16.         Is the server running on host "localhost" (127.0.0.1) and accepting
  17.         TCP/IP connections on port 5432?
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement