Rasa-x_1 problem: Socket failed to connect, error=111 (Connection refused)

Dear community,

After installing Rasa X, I meet the errors as below:

root@iZZ:/etc/rasa# sudo docker-compose logs|grep -i error
rasa-x_1           | ERROR:pika.adapters.utils.io_services_utils:Socket failed to connect: <socket.socket fd=18, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=('172.21.0.6', 40784)>; error=111 (Connection refused)
rasa-x_1           | ERROR:pika.adapters.utils.connection_workflow:TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('172.21.0.4', 5672))
rasa-x_1           | ERROR:pika.adapters.utils.connection_workflow:AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connection refused')
rasa-x_1           | ERROR:pika.adapters.blocking_connection:Unexpected connection close detected: ConnectionClosedByBroker: (320) "CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'"
rasa-x_1           | ERROR:rasax.community.services.event_service:Caught an exception while consuming events. Will retry in 5 s.
rasa-x_1           |     raise self._closed_result.value.error

Any idea what’s wrong? Thanks,

Hi @yiouyou ,

Sometimes it takes a litte while before all containers are up & running.

Are all the other containers up & running ?

What do you see when you do sudo docker ps -a ?

sudo docker-compose ps -a

sudo docker ps -a

I’ve been waiting for quite awhile, the problem is still there.

Were you able to solve this problem? Even I am facing this issue. The bot is not responding at all.

Issue has been solved. Some tips:

  1. The connection between rasa and rasa-x is based on docker’s bridge network. We should understand that first.

  2. Within the ‘rasa_default’ network, all containers are allowed to access each other by their service’s name, such as ‘app’.

  3. For beginners, don’t use the latest version, especially during the updating process. As I can remember, I used rasa/rasa:1.7.0-full and rasa/rasa-sdk:1.7.0 to build the custom rasa-x.

Hi @yiouyou Do you have an exact explanation for how this was resolved? Can you paste your docker files?

I am essentials using the docker-compose.yml that came with the quick Docker install via the Rasa docs: Docker-Compose Quick Install

I am trying to resolve these errors:

rasa-production_1  | 2020-03-10 05:18:22 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', (''263.13.0.5'', 5672))
rasa-production_1  | 2020-03-10 05:18:22 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connection refused')
rasa-worker_1      | 2020-03-10 05:18:22 ERROR    pika.adapters.utils.io_services_utils  - Socket failed to connect: <socket.socket fd=21, family=AddressFamily.AF_INET, type=2049, proto=6, laddr=(''263.13.0.5'', 53876)>; error=111 (Connection refused)
rasa-worker_1      | 2020-03-10 05:18:22 ERROR    pika.adapters.utils.connection_workflow  - TCP Connection attempt failed: ConnectionRefusedError(111, 'Connection refused'); dest=(<AddressFamily.AF_INET: 2>, <SocketKind.SOCK_STREAM: 1>, 6, '', ('263.13.0.5', 5672))
rasa-worker_1      | 2020-03-10 05:18:22 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnector - reporting failure: AMQPConnectorSocketConnectError: ConnectionRefusedError(111, 'Connection refused')

Has anyone got an exact approach to solution to someone who is not much used to Docker, here?

To who might need an example of setting up Rasa X dockers, please check the following blog:

How to set up the docker cluster of Rasa X and Grakn

Hope it’s useful.

btw, the previous link is wrong, just correct it.