Hi there!
I followed the rasa master class tutorial to build my own rasa X server using google cloud. However, I have an issue when setting up the action server. The bot in rasa-x doesn’t reply when an action is triggered.
My current setup:
docker-compose.override.yml
version: '3.4'
services:
app:
restart: always
build: .
volumes:
- './actions:/app/actions'
expose:
- '5055'
depends_on:
- rasa-production
The docker compose overwrite file builds from the following Dockerfile:
# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:latest
# Change back to root user to install dependencies
USER root
# To install system dependencies
RUN apt-get update -qq && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# To install packages from PyPI
RUN pip install --no-cache-dir pandas babel numpy
# Switch back to non-root to run code
USER 1001
My docker-compose ps output looks like this:
Name Command State Ports
-------------------------------------------------------------------------------------------------------------------------------------------------------------
rasa_app_1 ./entrypoint.sh run python ... Up 5055/tcp
rasa_db-migration_1 python -m rasax.community. ... Up (healthy) 8000/tcp
rasa_db_1 /opt/bitnami/scripts/postg ... Up 5432/tcp
rasa_duckling_1 duckling-example-exe --no- ... Up 8000/tcp
rasa_nginx_1 /docker-entrypoint.sh ngin ... Up 80/tcp, 0.0.0.0:80->8080/tcp,:::80->8080/tcp, 0.0.0.0:443->8443/tcp,:::443->8443/tcp
rasa_rabbit_1 /opt/bitnami/scripts/rabbi ... Up 15671/tcp, 15672/tcp, 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
rasa_rasa-production_1 rasa x --no-prompt --produ ... Up 5005/tcp
rasa_rasa-worker_1 rasa x --no-prompt --produ ... Up 5005/tcp
rasa_rasa-x_1 /tini -g -- sh -c user_id= ... Up 5002/tcp
rasa_redis_1 /opt/bitnami/scripts/redis ... Up 6379/tcp
I checked the output log of the rasa_app_1 service. The error is that no registered action found for name action_tell_conditions:
INFO:rasa_sdk.endpoint:Starting action endpoint server...
DEBUG:sanic.root:CORS: Configuring CORS with resources: {'/*': {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': None, 'supports_credentials': False, 'max_age': None, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': {'/*': {'origins': '*'}}, 'intercept_exceptions': True, 'always_send': True}}
INFO:rasa_sdk.endpoint:Action endpoint is up and running on http://0.0.0.0:5055
DEBUG:rasa_sdk.utils:Using the default number of Sanic workers (1).
DEBUG:sanic.root:
Sanic
Build Fast. Run Fast.
INFO:sanic.root:Goin' Fast @ http://0.0.0.0:5055
INFO:sanic.root:Starting worker [1]
DEBUG:rasa_sdk.executor:Received request to run 'action_tell_conditions'
ERROR:rasa_sdk.endpoint:No registered action found for name 'action_tell_conditions'.
DEBUG:sanic.root:CORS: Request to '/webhook' matches CORS resource '/*'. Using options: {'origins': ['.*'], 'methods': 'DELETE, GET, HEAD, OPTIONS, PATCH, POST, PUT', 'allow_headers': ['.*'], 'expose_headers': None, 'supports_credentials': False, 'max_age': None, 'send_wildcard': False, 'automatic_options': True, 'vary_header': True, 'resources': {'/*': {'origins': '*'}}, 'intercept_exceptions': True, 'always_send': True}
INFO:sanic.access:
However, the action is defined in the actions.py file of the server: actions.py
class ActionTellConditions(Action):
def name(self) -> Text:
return "action_tell_conditions"
def run(
self,
dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any],
) -> List[Dict[Text, Any]]:
precio = piso1.get("precio")
dispatcher.utter_message(
template="utter_conditions",
precio=precio
)
return []