Action server not working with Docker: Couldn't connect to the server - Rasa Open Source - Rasa Community Forum
👋 Introducing the Rasa Playground
Action server not working with Docker: Couldn’t connect to the server
post by dieterm on Nov 28, 2019
Hello, We have deployed a chatbot on a website using Rasa webchat via Heroku. Chitchat works, but the action server gives the following error messege:
ERROR rasa.core.actions.action - Failed to run custom action ‘action_query_chuck_norris’. Couldn’t connect to the server at ‘http://iba_action_server_1:5055/webhook’. Is the server running? Error: Cannot connect to host iba_action_server_1:5055 ssl:default [Name or service not known]
The endpoints.yml:
action_endpoint: url: http://iba_action_server_1:5055/webhook
post by fuih on Nov 28, 2019
Hello @dieterm,
Your service running the action server is named “action_server”. Therefore to refer to its IP you need to change your endpoints.yml to:
action_endpoint: url: http://action_server:5055/webhook
Docker containers refer to each other’s IP by their service’s name, not container’s name (at least in the case of using docker-compose).
post by dieterm on Nov 29, 2019
We have tried this out, but we unfortunately get the same error as before:
ERROR rasa.core.actions.action - Failed to run custom action ‘action_query_chuck_norris’. Couldn’t connect to the server at ‘http://action_server:5055/webhook’. Is the server running? Error: Cannot connect to host action_server:5055 ssl:default [Name or service not known].
What else could be the reason for this?
post by fuih on Dec 1, 2019
That is certainly weird. Do you see that the action_server is started? Is there any log which indicated some kind of error (other than the one above ofc)? You can also describe the process of deployment in steps, maybe we’ll figure something out.
post by dieterm on Dec 2, 2019
We created our own docker images and Dockerfiles now (separate ones for rasa server and action server) instead of using the latest versions from Rasa docker hub. We managed to start both servers on Heroku, but now we have port issues with the CMD run commands in the Dockerfiles. Heroku ads "" in front of the ports.
The solution presented here did not solve the issue for us: Deploy bot on Heroku
post by yiouyou on Feb 23, 2020
@dieterm, I met the similar issue, do you solve the problem?
Thanks,
post by dieterm on Feb 23, 2020
No, we did not solve the port issue on Heroku. Our workaround was to deploy the action server and the rasa server each on a separate Heroku app.
post by ramaneswaran on Apr 8, 2020
@dieterm Can you please share your Dockerfile for rasa server. I managed to deploy the rasa server using docker and it is running but apparently on localhost in the heroku dyno
I am not able to access the API endpoints. Any help would be appreciated.
post by ramaneswaran on Apr 14, 2020
Update: I was able to deploy it successfully in Heroku. The Dockerfile I have is
FROM rasa/rasa:latest-full
# Check Python Environment
RUN python --version
RUN pip --version
# Set working directory
WORKDIR /app
ADD . .
ENTRYPOINT []
EXPOSE 5005
CMD $(echo "rasa run -p $PORT --debug -m models --credentials credentials.yml --enable-api --log-file out.log --endpoints endpoints.yml" | sed 's/=//')
Although I am facing a problem currently, the problem is that when I try to wake up my dyno by sending it a request the app crashes.
post by _sanjay_r on Apr 22, 2020
Hey @ramaneswaran,
Did you have separate Dockerfile for your action server and rasa core?? Could you share them please…and also, how did you deploy to heroku, action server on one app and rasa core on another?
post by ramaneswaran on Apr 23, 2020
Hey @_sanjay_r
I did not use action server, for the project I was just using Rasa NLU for inference. For deployment, I just pushed the docker container to Heroku
Deploying Using Docker in Heroku
Refer to the article above for deployment.
post by dieterm on Apr 23, 2020
Sorry for my late reply. This is our Dockerfile:
FROM ubuntu:18.04
RUN apt-get update && apt-get -y install sudo && apt-get install -y python3 python3-pip
RUN python3 -m pip install --upgrade pip
RUN pip3 install rasa==1.5.1
ADD ./models /app/models/
ADD ./actions /app/actions/
ADD ./scripts /app/scripts/
ADD ./ /
ENTRYPOINT
CMD /app/scripts/start_service.sh
post by dieterm on Apr 23, 2020
Our Dockerfile for the action server:
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y python3 python3-pip
RUN python3 -m pip install --upgrade pip
RUN pip3 install rasa==1.5.1 && pip install pandas
ADD * /actions/
RUN chmod +x /actions/*
ENTRYPOINT
CMD ./actions/start_actions.sh