Hey everyone! I’m having a lot of trouble trying to run Rasa X - probably I’m just making a silly mistake, hope someone here can point me to the right direction.
I’m successfully working with two containers, one running a Rasa server, another with actions.
Docker-compose and Dockerfile content for the project:
rasa:
build: ./rasa
ports:
- "5000:5000"
volumes:
- ./rasa:/rasa
container_name: rasa
depends_on:
- action_server
networks:
- rasa-network
action_server:
build: ./rasaction
ports:
- "5055:5055"
volumes:
- ./rasaction:/rasaction
container_name: action_server
networks:
- rasa-network
Part of the Dockerfile on rasa directory:
`RUN pip install rasa-x --extra-index-url https://pypi.rasa.com/simple
RUN pip install rasa[spacy]
RUN python -m spacy download pt_core_news_sm
RUN python -m spacy link pt_core_news_sm pt`
Shell in use to run server: #!/bin/sh rasa run -m /rasa/models --enable-api --endpoints /rasa/endpoints.yml --log-file out.log -p 5000
Inside the running Rasa server container (port 5000), trying to use ‘rasa x’ command doesn’t seem to work: ERR_CONNECTION_REFUSED. So I’ve tried to alter the ports on docker-compose, setting ports to ‘5005:5005’ and on command erasing the -p 5005 command, since it’s the server default value already. Inside the running container again, the ‘rasa x’ command returns another error (trying to use ‘rasa x --rasa-x-port 5001’ returns the same one)
Traceback (most recent call last): File “/usr/local/lib/python3.6/site-packages/sanic/server.py”, line 745, in serve http_server = loop.run_until_complete(server_coroutine) File “uvloop/loop.pyx”, line 1417, in uvloop.loop.Loop.run_until_complete File “uvloop/loop.pyx”, line 1686, in create_server OSError: [Errno 98] error while attempting to bind on address (‘0.0.0.0’, 5005): address already in use
On another try, I’ve altered on docker-compose ports to ‘5002:5002’ and on command ‘rasa run -m /rasa/models --enable-api --endpoints /rasa/endpoints.yml --log-file out.log -p 5001’. Inside the container this time when I try ‘rasa x’, it runs sucessfully. I’m able to train models and use it normally, but using curl afterwards to check the server returns either connection refused (5001) or recv failure (port 5002).
Since this is just the beggining of a really big project, and I’m soon setting up many other containers to work with Rasa, I woudn’t like to mess up the already working Rasa server, so I just left the ports how they were set up initially (5000), not trying to use Rasa X anymore. I would like, however, to be able to use it sometimes as well, since it’s an amazing improvement and would help a lot in the future. Hope someone can tell me where this is going wrong.
Thanks a lot in advance!