T
T
TBlare2021-04-13 18:15:47
Python
TBlare, 2021-04-13 18:15:47

ConnectionError: [Errno 110] / [Errno 10049] Connect call failed / rabbitmq - how to solve connection problem?

Greetings! I'm trying to run a python bot for discord:
Git bot
Git bot libraries
Both on the remote hosting in the container and on the local computer I get an error connecting to rabbitmq:
Log from the hosting:

Traceback (most recent call last):
   File "/app/.heroku/python/lib/python3.7/site-packages/aiormq/connection.py", line 231, in connect
     self.url.host, self.url.port, ssl=ssl_context
   File "/app/.heroku/python/lib/python3.7/asyncio/streams.py", line 77, in open_connection
    lambda: protocol, host, port, **kwds)
   File "/app/.heroku/python/lib/python3.7/asyncio/base_events.py", line 962, in create_connection
     raise exceptions[0]
   File "/app/.heroku/python/lib/python3.7/asyncio/base_events.py", line 949, in create_connection
     await self.sock_connect(sock, address)
   File "/app/.heroku/python/lib/python3.7/asyncio/selector_events.py", line 473, in sock_connect
     return await fut
   File "/app/.heroku/python/lib/python3.7/asyncio/selector_events.py", line 503, in _sock_connect_cb
     raise OSError(err, f'Connect call failed {address}')
 TimeoutError: [Errno 110] Connect call failed ('52.28.162.203', 0)
 
 The above exception was the direct cause of the following exception:
 
 Traceback (most recent call last):
   File "/app/.heroku/python/lib/python3.7/site-packages/xenon_worker/connection/rabbit.py", line 153, in start
     self.connection = await aiormq.connect(self.url)
   File "/app/.heroku/python/lib/python3.7/site-packages/aiormq/connection.py", line 530, in connect
     await connection.connect(client_properties or {})
   File "/app/.heroku/python/lib/python3.7/site-packages/aiormq/base.py", line 168, in wrap
     return await self.create_task(func(self, *args, **kwargs))
   File "/app/.heroku/python/lib/python3.7/site-packages/aiormq/base.py", line 25, in __inner
     return await self.task
   File "/app/.heroku/python/lib/python3.7/site-packages/aiormq/connection.py", line 234, in connect
     raise ConnectionError(*e.args) from e
 ConnectionError: [Errno 110] Connect call failed ('52.28.162.203', 0)

Log with OS Win (here the older version was loaded):
Traceback (most recent call last):
  File "D:\Discord\Selfhost\xenon-main-premium\virtualenv\lib\site-packages\xenon_worker\connection\rabbit.py", line 151, in start
    self.connection = await aiormq.connect(self.url)
  File "D:\Discord\Selfhost\xenon-main-premium\virtualenv\lib\site-packages\aiormq\connection.py", line 530, in connect
    await connection.connect(client_properties or {})
  File "D:\Discord\Selfhost\xenon-main-premium\virtualenv\lib\site-packages\aiormq\base.py", line 168, in wrap
    return await self.create_task(func(self, *args, **kwargs))
  File "D:\Discord\Selfhost\xenon-main-premium\virtualenv\lib\site-packages\aiormq\base.py", line 25, in __inner
    return await self.task
  File "D:\Discord\Selfhost\xenon-main-premium\virtualenv\lib\site-packages\aiormq\connection.py", line 234, in connect
    raise ConnectionError(*e.args) from e
ConnectionError: [Errno 10049] Connect call failed ('52.28.162.203', 0)

Traceback (most recent call last):
  File "D:\Discord\Selfhost\xenon-main-premium\virtualenv\lib\site-packages\aiormq\connection.py", line 231, in connect
    self.url.host, self.url.port, ssl=ssl_context
  File "D:\Programs\Python\Python37-32\lib\asyncio\streams.py", line 77, in open_connection
    lambda: protocol, host, port, **kwds)
  File "D:\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 962, in create_connection
    raise exceptions[0]
  File "D:\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 949, in create_connection
    await self.sock_connect(sock, address)
  File "D:\Programs\Python\Python37-32\lib\asyncio\selector_events.py", line 473, in sock_connect
    return await fut
  File "D:\Programs\Python\Python37-32\lib\asyncio\selector_events.py", line 503, in _sock_connect_cb
    raise OSError(err, f'Connect call failed {address}')
OSError: [Errno 10049] Connect call failed ('52.28.162.203', 0)

rabbitmq connection address: amqps://user:[email protected]/vhost
Redis and mongodb are also used. Can you suggest me what could be the problem? I would be very grateful for your help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Gornostaev, 2021-04-13
@TBlare

Port 0? That's hardly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question