Telegram bot does not respond with Rasa x

Hi,

I followed the Docker-Compose Quick Install deployment procedure Docker-Compose Quick Install and followed the Rasa Master Class video lessons. I used Google Cloud for hosting, ran the certbot for the ssl certificate, integrated with my project on github and created the credentials file for integration with the telegram. The rasa-x page works perfectly, however when I talk to the bot on the telegram I get the request below in the log:

nginx_1            | 2020-02-09T18:49:02.280548875Z 91.108.6.145 - - [09/Feb/2020:18:49:02 +0000] "POST /webhooks/telegram/webhook HTTP/1.1" 200 1578 "-" "-"

However, the bot does not respond on the telegram. Looking at the log, some errors appear:

rasa-production_1  | 2020-02-09T11:47:51.871809910Z     message = self._parse(resp.data)
rasa-production_1  | 2020-02-09T11:47:51.871815392Z   File "/build/lib/python3.6/site-packages/telegram/utils/reque
st.py", line 174, in _parse
rasa-production_1  | 2020-02-09T11:47:51.871820596Z     raise RetryAfter(retry_after)
rasa-production_1  | 2020-02-09T11:47:51.871826197Z telegram.error.RetryAfter: Flood control exceeded. Retry in 1 s
econds
rasa-production_1  | 2020-02-09T11:48:03.594653607Z 2020-02-09 11:48:03 ERROR    pika.adapters.utils.io_services_ut
ils  - Socket failed to connect: <socket.socket fd=22, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('17
2.18.0.8', 55590)>; error=111 (Connection refused)
rasa-production_1  | 2020-02-09T11:48:03.595339411Z 2020-02-09 11:48:03 ERROR    pika.adapters.utils.connection_wor
kflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_
INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.18.0.5', 5672))
rasa-production_1  | 2020-02-09T11:48:03.599042068Z 2020-02-09 11:48:03 ERROR    pika.adapters.utils.connection_wor
kflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connectio
n refused')
rasa-production_1  | 2020-02-09T11:48:08.608190150Z 2020-02-09 11:48:08 ERROR    pika.adapters.utils.io_services_ut
ils  - Socket failed to connect: <socket.socket fd=22, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('17
2.18.0.8', 55604)>; error=111 (Connection refused)
rasa-production_1  | 2020-02-09T11:48:08.608871181Z 2020-02-09 11:48:08 ERROR    pika.adapters.utils.connection_wor
kflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_
INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.18.0.5', 5672))
rasa-production_1  | 2020-02-09T11:48:08.609965674Z 2020-02-09 11:48:08 ERROR    pika.adapters.utils.connection_wor
kflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connectio
n refused')
rasa-worker_1      | 2020-02-09T11:47:51.295880857Z 2020-02-09 11:47:51 ERROR    pika.adapters.utils.connection_wor
kflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connectio
n refused')
rasa-worker_1      | 2020-02-09T11:47:56.316261937Z 2020-02-09 11:47:56 ERROR    pika.adapters.utils.io_services_ut
ils  - Socket failed to connect: <socket.socket fd=22, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('17
2.18.0.7', 45942)>; error=111 (Connection refused)
rasa-worker_1      | 2020-02-09T11:47:56.316716168Z 2020-02-09 11:47:56 ERROR    pika.adapters.utils.connection_wor
kflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_
INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.18.0.5', 5672))

Please, can anyone help me?

Hi @eduardodsaraujo,

To make sure that the issue comes from the telegram connection and is not caused by something else, can you try to run another test by sharing the bot with test users, as described here?

Hi Arjaan,

It works now, I saw the last part of the text in this link, here:

  • change from : http://<HOSTNAME>:<PORT>/webhooks/<CHANNEL>/webhook
  • to : http://<RASA X HOSTNAME>/core/webhooks/<CHANNEL>/webhook

And I saw that my credentials file was wrong. The bot in the telegram is answering now and I think that the error didn’t appear anymore too. Thank you very much, you saved my life.