Django: ошибка соединения к бд
Сайт работал отлично, и спустя несколько дней решил посмотреть его, а там такая ошибка:
OperationalError at /
connection to server at "localhost" (::1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
Request Method: GET
Request URL: http://domen.ru/
Django Version: 4.0.4
Exception Type: OperationalError
Exception Value:
connection to server at "localhost" (::1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
connection to server at "localhost" (127.0.0.1), port 5432 failed: Connection refused
Is the server running on that host and accepting TCP/IP connections?
Exception Location: /root/djangoenv/lib/python3.8/site-packages/psycopg2/__init__.py, line 122, in connect
Python Executable: /root/djangoenv/bin/python3
Python Version: 3.8.10
Python Path:
['/root/patterson',
'/root/djangoenv/bin',
'/usr/lib/python38.zip',
'/usr/lib/python3.8',
'/usr/lib/python3.8/lib-dynload',
'/root/djangoenv/lib/python3.8/site-packages',
'/root/djangoenv/lib/python3.8/site-packages/odf',
'/root/djangoenv/lib/python3.8/site-packages/odf',
'/root/djangoenv/lib/python3.8/site-packages/odf',
'/root/djangoenv/lib/python3.8/site-packages/odf',
'/root/djangoenv/lib/python3.8/site-packages/odf',
'/root/djangoenv/lib/python3.8/site-packages/odf',
'/root/djangoenv/lib/python3.8/site-packages/odf']
Server time: Fri, 22 Jul 2022 11:07:23 +0300