Failed to run custom actions error

I’m facing this error while running a action in

ERROR rasa.core.actions.action - Failed to run custom action ‘action_pincode’. Couldn’t connect to the server at ‘http://localhost:5055/webhook’. Is the server running? Error: Cannot connect to host localhost:5055 ssl:default [Connection refused] ERROR rasa.core.processor - Encountered an exception while running action ‘action_pincode’. Bot will continue, but the actions events are lost. Please check the logs of your action server for more information.

class Actionpincode(Action): def name(self) -> Text: return ACTION_PINCODE

async def run(self,
              dispatcher: 'Dispatcher',
              tracker: 'DialogueStateTracker',
              domain: 'Domain') -> List[Event]:
    path = '/pincode.txt'
    pincode_file = open(path,'r')
    pincodes =
    pin = next(tracker.get_latest_entity_values("pincode"), None)

    for i in pincodes:
        if i==pin:
    if flag==1:
        await dispatcher.utter_message("yes", tracker, silent_fail=True)
    else :
        await dispatcher.utter_message("no", tracker, silent_fail=True)

    return [UserUtteranceReverted()]

Hello @Saurbh060,

Did you start the action server ?

If yes, how are you running the Rasa server and action server, by command line or by Docker ?

If possible, post your action_server config in your endpoints.yml.

I’m running the server by command line if i use "rasa shell " command it will direct me to localhost

endpoints.yml -> action_endpoint: url: “http://localhost:5055/webhook


Yes, but did you start the action server by running the command: rasa run actions

1 Like

@fuith Yes, I have already run this command and got this result

@Saurbh060 All right, as you can see when you start the action server there is an error, therefore your Rasa server can not connect to the action server to execute your custom actions. I check the in Rasa github and don’t see any constant named DOCS_BASE_URL, are you sure this is the right constant that you want to import ? This is the link to the on github: rasa/ at master · RasaHQ/rasa · GitHub

@fuith I also checked my file but didn’t see any any consatnt named DOCS_BASE_URL and I don’t know what is the use of this file.


It said in the log that in you are importing DOCS_BASE_URL in your at line 11, is this not your intention ? Can you post your here ?

@fuith Actually I copied this file from somewhere to implement " action_default_fallback " but I think there are some unwanted things that were used in this file. (19.1 KB)


This seems to me like an outdated source code of Rasa. You should only define your own custom actions in your I suggest you remove all the copied code and keep only your custom actions. The “action_default_fallback” is already implemented, if you want to customize it, just override it with your own logic.

@fuith ok, thanks :+1: