Unable to start the RASA Server after adding RABBITMQ details in endpoints.yml

Dear All, I have installed Rasa X and Rasa on same machine. Rasa X containers are running fine but RASA server is not starting after updating the pika adapter details in endpoints.yml

Error is shown as

2020-03-04 16:21:01 ERROR    pika.adapters.utils.connection_workflow  - getaddrinfo failed: gaierror(-2, 'Name or service not known').
2020-03-04 16:21:01 ERROR    pika.adapters.utils.connection_workflow  - AMQP connection workflow failed: AMQPConnectionWorkflowFailed: 20 exceptions in all; last exception - gaierror(-2, 'Name or service not known'); first exception - gaierror(-2, 'Name or service not known').
2020-03-04 16:21:01 ERROR    pika.adapters.utils.connection_workflow  - AMQPConnectionWorkflow - reporting failure: AMQPConnectionWorkflowFailed: 20 exceptions in all; last exception - gaierror(-2, 'Name or service not known'); first exception - gaierror(-2, 'Name or service not known')
2020-03-04 16:21:01 ERROR    pika.adapters.base_connection  - Full-stack connection workflow failed: AMQPConnectionWorkflowFailed: 20 exceptions in all; last exception - gaierror(-2, 'Name or service not known'); first exception - gaierror(-2, 'Name or service not known')
2020-03-04 16:21:01 ERROR    pika.adapters.base_connection  - Self-initiated stack bring-up failed: AMQPConnectionWorkflowFailed: 20 exceptions in all; last exception - gaierror(-2, 'Name or service not known'); first exception - gaierror(-2, 'Name or service not known')
2020-03-04 16:21:01 WARNING  rasa.core.brokers.pika  - Connecting to '$RABBITMQ_HOST' failed with error ''. Trying again.

The endpoints.yml is like below:

event_broker:
  type: "pika"
  url: $RABBITMQ_HOST
  username: $RABBITMQ_USERNAME
  password: $RABBITMQ_PASSWORD
  queue: $RABBITMQ_QUEUE

.env is

RABBITMQ_PASSWORD=abcd
RABBITMQ_HOST=127.0.0.1
RABBITMQ_USERNAME=user
RABBITMQ_QUEUE=rasa_production_events

Docker ps output is as below:

CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS              PORTS                                         NAMES
96f9638c3481        rasa/nginx:0.25.2           "/opt/bitnami/entryp…"   25 hours ago        Up 25 hours         0.0.0.0:80->8080/tcp, 0.0.0.0:443->8443/tcp   rasa_nginx_1
8e590dc32e16        rasa/rasa-x-demo:0.25.2     "./entrypoint.sh run…"   25 hours ago        Up 25 hours         5055/tcp                                      rasa_app_1
3f8b2fac1e3b        rasa/rasa:1.8.0-full        "rasa x --no-prompt …"   25 hours ago        Up 25 hours         5005/tcp                                      rasa_rasa-worker_1
2e8b53e97d3c        rasa/rasa:1.8.0-full        "rasa x --no-prompt …"   25 hours ago        Up 25 hours         5005/tcp                                      rasa_rasa-production_1
5d8b2bd74d9b        rasa/rasa-x:0.25.2          "sh -c 'user_id=$(id…"   25 hours ago        Up 25 hours         5002/tcp                                      rasa_rasa-x_1
11307b346c8b        bitnami/rabbitmq:3.7.17     "/entrypoint.sh /run…"   25 hours ago        Up 25 hours         4369/tcp, 5672/tcp, 15672/tcp, 25672/tcp      rasa_rabbit_1
4c2d0bbbbfe5        bitnami/postgresql:11.3.0   "/entrypoint.sh /run…"   25 hours ago        Up 25 hours         5432/tcp                                      rasa_db_1
c4deaf5c2931        rasa/duckling:latest        "duckling-example-ex…"   25 hours ago        Up 25 hours         8000/tcp                                      rasa_duckling_1
26bfe60004c9        bitnami/redis:5.0.5         "/entrypoint.sh /run…"   25 hours ago        Up 25 hours         6379/tcp                                      rasa_redis_1

The RABBITMQ_HOST should be set to rabbit instead of 127.0.0.1 since rabbit is running in a separate container from rasa-production.

You actually don’t have to set that environment variable at all - it should be set to a default value in the docker-compose.yml

Thanks Stephens n Akela. Actually, I m new to Rasa. When I installed n started Rasa X, I didn’t knew that Rasa server will also start through one of docker container. I was trying to connect from stand alone Rasa server , while Rasa server on docker was already running n connected to Rasa x