0

Trying to launch telegram bot (aiogram) and connected DB on PostgreSQL

psycopg2.OperationalError: connection to server at "127.0.0.1", port 5432 failed: Connection refused (0x0000274D/10061)
        Is the server running on that host and accepting TCP/IP connections?

I assume that this is due to the fact that the bot and b are trying to connect to the same local IP

Dired
  • 17
  • 4
    It says that there is no postgresql instance running in the 5432 port, you changed the port or the postgresql is not running – DecowVR Jul 11 '23 at 12:19

1 Answers1

0

Try restarting your Postgres service, it could be in a stopped state

If you are running on Ubuntu Try sudo service postgresql restart