Error when running custom action (restaurant booking example) - No policy ensemble or domain set

I’m trying to run the restaurant booking example in a straightforward docker-compose configuration.

I’ve had it working previously, but since pulling a more recent container I’m getting an error (I think relating to calling the custom actions).

The key error seems to be:

2019-09-30 10:55:44 WARNING  rasa.core.processor  - No policy ensemble or domain set. Skipping action prediction and execution.

Grateful for any help in fixing this, please

I’ve included the key aspects of the configuration below


endpoints.yml

action_endpoint:
    url: http://action_server:5055/webhook

credentials.yml

socketio:
  user_message_evt: user_uttered
  bot_message_evt: bot_uttered
  session_persistence: true

rest:

config.yml

language: en

pipeline:
  - name: WhitespaceTokenizer
  - name: CRFEntityExtractor
  - name: EntitySynonymMapper
  - name: CountVectorsFeaturizer
    token_pattern: (?u)\b\w+\b
  - name: EmbeddingIntentClassifier
  - name: DucklingHTTPExtractor
    #url: http://localhost:8000
    url: http://duckling:8000
    dimensions:
      - number

policies:
  - name: FallbackPolicy
  - name: MemoizationPolicy
  - name: FormPolicy
  - name: MappingPolicy

docker-compose.yml

version: '3.0'
services:
  action_server:
    image: rasa/rasa-sdk:latest
    ports:
      - 5055:5055
    volumes:
      - .\app\actions:/app/actions
  rasa-svc:
    image: rasa/rasa:latest
    ports:
      - 5005:5005
      - 5006:5006
      - 5002:5002
    volumes:
      - .\app:/app
    command:
       - run
       - --enable-api
       - --cors
    user: root
  duckling:
    image: rasa/duckling
    ports:
     - 8000:8000
  webchat:
    image: nginx:alpine
    ports:
      - 100:80
    volumes:
      - .\web:/usr/share/nginx/html:ro

docker-compose - log

Creating network "rasa-examples_default" with the default driver
Creating rasa-examples_rasa-svc_1      ... done
Creating rasa-examples_duckling_1      ... done
Creating rasa-examples_action_server_1 ... done
Creating rasa-examples_webchat_1       ... done
Attaching to rasa-examples_duckling_1, rasa-examples_webchat_1, rasa-examples_rasa-svc_1, rasa-examples_action_server_1
duckling_1       | no port specified, defaulting to port 8000
duckling_1       | Listening on http://0.0.0.0:8000
action_server_1  | 2019-09-30 10:55:33 INFO     rasa_sdk.endpoint  - Starting action endpoint server...
action_server_1  | 2019-09-30 10:55:33 INFO     rasa_sdk.executor  - Registered function for 'restaurant_form'.
action_server_1  | 2019-09-30 10:55:33 INFO     rasa_sdk.endpoint  - Action endpoint is up and running. on ('0.0.0.0', 5055)
rasa-svc_1       | 2019-09-30 10:55:38 INFO     engineio.server  - Server initialized for sanic.
rasa-svc_1       | 2019-09-30 10:55:38 INFO     root  - Starting Rasa server on http://localhost:5005
webchat_1        | 172.27.0.1 - - [30/Sep/2019:10:55:39 +0000] "GET / HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" "-"
webchat_1        | 172.27.0.1 - - [30/Sep/2019:10:55:39 +0000] "GET /static/imgs/favicon.ico HTTP/1.1" 200 180396 "http://localhost:100/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36" "-"
rasa-svc_1       | 2019-09-30 10:55:40 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Sending packet OPEN data {'sid': 'b5d9fed6eeba4d2ca8de8db1074a1576', 'upgrades': ['websocket'], 'pingTimeout': 60000, 'pingInterval': 25000}
rasa-svc_1       | 2019-09-30 10:55:40 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Sending packet MESSAGE data 0
rasa-svc_1       | 2019-09-30 10:55:40 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Received request to upgrade to websocket
rasa-svc_1       | 2019-09-30 10:55:40 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Received packet MESSAGE data 2["session_request",{"session_id":"8d9eccf4896940afa86776d397368e43"}]
rasa-svc_1       | 2019-09-30 10:55:40 INFO     socketio.server  - received event "session_request" from b5d9fed6eeba4d2ca8de8db1074a1576 [/]
rasa-svc_1       | 2019-09-30 10:55:40 INFO     socketio.server  - emitting event "session_confirm" to b5d9fed6eeba4d2ca8de8db1074a1576 [/]
rasa-svc_1       | 2019-09-30 10:55:40 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Sending packet MESSAGE data 2["session_confirm","8d9eccf4896940afa86776d397368e43"]
rasa-svc_1       | 2019-09-30 10:55:40 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Upgrade to websocket successful
rasa-svc_1       | 2019-09-30 10:55:44 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Received packet MESSAGE data 2["user_uttered",{"message":"hello","customData":{"userId":"456"},"session_id":"8d9eccf4896940afa86776d397368e43"}]
rasa-svc_1       | 2019-09-30 10:55:44 INFO     socketio.server  - received event "user_uttered" from b5d9fed6eeba4d2ca8de8db1074a1576 [/]
rasa-svc_1       | 2019-09-30 10:55:44 WARNING  root  - Could not parse timestamp 311ea036f1f04999924391610ebeb476. Instead current UTC time will be passed to duckling. Error: invalid literal for int() with base 10: '311ea036f1f04999924391610ebeb476'
rasa-svc_1       | 2019-09-30 10:55:44 ERROR    rasa.nlu.extractors.duckling_http_extractor  - Failed to connect to duckling http server. Make sure the duckling server is running and the proper host and port are set in the configuration. More information on how to run the server can be found on github: https://github.com/facebook/duckling#quickstart Error: HTTPConnectionPool(host='localhost', port=8000): Max retries exceeded with url: /parse (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f9a484d9358>: Failed to establish a new connection: [Errno 111] Connection refused',))
rasa-svc_1       | 2019-09-30 10:55:44 WARNING  rasa.core.processor  - No policy ensemble or domain set. Skipping action prediction and execution.
rasa-svc_1       | 2019-09-30 10:56:05 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Received packet PING data None
rasa-svc_1       | 2019-09-30 10:56:05 INFO     engineio.server  - b5d9fed6eeba4d2ca8de8db1074a1576: Sending packet PONG data None

This seems to be working again after running rasa init in the app folder, and then copying the original files back in (and training again).

I’m not sure why this fixed it - any ideas?

For me it worked when I retrained the model. The error reads Error: HTTPConnectionPool(host='localhost', port=8000), so as you can see from that it still tries to reach Duckling under localhost. Changing the config.yml to

- name: DucklingHTTPExtractor url: http://duckling:8000

only works if you retrain the model, since while training the model, also the config.yml is stored as part of the model. If you do not retrain, then still the old config.yml with - name: DucklingHTTPExtractor #url: http://localhost:8000 will be used.