I am using docker to run my rasa server and it cant connect to duckling that is also running .
I used docker-compose to spin up my rasa servers including duckling and this is the docker-compose.yml
version: '3.0'
services:
rasa:
image: bot_main:v4
ports:
- "5005:5005"
action_server:
image: bot_action:v1
ports:
- 5055
duckling:
image: rasa/duckling
ports:
- "8000:8000"
When running the server i get the error below:
2019-10-03 22:35:16 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: GitHub - facebook/duckling: Language, engine, and tooling for expressing, testing, and evaluating composable language rules on input strings. Error: HTTPConnectionPool(host=ālocalhostā, port=8000): Max retries exceeded with url: /parse (Caused by NewConnectionError(ā<urllib3.connection.HTTPConnection object at 0x7fbd54a78c50>: Failed to establish a new connection: [Errno 111] Connection refusedā,))
My config.yml file that is also in the image that i am using looks like:
language: en
pipeline:
- name: "SpacyNLP"
- name: "SpacyTokenizer"
- name: "SpacyFeaturizer"
- name: "RegexFeaturizer"
- name: "CRFEntityExtractor"
- name: "EntitySynonymMapper"
- name: "SklearnIntentClassifier"
- name: "DucklingHTTPExtractor"
url: "http://duckling:8000"
policies:
- name: MemoizationPolicy
- name: KerasPolicy
- name: MappingPolicy
- name: FormPolicy
So these are the troubleshooting steps i took:
-
from docker ps I can see that the container is running. Since I also did the port binding, from the host I can point a browser to the duckling server and i get a respose meaning that it is running.
-
If i docker exec into the rasa server, I can ping āducklingā meaning that there virtual network between the containers are working.
-
the rasa server can reach the action server so it also means that the virtual network is working fine.
The thing that I find bizarre is that in the error message, for some reason, the error refers to ālocalhostā as the host for duckling and not what is in the config file.
Anyone out there with some bright ideas how to fix this???