Rasa X won't start up using docker-compose

Hey there!

I’m having some trouble setting rasa-x up inside a container. I followed the instructions from the docs: “Docker Compose Installation”.

All 10 containers are running. However, the rasa-x container is constantly printing out this error:

 [2021-02-19 15:31:05 +0000] - (sanic.access)[INFO][172.21.0.8:52248]: GET http://rasa-x:5002/api/projects/default/models/tags/production?token=1dOJeqQ2RMS9JNHXLhnFi   │ Q%3D%3D  404 160    

All GET requests are returning a 404. Also, localhost refuses to connect to rasa-x:5002 or localhost:5002.

Please let me know if you need any more details.

Those log messages are the polling to see if a new model has been marked for production. It looks like there’s an issue with your token. Confirm that the .env has RASA_X_TOKEN set to the value you are seeing in the log and try a docker-compose restart.

If you do a docker-compose ps you’ll find that port 5002 is not exposed. You can create a docker-compose.override.yml to change this but the default config exposes Rasa X and the Rasa OSS api end point via the nginx container which is on port 80.

I just checked my .env file and it does indeed contain a rasa-x token variable: RASA_X_TOKEN=1dOJeqQ2RMS9JNHXLhnFiQ==

The token in the logs is 1dOJeqQ2RMS9JNHXLhnFiQ%3D%3D and this one is 1dOJeqQ2RMS9JNHXLhnFiQ==. I guess it’s not feeling too happy about ==. I changed it to a string containing only numbers. Now the error changes from 404 to 503:

[2021-02-21 08:28:44 +0000] - (sanic.access)[INFO][172.25.0.8:44590]: GET http://rasa-x:5002/api/config?token=1234567891011121314  503 40

Here are my containers and it looks like 5002 is exposed.

rasa-x_app_1               ./entrypoint.sh run python ...   Up                      5055/tcp                                                     
rasa-x_db-migration_1      python -m rasax.community. ...   Up (health: starting)   8000/tcp                                                     
rasa-x_db_1                /opt/bitnami/scripts/postg ...   Up                      5432/tcp                                                     
rasa-x_duckling_1          duckling-example-exe --no- ...   Up                      8000/tcp                                                     
rasa-x_nginx_1             /opt/bitnami/entrypoint.sh ...   Up                      8080/tcp, 0.0.0.0:443->8443/tcp, 0.0.0.0:90->9090/tcp        
rasa-x_rabbit_1            /opt/bitnami/scripts/rabbi ...   Up                      15671/tcp, 15672/tcp, 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
rasa-x_rasa-production_1   rasa x --no-prompt --produ ...   Up                      5005/tcp                                                     
rasa-x_rasa-worker_1       rasa x --no-prompt --produ ...   Up                      5005/tcp                                                     
rasa-x_rasa-x_1            /tini -g -- sh -c user_id= ...   Up                      5002/tcp                                                     
rasa-x_redis_1             /opt/bitnami/scripts/redis ...   Up                      6379/tcp    

I changed my nginx to port 90 because I had things I didn’t want to mess with on port 80. Is that a problem?

I ran into the same problem. I also use a different port for my nginx. The default config for nginx seems to expose 5005 (and 5002 as well), see:

x-rasa-services: &default-rasa-service
  restart: always
  image: "rasa/rasa:${RASA_VERSION}-full"
  volumes:
      - ./.config:/.config
  expose:
    - "5005"
  command: >
    x
    --no-prompt
    --production
    --config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN}
    --port 5005
    --jwt-method HS256
    --jwt-secret ${JWT_SECRET}
    --auth-token '${RASA_TOKEN}'
    --cors "*"
  depends_on:
    - rasa-x
    - rabbit
    - redis