Need help running Rasa X for the first time

Hello,

I have installed Rasa X on AWS by following the directions at

https://rasa.com/docs/rasa-x/installation-and-setup/install/aws-installation/installation

I added some simple greeting and response to test however I am getting an error saying that it failed to train the model image

In the kubectl rasa x logs it says

Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/sanic/app.py", line 973, in handle_request
    response = await response
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 247, in decorated_function
    return await await_and_return_response(args, kwargs, request)
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 177, in await_and_return_response
    response = await response
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py", line 44, in get_models
    models, total_models = await _model_service(request).get_models(
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/model_service.py", line 824, in get_models
    minimum_compatible_version = await self.minimum_compatible_version()
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/services/model_service.py", line 182, in minimum_compatible_version
    info = await stack_service.version()
AttributeError: 'NoneType' object has no attribute 'version'
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40804]: GET http://asdf.elb.amazonaws.com/api/projects/default/models?limit=50&offset=0  500 213
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40810]: GET http://asdf.elb.amazonaws.com/api/features  200 2
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py:134: FutureWarning: The "GET /projects/<project_id>/models/tags/<tag>" endpoint is deprecated. Please use "GET /models/tags/<tag>" instead".
INFO:rasax.community.telemetry:Skipping request to external service: telemetry key not set.
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40812]: GET http://asdf.elb.amazonaws.com/api/user  200 3976
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40808]: GET http://asdf.elb.amazonaws.com/api/telemetry?include_user_groups=true  200 88
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40806]: GET http://asdf.elb.amazonaws.com/api/health  200 144
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40816]: GET http://asdf.elb.amazonaws.com/api/git-repositories  200 165
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40794]: GET http://asdf.elb.amazonaws.com/api/version?skip_external=false  200 595
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40798]: GET http://asdf.elb.amazonaws.com/api/version?skip_external=false  200 595
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40814]: GET http://asdf.elb.amazonaws.com/api/version?skip_external=false  200 595
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40818]: GET http://asdf.elb.amazonaws.com/api/git-repositories/1/status  200 242
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40822]: GET http://asdf.elb.amazonaws.com/icons/apple-touch-icon-144x144.png  200 8253
[2022-01-23 00:27:41 +0000] - (sanic.access)[INFO][1.2.3:40820]: GET http://asdf.elb.amazonaws.com/icons/favicon.ico  200 6518
[2022-01-23 00:27:43 +0000] - (sanic.access)[INFO][1.2.3:40832]: GET http://asdf.elb.amazonaws.com/api/conversations/65a183f51bdb45159cf7bab40248b546?format=full_conversation&history=false&since=0&environment=production  404 193
[2022-01-23 00:27:44 +0000] - (sanic.access)[INFO][1.2.4:46292]: GET http://rasa-x-1642892145-rasa-x.670rasa.svc:5002/api/projects/default/models/tags/production?token=YTExYmJjOTAyMGNkZjljYmVlN2QxZjRm  404 159
[2022-01-23 00:27:44 +0000] [22] [ERROR] Exception occurred while handling uri: 'http://asdf.elb.amazonaws.com/api/projects/default/models/jobs'
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/sanic/app.py", line 973, in handle_request
    response = await response
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 247, in decorated_function
    return await await_and_return_response(args, kwargs, request)
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 177, in await_and_return_response
    response = await response
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/decorators.py", line 84, in decorated_function
    return await f(request, user=user, *args, **kwargs)
  File "/usr/local/lib/python3.8/dist-packages/rasax/community/api/blueprints/models.py", line 249, in train_model
    stack_service = stack_services[environment]```

How can I fix this error?

Thank you!

Hello @dima and welcome to the forum!!

Can you tell which version of rasa x and rasa open source you are trying to install?

Hello @nik202 thank you!

Yes the project was created using rasa open source 3.0.5 and rasa x is 1.0.1

@dima Right! So this is the issue, as Rasa 3. X is not yet compatible with Rasa 1.X and that why you are not able to install Rasa X with Rasa 3.X Ref: Compatibility Matrix

Thank you! How can I fix the issue? Is it a matter of downgrading the rasa version on the kubernetes cluster or the one that I have locally?

double checked it appears that rasa is not installed on the kubernetes cluster I must have missed the instructions for doing that

@dima As far as I worked on the combination and important information Rasa X is designed for a server installation ( means it show Git/Github link only on server installation) Please read the documentation carefully. If you want to install rasa x on server, you can use the following combination which is I’m also using i.e rasa 2.8.11 with rasa x 0.42.5 (I’m using docker installation) Ref: Docker Compose Installation

For Locally: Rasa any version and Rasa X 0.39.3 Ref: Getting error while running rasa x locally - #4 by nik202

I hope this will help you.

@nik202 Thank you for the valuable information!

I have run the helm install command on my local ubuntu installation and it seems to have worked

d@d-Virtual-Machine:~/670rasa$ helm upgrade --install  --namespace 670rasa --values rasa-values.yml --version 1.14.0 rasabot rasa/rasa
Release "rasabot" has been upgraded. Happy Helming!
NAME: rasabot
LAST DEPLOYED: Sat Jan 22 20:27:51 2022
NAMESPACE: 670rasa
STATUS: deployed
REVISION: 2
TEST SUITE: None
NOTES:
rasa 2.8.11 has been deployed!
##############################################################################
####               NOTICE: Telemetry is enabled                           ####
##############################################################################

Telemetry is enabled. Visit our website to learn more: https://rasa.com/docs/rasa/telemetry/telemetry/


##############################################################################
####      The deployment is running with the following configuration      ####
##############################################################################

Endpoints:

    Lock Store enabled:     false
    Event Broker enabled:   false
    Tracker Store enabled:  true
    Model Server enabled:   false

Additional components:

    NGINX:
      Enabled:  true
      TLS:      false

    Redis:
      Installed:  false
      External:   false

    RabbitMQ:
      Installed:  false
      External:   false

    PostgreSQL:
      Installed:  true
      External:   false

Loaded model: https://github.com/RasaHQ/rasa-x-demo/blob/master/models/model.tar.gz?raw=true

To access Rasa from outside of the cluster, follow the steps below:

1. Get the Rasa URL by running these commands:

    export SERVICE_PORT=$(kubectl get --namespace 670rasa -o jsonpath="{.spec.ports[0].port}" services rasabot)
    kubectl port-forward --namespace 670rasa svc/rasabot ${SERVICE_PORT}:${SERVICE_PORT} &
    echo "http://127.0.0.1:${SERVICE_PORT}"


    NGINX is enabled, in order to send a request that goes through NGINX you can use port: 80

What am I missing?

The url /api/version still has {} for the rasa version.

Here is kubectl output

d@d-Virtual-Machine:~/670rasa$ kubectl --namespace 670rasa get service 
NAME                                              TYPE           CLUSTER-IP       EXTERNAL-IP                                                              PORT(S)                                 AGE
rasa-x-123-app                                    ClusterIP      112.10.203.281   <none>                 5055/TCP,80/TCP                         3h7m
rasa-x-123-db-migration-service-headless          ClusterIP      None             <none>                 8000/TCP                                3h7m
rasa-x-123-duckling                               ClusterIP      112.10.249.215   <none>                 8000/TCP                                3h7m
rasa-x-123-nginx                                  LoadBalancer   112.10.173.25    abc.elb.amazonaws.com  8000:31587/TCP                          3h7m
rasa-x-123-postgresql                             ClusterIP      112.10.32.104    <none>                 5432/TCP                                3h7m
rasa-x-123-postgresql-headless                    ClusterIP      None             <none>                 5432/TCP                                3h7m
rasa-x-123-rabbit                                 ClusterIP      112.10.178.63    <none>                 5672/TCP,4369/TCP,25672/TCP,15672/TCP   3h7m
rasa-x-123-rabbit-headless                        ClusterIP      None             <none>                 4369/TCP,5672/TCP,25672/TCP,15672/TCP   3h7m
rasa-x-123-rasa-worker                            ClusterIP      112.10.215.622   <none>                 5005/TCP                                3h7m
rasa-x-123-rasa-x                                 ClusterIP      112.10.83.199    <none>                 5002/TCP                                3h7m
rasa-x-123-redis-headless                         ClusterIP      None             <none>                 6379/TCP                                3h7m
rasa-x-123-redis-master                           ClusterIP      112.10.150.329   <none>                 6379/TCP                                3h7m
rasabot                                           ClusterIP      112.10.173.47    <none>                 5005/TCP,80/TCP                         51m
rasabot-postgresql                                ClusterIP      112.10.154.129   <none>                 5432/TCP                                51m
rasabot-postgresql-headless                       ClusterIP      None             <none>                 5432/TCP                                51m
d@d-Virtual-Machine:~/670rasa$
d@d-Virtual-Machine:~/670rasa$ kubectl --namespace 670rasa get service 
NAME                                              TYPE           CLUSTER-IP       EXTERNAL-IP                                                              PORT(S)                                 AGE
rasa-x-123-app                                    ClusterIP      112.10.203.281   <none>                 5055/TCP,80/TCP                         3h7m
rasa-x-123-db-migration-service-headless          ClusterIP      None             <none>                 8000/TCP                                3h7m
rasa-x-123-duckling                               ClusterIP      112.10.249.215   <none>                 8000/TCP                                3h7m
rasa-x-123-nginx                                  LoadBalancer   112.10.173.25    abc.elb.amazonaws.com  8000:31587/TCP                          3h7m
rasa-x-123-postgresql                             ClusterIP      112.10.32.104    <none>                 5432/TCP                                3h7m
rasa-x-123-postgresql-headless                    ClusterIP      None             <none>                 5432/TCP                                3h7m
rasa-x-123-rabbit                                 ClusterIP      112.10.178.63    <none>                 5672/TCP,4369/TCP,25672/TCP,15672/TCP   3h7m
rasa-x-123-rabbit-headless                        ClusterIP      None             <none>                 4369/TCP,5672/TCP,25672/TCP,15672/TCP   3h7m
rasa-x-123-rasa-worker                            ClusterIP      112.10.215.622   <none>                 5005/TCP                                3h7m
rasa-x-123-rasa-x                                 ClusterIP      112.10.83.199    <none>                 5002/TCP                                3h7m
rasa-x-123-redis-headless                         ClusterIP      None             <none>                 6379/TCP                                3h7m
rasa-x-123-redis-master                           ClusterIP      112.10.150.329   <none>                 6379/TCP                                3h7m
rasabot                                           ClusterIP      112.10.173.47    <none>                 5005/TCP,80/TCP                         51m
rasabot-postgresql                                ClusterIP      112.10.154.129   <none>                 5432/TCP                                51m
rasabot-postgresql-headless                       ClusterIP      None             <none>                 5432/TCP                                51m
d@d-Virtual-Machine:~/670rasa$

rasa-x is the rasa x deployment and rasabot is the rasa open source deployment. They both appear to successfully be on the same cluster. Is there configuration needed to get rasa-x to see rasa on the same cluster?

should I set applicationSettings.rasaX.url from helm-charts/charts/rasa at main · RasaHQ/helm-charts · GitHub in order to fix this?

Re-deployed the instance here is the yml I used

# rasax specific settings
rasax:
    ..
    tag: "latest"
# rasa: Settings common for all Rasa containers
rasa:
    ...
    tag: "2.8.15-full"

However the /api/version url is still showing {} for rasa version

retried with 2.8.11 in the settings.yml that did not work either :frowning:

@dima I’m sorry I have a partial experience with Kub and Helm Chart. I’m a docker guy! I still tried to guide and help you in the right direction.

@nik202 thank you so much for the help I definitely appreciate it! I am very new to Machine Learning and went the Helm Chart route because I have an AWS account. This project is for a class where we have to collaborate with a partner on creating a Rasa chatbot so I am trying to set up a Rasa X instance somewhere my partner and I can both access it. I think the issue with my current attempt may be that the connection between the event broker of Rasa Open Source and Rasa X is not established.

What would be the easiest way to set up an instance of Rasa X/Open Source? Thank you in advance for any help! Best, Dima

@dima Well, I’d encourage installing rasa X only using any method which you like and are able to install, my expertise is in docker.

For installing rasa X you required rasa open-source which is a basic requirement.

But, if you have one project running in rasa open source and you want to link with Rasa X then its a separate concept, and then the event broker comes in importance.

For me, it’s really hard to explain.

If two teams working on the same project here are a few steps which can help you guys:

  1. Install Rasa X on server complete installation i.e action server image too
  2. Connect Github with Rasa X and on both the different systems configure Github in your editor so that every time you push it will update the code and you can able to train on Rasa X.

Hello @nik202 thank you for the recommendation to use docker I am a docker guy now as well!

Thanks to your help I now have 1.0.1 and 2.8.15 installed on my ubuntu machine.

@dima you are welcome. Can I request you to please close this thread (Need help running Rasa X for the first time - #15 by nik202)as a solution for others and for your own reference?