Rasa interactive with docker - action server not reachable

Hello, I have created some dockerfiles to make it easier to launch rasa and the action-server. Both of them start fine and work as expected.

Unfortunately, when I want to start the interactive learning mode, my custom actions can not be executed, because the action server is not reachable.

My steps are the following ones:

  1. launch rasa and actionserver via sudo docker-compose up
    These two work succesfully after:
          Name                         Command               State           Ports
rasamount_action_server_1   ./entrypoint.sh start --ac ...   Up>5055/tcp
rasamount_rasa_1            rasa run --cors * --endpoi ...   Up>5005/tcp
  1. Trying to launch the interactive mode via sudo docker run -it -v $(pwd):/app andileni/v2 interactive
    The interactive mode will show up, however my custom actions are lost with the following message:
? The bot wants to run 'barcode_form', correct?  Yes
2019-12-18 16:43:48 ERROR    rasa.core.actions.action  - Failed to run custom action 'barcode_form'. 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:None [Name or service not known]
2019-12-18 16:43:48 ERROR    rasa.core.processor  - Encountered an exception while running action 'barcode_form'. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

It seems like http://action_server:5055/webhook is only visible for the rasa instace that is launched with the action server, can I change this behavior? Or is there an example somewhere in the docs?

Kind regards Andreas

I figured it out:

in the endpoints.yaml I had to replace http://action_server:5055/webhook' with http://IP_OF_MY_SERVER:5055/webhook since localhost is different in every container.

I think its because you are using docker-compose: Docker compose sets the container name using service name and a number, to indicate replicas. In your case, the action server container name is: rasamount_action_server_1 You need to set the container name to: action_server, so that the rasa container will find it. To do this, you can simply add: container_name: action_server to you docker compose, in the spec of the action server service, in your case called rasamount_action_server I suppose.