I use rasa-x installed with docker on an aws server. I my actions.py file ready, my docker-compose.yml file prepared as in the “run rasa with docker” tutorial, and my endpoints set-up. When using only rasa installed without docker I managed to use Custom Actions easily, but with docker it seems that it does not connect to the action server : “Cannot connect to host action_server:5055 ssl:None [Name or service not known]” as an error.
I have tried many things (change endpoints and docker-compose file mainly) but I did not success, and that is problem to use my model with rasa-x.
I will appreciate any kind of help, and can provide any information to solve my problem.
Hi @billbokay, welcome to the forum! Please check out the instructions on how to use custom action servers here: Deploy to a Server (point 3). You will essentially have to replace your app entry in your docker-compose.yml with
Following your advice I added the line under “volumes” in my docker-compose.yml (and I understood why it is better to create a docker-compose.override.yml, will do it later).
It seems to have improved situation : now when I run docker-compose up it register my custom actions and print “Action endpoint is up and running. on (‘0.0.0.0’, 5055)”, so far so good.
But two things seem to still break :
first I have when I run the docker-compose up the error " No model found. Train a model before running the server using rasa train." followed by “docker_rasa3_rasa_1 exited with code 0” ; however I have already trained several models, using the command “docker run -v $(pwd):/app rasa/rasa:latest-full train --domain domain.yml --data data --config config/config.yml --out models --fixed-model-name my_model”
What am I missing here ?
then I still have the previous error when talking to the chatbot : “Is the server running? Error: Cannot connect to host rasa:5055 ssl:None [Name or service not known]”
I don’t know if this is linked to the previous problem, or to the endpoints.yml.
I also have a very basic question, the plan is to run docker-compose up in a terminal tab, and to run rasa shell in another terminal, then I should have my custom actions working, right ?
What does your endpoints.yml look like? What exactly does the section you added to your docker-compose.yml look like?
As for training, it sounds like from your initial question that you’re running a rasa X setup, not just rasa. It would be easiest to visit the UI and train your model there once your containers are up.
I understand, but (perhaps am I not enough used to the UI) but I found it less flexible and less precise. And I thought it was a good first step to have my custom actions work first in the terminal before anything else. And the error “No model found etc” will still be a concern I think ?
In fact I use more Rasa-x as a front end for other users to test my bot.
Hi @billbokay, from looking at your endpoint configuration, it seems that rasa is looking for an action endpoint at http://rasa:5055 which is not the location of your action server. Please change it to
Hi @ricwo, thank you for your suggestion ! It does not work much. In fact before editing this post I tried several things to replace the “rasa” in the URL : “action_server” as it is in the “running rasa with Docker” tutorial, the IP of the server, and this “rasa” for no real reason (that I forgot to change before replying).
In fact I can now no more run the “rasa run actions” command, I get the error “No model found. Train a model before running the server using rasa train.” from this command too (which was not the case before, I do not know what changed to get this)…
Whatever the end I appreciate your help and hope you don’t lose to much time on me !
Hi @billbokay, I’m a little confused as to why you’re running that docker command. Your app service runs python -m rasa_sdk --actions automatically, so there really shouldn’t be a need for you to run that command manually. Your app service is the action server, so please just start that as it is, and likewise your rasa service can just be started with docker-compose up as well (no need for a docker run -it command). I hope that helps!
But I ran the docker run command in order to test my bot without launching the docker-compose up. And the fact that it does not work and that I get this error is a bit confusing for me !
Hi @billbokay, can you share the exact docker-compose.yml that led to the error you posted? would you mind updating to the latest Rasa version? Does the problem still happen?
Hello @ricwo I did as in your example changed action_server:5055 to myip:5055 in endpoints.yml file it works good in rasa shell mode but when I upload this code to github then connect to rasa x custom actions don’t work.
I used docker to deploy rasa x.I did everything as in this tutorial The Rasa Masterclass Handbook: Episode 9. Bot works properly in rasa shell but when I use rasa x ui it does’t reply with custom actions.For example when I write recommend film of genre comedy it just shows that next actions is “action_film” but does not show answer in my case it is links to film web sites