Rasa won't connect to action server

Hi, I am using the new rasa docker container. I have to create my own rasa image as there are no official versions with jieba installed. My image runs with the model/parse function working just fine. However, when I send post request to “http://localhost:5005/webhooks/rest/webhook” with some message. It says “Couldn’t connect to the server at ‘http://localhost:5055/webhook’”, although the action server responds fine to my post requests. Someone please help.

Hm, which part works properly and which doesn’t? What’s the request you send to the action server?

Also, did you provide an endpoints.yml to tell Rasa where the action server is running?

I post a requests with no payload to “http://localhost:5055/webhook” and it replys 'INTERNAL SERVER ERROR", that proves the action server is up and running I suppose. I did provide the endpoints.yml, and the 5005 server log says it couldn’t connect to “http://localhost:5055/webhook” that proves my endpoints.yml is applied by rasa. I looked at the 5055 background and was sure no requests were send to it from the 5005 server. So I am confused about why they won’t connect.

Thank you for your swift reply @akelad

if it can’t connect then i think it may not be reading the endpoint correctly… What are the full logs? And what are the contents of your endpoints.yml?


My endpoints.yml has every line commented out except action_endpoint.

The logs has this error every time.

"2019-05-22 10:51:04 ERROR rasa.core.actions.action - Failed to run custom action ‘action_reset_slots’. Couldn’t connect to the server at ‘http://localhost:5055/webhook’. Is the server running? Error: Cannot connect to host localhost:5055 ssl:None [Cannot assign requested address] 2019-05-22 10:51:04 ERROR rasa.core.processor - Encountered an exception while running action ‘action_reset_slots’. Bot will continue, but the actions events are lost. Make sure to fix the exception in your custom code. " .

The rasa project is well designed, I hope it works. Thank you again @akelad

@XufengXufengXufeng the endpoints file seems fine to me. You don’t get an error on your action server when it tries to execute the action_reset_slots?

no i didn’t get that error. The 5055 action server was not called.

which command do you use to run your action server?

That action server was also a docker image that I created from rasa/rasa_core_sdk. I run the action server with command python -m rasa_core_sdk.endpoint --actions actions.

1 Like

@XufengXufengXufeng the new rasa image works with rasa_sdk, not rasa_core_sdk. Can you try using the rasa_sdk image as the base of your image instead?

Thank you @erohmensing, I have created the rasa_sdk image. but the same error occurs again. No request gets sent from the 5005 server to the 5055 action server. I do add more stuff to my action docker image, some functions handling redisgraph and some extra data for a few QA pairs. All those functions are put together in a separate folder named util_funcs and there is a data folder storing the QA data. I am not sure how it would work for all my needs. But now, I really want those two servers to connect.

I am on the deployment phase of my project. All I want to do is to create the three docker images of the older versions. But the old documentations are gone and I haven’t had a chance to build the images.

The old documenation is still live, it can be found here. As for using the new rasa_sdk image, it won’t run with python -m rasa_core_sdk.endpoint --actions actions as that will call the wrong code as it has been renamed. You in the new rasa image you can start the action server with rasa run actions which will call the sdk code.

Thank you @erohmensing.

One last question about this new exciting version:

Everytime when I run the action server, there is a warning says “/app/rasa_core_sdk/init.py:12: userWarning ‘the rasa_core_sdk’ package is renamed…‘rasa_sdk’ instead” the rasa_core_sdk directory is not create by me and I am using rasa_sdk. I am wondering why the warning is there.

Hm does your action server still use code like from rasa_core_sdk.executor import SlotSet? If so you’ll want to update those.

Oh, right. That the reason. Thank you @erohmensing

I think i figured out why the servers won’t connect. My endpoints.yml service ip are all “localhost”. Since each running docker container are individual OS themselves, calling localhost is like calling their own OS ip. So the “localhost” s in the containers’ view are not the same. When I change the “localhost” to the host machine IP, the three containers (I use the pre_1.0 rasa version for now) connect properly. @erohmensing @akelad @rbossie


Hello, I am also on deployment phase but I am not able to get that host machine IP part as you said. so, can you please share endpoints.yml file? Thank you.

sir may i know how you do that to connect to the rasa shell to action server

I had the same issue.while running over Google cloud platform. You can fix it by using

in your endpoint.yml


url: ‘http://action_server:5055/webhook’

The docker containers talk with their service name to each other, not over localhost nor with ip in my docker-compose.yml action_server: container_name: “action_server”

mine works this way.

1 Like