ERROR pika.adapters.base_connection

Hello friends,

I have a docker setup of Rasa-X running in docker using postgresql + rabbitMQ. We run the latest images at this date. If more information about our setup is needit, please let me know.

The bot is working properly so far, but I encounter a problem, if the user give a late to the bot, it breaks and we need to restart the conversation /restart.

The error looks as follow and it seems to be related with RabbitMQ:



/usr/local/lib/python3.6/site-packages/rasa_core/__init__.py:12: UserWarning: The 'rasa_core' package has been renamed. You should change your imports to use 'rasa.core' instead.


  UserWarning,


2019-09-23 13:27:44 ERROR    pika.adapters.utils.io_services_utils  - _AsyncBaseTransport._produce() failed, aborting connection: error=ConnectionResetError(104, 'Connection reset by peer'); sock=<socket.socket fd=23, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('10.0.7.193', 39792)>; Caller's stack:


Traceback (most recent call last):


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 1097, in _on_socket_writable


    self._produce()


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 820, in _produce


    self._tx_buffers[0])


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 79, in retry_sigint_wrap


    return func(*args, **kwargs)


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 861, in _sigint_safe_send


    return sock.send(data)


ConnectionResetError: [Errno 104] Connection reset by peer


Traceback (most recent call last):


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 1097, in _on_socket_writable


    self._produce()


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 820, in _produce


    self._tx_buffers[0])


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 79, in retry_sigint_wrap


    return func(*args, **kwargs)


  File "/usr/local/lib/python3.6/site-packages/pika/adapters/utils/io_services_utils.py", line 861, in _sigint_safe_send


    return sock.send(data)


ConnectionResetError: [Errno 104] Connection reset by peer


2019-09-23 13:27:44 ERROR    pika.adapters.base_connection  - connection_lost: StreamLostError: ("Stream connection lost: ConnectionResetError(104, 'Connection reset by peer')",)


2019-09-23 13:27:44 ERROR    pika.adapters.blocking_connection  - Unexpected connection close detected: StreamLostError: ("Stream connection lost: ConnectionResetError(104, 'Connection reset by peer')",)


2019-09-23 13:27:44 ERROR    rasa.core.brokers.pika  - Could not open Pika channel at host 'rabbit'. Failed with error: Stream connection lost: ConnectionResetError(104, 'Connection reset by peer') ````

I would like to know how to solve this issue, since it is killing bot performance.

Thanks in advance.

Hi @alebeta90, thanks for your question. Would you mind clarifying what exactly leads to this error? You mention

if the user give a late to the bot

but I’m not 100 percent sure what that means.

Thanks!

Hi @ricwo

sorry, I didn’t write my message properly. I meant if the user give a late message to the bot. For example you start the conversation, and for some reason you stop answering for 10 minutes and then you go back to the conversation and answer back to the bot, the bot is breaking with this message. We have couple of situations that the bot just start posting some messages in a loop.

All the best,

Hi again, thanks for clarifying that. I cannot reproduce this error. Are you having the conversation in the normal “Talk to your bot” tab? What version of Rasa X are you running? I see you posted this three days ago - would you mind trying to update to 0.21.0, along with Rasa 1.3.6?

Hi @ricwo

I just check the rasa version in our docker environment and it shows

root@c6a3bcc1dd2d:/app# rasa --version
Rasa 1.4.0a1

We are using rasa-x:latest and rasa:latest

Shall we downgrade to 1.3.6?

Thanks in advance

I forgot to answer.

We are having the conversation using Slack Channel

Hi @alebeta90, thanks for confirming that. Would you mind trying talking to your bot from the Rasa X UI before starting connecting to it via slack?

Hi @ricwo,

We moved to version 1.3.6 and it seems to be working fine, but today I will perform more tests in order to confirm it good behavior.

All the best

Problem is persisting, also trying from different channels, like rocketchat.

RabbitMQ docker image tag is 3.7.17

@alebeta90, have you tried talking to your bot from the Rasa X UI before connecting via other channels?