RASA Core Docker Image: Socket.io

Hello there I setup a Chatbot with docker-compose according to [Development with Docker](Development with Docker). Everything works so far. But I failed to connect with socket.io. Also get inside the container with curl the following message:

curl --noproxy localhost -X POST --data “EIO=3&transport=polling&t=MW5Gcdk” http://localhost:5005/socket.io/

404 Not Found

Not Found

The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.

In the docker-compose.yml file I added the following command: - --credentials - config/credentials.yml The credentials.yml File has the follwing content:

rest:

socketio: user_message_evt: user_uttered bot_message_evt: bot_uttered

Inside the docker container is see the the following process:

python -m rasa_core.run --enable_api --core models -c rest --endpoints config/endpoints.yml --credentials config/credentials.yml -o rasa_core.log --cors * -u current/

Could you please help me here? Is the socket.io channel part of the rasa core image?

Hi,

This is my directory

C:\Rasa\Docker\domain.yml

C:\Rasa\Docker\data\stories.md

While i am running below commands i got , Exception: Failed to load domain specification from ‘/app/project/domain.yml’. File not found!

docker run -v $(pwd):/app/project -v $(pwd)/models/rasa_core:/app/models rasa/rasa_core:latest train –domain project/domain.yml –stories project/data/stories.md –out models

How can i resolve it, please help me.

HI Dario, I am following with interest,

I might be wrong but I am fighting with the same problem, how do you try to connect the?

Thanks

Hi Chaitanya

Your problem has link to my problem, but I think I can help you anyway. Your OS seems to be Windows. Therefore you have to use {} to mount files. Here how I it works for me: docker run -v ${pwd}:/app/project -v ${pwd}/models/rasa_core:/app/models rasa/rasa_core:latest train --domain project/domain.yml --stories project/data/stories.md --out models

Hope it helps.

Hi Marco

Good to hear, that I am not the only one with troubles to connect a socket.io client to RASA Core using docker compose. Here is my docker-compose file: docker-compose.yml (1.3 KB)

By the way, I tried and want to use https://github.com/mrbot-ai/rasa-webchat. Everything worked smoothly with rasa-webchat and socker.io, when I used RASA Core without docker.

Thank you very much for your help!

I fixed the problem by myself. The parameter “-c rest” must be obmited in the docker-compose.yaml file.

The docker-compose.yml file locks the following now: docker-compose.yml (1.3 KB)

@rasa, Does --enable_api cause the problem in combination with -c rest?

Hi dariofiore

That is also not working. Is there any directory issue.

@dariofiore Thanks for posting the docker-compose config. Had a similar issue but your solution fixed it. :+1:

1 Like

glad to hear, that I could help you!

I just checked the source code and using the -c parameter indeed overwrites anything specified in --credentials credentials.yml. There should definitely be a warning or both configs should be used. I also created an issue for that: Connector parameter overwrites credentials parameter. · Issue #1627 · RasaHQ/rasa_core · GitHub

@dariofiore Nice fix! Thanks!

2 Likes