Rasa deployment - kubernetes/quick install - Webchat integration not working


The deployment on the server is using quick install/Kubernetes/helm. I am testing chatroom from another web server. I can’t access the port 5005 (firewall allowed). On which of the below pods, i need to expose the port 5005 using the command: kubectl expose pod rasa-postgresql-0 --port=5005 --target-port=5005 --external-ip=x.x.x.x --namespace=rasa ?


[root@localhost ~]# kubectl get pods --namespace rasa NAME READY STATUS RESTARTS AGE rasa-postgresql-0 1/1 Running 0 40h

rasa-nginx-7f4677647c-zsz7c 1/1 Running 0 40h

rasa-redis-master-0 1/1 Running 0 40h

rasa-rasa-x-6dcd76666d-ll5v7 1/1 Running 0 40h

rasa-rabbit-0 1/1 Running 0 40h

rasa-app-668fc6f74d-xqqsg 1/1 Running 0 40h

rasa-db-migration-service-0 1/1 Running 1 40h

rasa-rasa-worker-b96b6758d-bq7w9 1/1 Running 0 40h

rasa-rasa-production-567858d7dc-5288t 1/1 Running 0 40h

rasa-event-service-7d57fc658b-hsk68 1/1 Running 0 40h

svclb-rasa-x-1626196797-nginx-77996 1/1 Running 0 40h

rasa-x-1626196797-duckling-78bfb6b784-4g88l 1/1 Running 0 40h

rasa-x-1626196797-nginx-8574d5d7cd-7q25v 1/1 Running 0 40h

rasa-x-1626196797-app-5c4c4f6ffd-z484q 1/1 Running 0 40h

rasa-x-1626196797-redis-master-0 1/1
Running 0 40h

rasa-x-1626196797-postgresql-0 1/1 Running 0 40h

rasa-x-1626196797-rasa-x-788548fc6b-9c8wb 1/1 Running 0 40h

rasa-x-1626196797-rabbit-0 1/1 Running 0 40h

rasa-x-1626196797-db-migration-service-0 1/1 Running 1 40h

rasa-x-1626196797-rasa-worker-bf946ff4-tr8md 1/1 Running 0 40h

rasa-x-1626196797-rasa-production-79f5cdb9b9-9x86s 1/1 Running 0 40h

rasa-x-1626196797-event-service-5df84886c9-rssc5 1/1 Running 0 40h ‘’’’

1)- endpoints file: ‘’’’ action_endpoint: # Communication via HTTP REST url: “http://localhost:5055/webhook” ‘’’’

2)- I exposed the same port 5005 on Rasa app to outside. I can access it using telnet from the other machine, but chatroom still doesn’t work. What i m missing?

kubectl expose pod rasa-app-6d79f897f-w2gh2 --port=5055 --target-port=5055 --external-ip=x.x.x.x --namespace=rasa

on local rasa, i was running the command to allow API access on port 5005: rasa x --enable-api --cors “*” --port 5005

On server, do i need to do the same? if yes, where and how?

Hi, what exactly is not working about the chatroom? No response? Or some other issue?

no response from chatbot.

can u help me to make it work? like step by step what i need to do? maybe i m missing a step. Note i m using kubernetes/helm setup on Rasa server (IP1) and chatroom is on another server (IP2).

@paolo_1st Hi, I know you need chatroom web integration, but I would encourage to use rasa-webchat for the integration https://youtu.be/eJMT2FovZsM it has a lot of features and easy to code implementations, on the other hand, chatroom only have added advantage of speechRecognition. I’m am just suggesting based on my own experience. Adapt the process as per your need to run in docker or Kubernetes.

@nik202 i m trying rasa web chat using the following code: “” !(function () { let e = document.createElement(“script”), t = document.head || document.getElementsByTagName(“head”)[0]; (e.src = “https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.0/lib/index.js”), (e.async = !0), (e.onload = () => { window.WebChat.default( { socketUrl: “http://x.x.x.x:5055”, title: “sdsd”, subtitle: “” }, null ); }), t.insertBefore(e, t.firstChild); })(); “” The browser is blocking me due to CORS. Noting that i m using quick install with Kubernetes, how can i enable CORS on Rasa server?

Access to XMLHttpRequest at ‘http://x.x.x.x:5055/socket.io/?EIO=3&transport=polling&t=NhDjBeN’ from origin ‘’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

@paolo_1st few details,what is your rasa version? are you able to run rasa shell and talk with the bot?

Rasa version 2.6.0. Rasa is working properly on local and server (quick install/Kubernetes). However, i don’t know where and how to enable CORS on rasa deployment?

Under local, i m using the command: rasa x --enable-api --cors “*” --port 5005

Under deployment, how do i do the same?

1 Like

@paolo_1st Changes:

  1. Change https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.1/lib/index.js”

  2. Change this http://localhost:5055

You need to mention this command. Well I am not an expert in Kubernetes but in docker. I always mention this command in dockerfile or docker-compose.

@nik202 i have the following:

  • Server 1 (IP 1) where i m testing Rasa web chat.
  • Server 2 (IP 2) on which Rasa server is deployed.

so localhost is not correct in my case.re

I already tried both options without success: https://cdn.jsdelivr.net/npm/rasa-webchat@1.0.0/lib/index.js


Rasa webchat is working properly on Rasa local.

On Rasa server deployed using quick install, i want to know how to enable API/cors (–enable-api cors “*”):

  • i tried to pass the command in dockerfile (rasa module wasn’t found coz maybe rasa wasn’t installed yet).
  • i tried to add it at the end of deployment (bahsrc), also same result.
  • I tried docker-compose setup (404 page not found).
  • I tried Kubernetes/helm (app not running).

Please can anyone help me?

@paolo_1st For dockerfile

    FROM rasa/rasa:latest-full

    USER root

    WORKDIR /app
    COPY . /app
    COPY ./data /app/data

    RUN  rasa train -c ./config.yml -d ./domain.yml --data ./data --debug 

    VOLUME /app
    VOLUME /app/data
    VOLUME /app/models

    CMD [ "run","-m","/app/models","--enable-api","--cors","*","--debug" ]

    EXPOSE 5005

**Note:** I am using Docker file and Docker compose, for deployment I am using Rasawebchat + Wordpress website using ngrok for my MVP (Minimal Viable Product).

Thank u for ur answer, I will try it. In case it didn’t work, I already tried docker compose but getting 404 error page, what are the possible causes?

@paolo_1st share the error screenshot, then I can suggest or comment.

i tried the commands you provided, but as i suspected, rasa wasn’t found coz the step of installing rasa didn’t come yet under bahsrc:

Blockquote Step 23/29 : RUN rasa train -c ./config.yml -d ./domain.yml --data ./data --debug —> Running in bbf87380ac6d /bin/bash: rasa: command not found The command ‘/bin/bash -o pipefail -c rasa train -c ./config.yml -d ./domain.yml --data ./data --debug’ returned a non-zero code: 127


@paolo_1st Can I asked what is your end goal? What steps are you using; if you can briefly mention. @paolo_1st Because me bit confused you are using Rasa-X as you send in previous screenshot and you want to integrate chatroom; both are different.

i have the following setup:

  • Server 1: Rasa local mode.
  • Server 2: Rasa server.

The end goal is to connect webchat widget on a website to rasa server (Server 2) as we don’t want to give access Rasa X GUI.