Default docker-compose, no data in Rasa X

Hi there!

I’m having trouble deploying to server with default script. I have my nlu.md and stories.md files inside /etc/rasa/data. However, when I run docker-compose up, I can see the Rasa X UI just fine. But both “Training Data” and Stories are empty. Strangely, I can see responses and domain parameters are all in there.

Here’s the relevant section from my docker-compose.yml:

x-rasa-services: &default-rasa-service
restart: always
image: “rasa/rasa:${RASA_VERSION}-full”
expose:
- “5005”
command: >
x
–no-prompt
–production
–config-endpoint http://rasa-x:5002/api/config?token=${RASA_X_TOKEN}
–port 5005
–jwt-method HS256
–jwt-secret ${JWT_SECRET}
–auth-token ‘${RASA_TOKEN}’
–cors “*”
–enable-api
–debug
depends_on:
- rasa-x
- rabbit
- redis

services:
rasa-x:
restart: always
image: “rasa/rasa-x:${RASA_X_VERSION}”
expose:
- “5002”
volumes:
- ./models:/app/models
- ./environments.yml:/app/environments.yml
- ./credentials.yml:/app/credentials.yml
- ./endpoints.yml:/app/endpoints.yml
- ./logs:/logs
- ./auth:/app/auth
- ./data:/app/data
environment:
<<: *database-credentials
<<: *rasa-credentials
SELF_PORT: “5002”
DB_DATABASE: “${DB_DATABASE:-rasa}”
RASA_MODEL_DIR: “/app/models”
PASSWORD_SALT: ${PASSWORD_SALT}
RABBITMQ_QUEUE: “rasa_production_events”
RASA_X_USER_ANALYTICS: “0”
SANIC_RESPONSE_TIMEOUT: “3600”
METRICS_CONSENT: “${METRICS_CONSENT:-false}”
UUID: “${UUID:-’’}”
depends_on:
- db

I’m also not getting any messages in chat in “Talk to your bot”. Please help.

rasa-production_1 | [2019-12-18 03:24:22 +0000] [1] [ERROR] Exception occurred while handling uri: ‘http://rasa-production:5005/webhooks/rasa/webhook’ rasa-production_1 | Traceback (most recent call last): rasa-production_1 | File “/build/lib/python3.6/site-packages/aiohttp/connector.py”, line 924, in _wrap_create_connection rasa-production_1 | await self._loop.create_connection(*args, **kwargs)) rasa-production_1 | File “uvloop/loop.pyx”, line 1974, in create_connection rasa-production_1 | File “uvloop/loop.pyx”, line 1950, in uvloop.loop.Loop.create_connection rasa-production_1 | File “uvloop/handles/tcp.pyx”, line 180, in uvloop.loop.TCPTransport.connect rasa-production_1 | File “uvloop/handles/tcp.pyx”, line 202, in uvloop.loop._TCPConnectRequest.connect rasa-production_1 | OSError: [Errno 99] Cannot assign requested address

rasa-x_1 | ERROR: rasax.community.api.blueprints.stack:Failed to send message to Rasa Chat webhook. Error: 500, Internal Server Error, body=‘b’\n Internal Server Error\n

\n The server encountered an internal error and cannot complete\n your request.\n

\n’’

Oddly, it works fine when I use the shell command inside a container like so:
docker run -v ${PWD}:/app -it rasa/rasa:1.5.3-full shell

Thank you in advance.

Hi @hknajjar0, in server mode, you do not mount the data, but rather connect the bot to git via Integrated version control. Thanks for reporting, it is actually the case that training data and stories should be empty, but responses and domain should be as well. You should remove your data from /etc/rasa/data and connect via the Integrated Version Control instructions, or upload the data via the upload buttons.

Where did you put your domain file, in /etc/rasa?

Yes, I copied everything back in after running the script

Thanks for clarifying!

How about this error when I send a message in Rasa x chat?

rasa-production_1 | [2019-12-18 03:49:11 +0000] [1] [ERROR] Exception occurred while handling uri: ‘http://rasa-production:5005/webhooks/rasa/webhook
rasa-production_1 | Traceback (most recent call last):
rasa-production_1 | File “/build/lib/python3.6/site-packages/sanic/app.py”, line 918, in handle_request
rasa-production_1 | handler, args, kwargs, uri = self.router.get(request)
rasa-production_1 | File “/build/lib/python3.6/site-packages/sanic/router.py”, line 407, in get
rasa-production_1 | return self._get(request.path, request.method, “”)
rasa-production_1 | File “/build/lib/python3.6/site-packages/sanic/router.py”, line 470, in _get
rasa-production_1 | raise NotFound(“Requested URL {} not found”.format(url))
rasa-production_1 | sanic.exceptions.NotFound: Requested URL /webhooks/rasa/webhook not found
rasa-x_1 | ERROR:rasax.community.api.blueprints.stack:Failed to send message to Rasa Chat webhook. Error: 404, Not Found, body=‘b’Error: Requested URL /webhooks/rasa/webhook not found’’

Is it another issue i’m having?

What are your credentials.yml?

# This file contains the credentials for the voice & chat platforms
# which your bot is using.
# https://rasa.com/docs/rasa/user-guide/messaging-and-voice-channels/

rest:
#  # you don't need to provide anything here - this channel doesn't
#  # require any credentials


#facebook:
#  verify: "<verify>"
#  secret: "<your secret>"
#  page-access-token: "<your page access token>"

slack:
  slack_token: <my slack bot token>
  slack_channel: "kenz-stand"

#socketio:
#  user_message_evt: <event name for user message>
#  bot_message_evt: <event name for but messages>
#  session_persistence: <true/false>

#mattermost:
#  url: "https://<mattermost instance>/api/v4"
#  team: "<mattermost team>"
#  user: "<bot username>"
#  pw: "<bot token>"
#  webhook_url: "<callback URL>"

#rasa:
  url: ${RASA_X_HOST}/api

You need to uncomment the rasa credentials (this would have also come out of the install script before it was overwritten)

Oh thanks a lot! Silly mistake. Still no message going thru:

rasa-production_1 | /build/lib/python3.6/site-packages/rasa/core/agent.py:276: UserWarning: No valid configuration given to load agent.
rasa-production_1 | warnings.warn(“No valid configuration given to load agent.”)
rasa-production_1 | /build/lib/python3.6/site-packages/rasa/core/run.py:255: UserWarning: Agent could not be loaded with the provided configuration. Load default agent without any model.
rasa-production_1 | "Agent could not be loaded with the provided configuration. "
rasa-production_1 | 2019-12-18 03:58:14 DEBUG rasa.core.channels.rasa_chat - Fetched JWT public key from URL ‘http://rasa-x:5002/api/version’ for algorithm ‘RS256’:
rasa-production_1 | -----BEGIN PUBLIC KEY-----
rasa-production_1 |
rasa-production_1 | -----END PUBLIC KEY-----
rasa-production_1 |
rasa-production_1 | 2019-12-18 03:58:14 DEBUG rasa.core.tracker_store - Creating a new tracker for id ‘a640ac49ecaf4c2ca92c30bfd7156f17’.
rasa-production_1 | 2019-12-18 03:58:14 DEBUG rasa.core.processor - Received user message ‘hi’ with intent ‘{‘name’: ‘hi’, ‘confidence’: 1.0}’ and entities ‘[]’
rasa-production_1 | /build/lib/python3.6/site-packages/rasa/core/processor.py:311: UserWarning: Interpreter parsed an intent ‘hi’ that is not defined in the domain.
rasa-production_1 | f"Interpreter parsed an intent ‘{intent}’ "
rasa-production_1 | 2019-12-18 03:58:14 DEBUG rasa.core.processor - Logged UserUtterance - tracker now has 2 events
rasa-production_1 | /build/lib/python3.6/site-packages/rasa/core/processor.py:91: UserWarning: No policy ensemble or domain set. Skipping action prediction and execution.
rasa-production_1 | "No policy ensemble or domain set. Skipping action prediction "
rasa-production_1 | 2019-12-18 03:58:14 DEBUG rasa.core.lock_store - Deleted lock for conversation ‘a640ac49ecaf4c2ca92c30bfd7156f17’.

Looks like you didn’t set your config? :slight_smile:

Ella, Isn’t this sufficient?

language: en
pipeline: supervised_embeddings
policies:
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy
- name: "FallbackPolicy"
  nlu_threshold: 0.4
  core_threshold: 0.3
  fallback_action_name: "utter_default"

Sorry, I’m learning this!

It should be, yes! Did you train the model with that configuration as well? It’s doing weird things on loading: rasa-production_1 | /build/lib/python3.6/site-packages/rasa/core/run.py:255: UserWarning: Agent could not be loaded with the provided configuration. Load default agent without any model.

I re-ran the script and copied the model only in models subfolder. It worked! You rock :slight_smile:

I assume I don’t need to copy my config file in /etc/rasa and the job is done.