Not connect
kennzu
PROOP

2 years ago

ERROR:asyncio:Task exception was never retrieved

Sep 12 15:56:50

future: <Task finished name='Task-5' coro=<Dispatcher._process_polling_updates() done, defined at /usr/local/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py:407> exception=OperationalError('connection to server at "containers-us-west-164.railway.app" (35.247.93.99), port 7371 failed: Connection timed out\n\tIs the server running on that host and accepting TCP/IP connections?\n')>

Sep 12 15:56:50

Traceback (most recent call last):

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 415, in processpolling_updates

Sep 12 15:56:50

for responses in itertools.chain.from_iterable(await self.process_updates(updates, fast)):

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 235, in process_updates

Sep 12 15:56:50

return await asyncio.gather(*tasks)

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiogram/dispatcher/handler.py", line 117, in notify

Sep 12 15:56:50

response = await handler_obj.handler(*args, **partial_data)

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiogram/dispatcher/dispatcher.py", line 256, in process_update

Sep 12 15:56:50

return await self.message_handlers.notify(update.message)

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiogram/dispatcher/handler.py", line 117, in notify

Sep 12 15:56:50

response = await handler_obj.handler(*args, **partial_data)

Sep 12 15:56:50

File "/app/tgbot.py", line 73, in startmessage

Sep 12 15:56:50

db = psycopg2.connect(dbname=(os.getenv('DBNAME')), user=(os.getenv('USER')), #Комп

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/psycopg2/__init__.py", line 122, in connect

Sep 12 15:56:50

conn = connect(dsn, connectionfactory=connection_factory, **kwasync)

Sep 12 15:56:50

psycopg2.OperationalError: connection to server at "containers-us-west-164.railway.app" (35.247.93.99), port 7371 failed: Connection timed out

Sep 12 15:56:50

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

Sep 12 15:56:50

ERROR:aiogram.dispatcher.dispatcher:Cause exception while getting updates.

Sep 12 15:56:50

Traceback (most recent call last):

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in wrapcreate_connection

Sep 12 15:56:50

return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa

Sep 12 15:56:50

File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1103, in create_connection

Sep 12 15:56:50

transport, protocol = await self._create_connection_transport(

Sep 12 15:56:50

File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1133, in createconnection_transport

Sep 12 15:56:50

await waiter

Sep 12 15:56:50

ConnectionResetError

Sep 12 15:56:50

The above exception was the direct cause of the following exception:

Sep 12 15:56:50

Traceback (most recent call last):

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiogram/bot/api.py", line 139, in make_request

Sep 12 15:56:50

async with session.post(url, data=req, **kwargs) as response:

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 1141, in aenter

Sep 12 15:56:50

self._resp = await self._coro

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiohttp/client.py", line 536, in _request

Sep 12 15:56:50

conn = await self._connector.connect(

Sep 12 15:56:50

File "/usr/local/lib/python3.10/site-packages/aiohttp/connector.py", line 540, in connect

Sep 12 15:56:50

proto = await self._create_connection(req, traces, timeout)

Solved

4 Replies

2 years ago

What connection is this? It looks like you're attempting to connect to a legacy plugin-based database that we deprecated awhile back.


Status changed to Awaiting User Response Railway over 1 year ago


kennzu
PROOP

2 years ago

What connection is this? It looks like you're attempting to connect to a legacy plugin-based database that we deprecated awhile back.

How to connect to a new one?


Status changed to Awaiting Railway Response Railway over 1 year ago


2 years ago

Can you elaborate on what you're trying to connect to?


Status changed to Awaiting User Response Railway over 1 year ago


kennzu
PROOP

2 years ago

I saw what the problem was. Thank you. I'm the stupid one

Status changed to Awaiting Railway Response Railway over 1 year ago


Loading...