RasaX / docker credentials issue

Hi there!

I’ve installed Rasa X in a google cloud VM; the are my docker containers:

Page up
antoniopedrolopes@rasa:/etc/rasa$ docker ps
CONTAINER ID   IMAGE                               COMMAND                  CREATED             STATUS                       PORTS                                                                                    NAMES
2359bb5b33db   nginx:1.19                          "/docker-entrypoint.…"   About an hour ago   Up About an hour             80/tcp, 0.0.0.0:80->8080/tcp, :::80->8080/tcp, 0.0.0.0:443->8443/tcp, :::443->8443/tcp   rasa_nginx_1
824e6af75e2b   nonola76/rasa_action:actionserver   "./entrypoint.sh sta…"   About an hour ago   Up About an hour             5055/tcp                                                                                 rasa_app_1
b41c0dc87dd7   rasa/rasa:2.8.11-full               "rasa x --no-prompt …"   About an hour ago   Up About an hour             5005/tcp                                                                                 rasa_rasa-producti
on_1
44b71ddef93d   rasa/rasa:2.8.11-full               "rasa x --no-prompt …"   About an hour ago   Up About an hour             5005/tcp                                                                                 rasa_rasa-worker_1
34497fca0875   rasa/rasa-x:0.42.5                  "python -m rasax.com…"   About an hour ago   Up About an hour (healthy)   8000/tcp                                                                                 rasa_db-migration_
1
a2578aa1ffab   rasa/rasa-x:0.42.5                  "/tini -g -- sh -c '…"   About an hour ago   Up About an hour             5002/tcp                                                                                 rasa_rasa-x_1
0fc95dc2ee15   rasa/duckling:0.1.6.5-r2            "duckling-example-ex…"   About an hour ago   Up About an hour             8000/tcp                                                                                 rasa_duckling_1
03062b9a4b4c   bitnami/redis:6.2.4                 "/opt/bitnami/script…"   About an hour ago   Up About an hour             6379/tcp                                                                                 rasa_redis_1
fd74710dc415   bitnami/postgresql:11.11.0          "/opt/bitnami/script…"   About an hour ago   Up About an hour             5432/tcp                                                                                 rasa_db_1
e56a2bd7baa4   bitnami/rabbitmq:3.8.17             "/opt/bitnami/script…"   About an hour ago   Up About an hour             4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp 

Some weeks ago, I had an installation of Rasa OS where I had a connection to TTS - STT Audiocodes, here is the github link for it’s connection with Rasa: Audiocodes.

  • I installed audiocodes with pip install rasa-audiocodes

  • I added the following content to credentials.yml:

rasa_audiocodes.AudiocodesInput: token: “2******”

I succeded to connect to audiocodes channel with this command:

rasa run -m models --enable-api --cors "*" --debug

It worked like a charm.

But now, with rasa-x & docker, and following the instructions of the GitHub - ac-voice-ai/rasa-audiocodes: AudioCodes VoiceAI Connect integration for Rasa, I having some problems in making the connection, because, I really don’t understand where to add the credentials if: in the file of my project on github (credentials.yml) or in “etc/rasa/credentials.yml”.

Also in the instructions Audiocodes says:


If you're using Rasa on Docker, you can copy rasa_audiocodes and docker-compose.yml to your application directory, and edit the volumes section to match your app directory.

If you already have a docker-compose file, just add this to the rasa volumes:

      - ./rasa_audiocodes:/opt/venv/lib/python3.8/site-packages/rasa_audiocodes

How can I do this? I’ve tried to add that line of code to docker-compose.yml in “etc/rasa”, and rasa containers restart since then.

Any idea?

Thanks in advance!

I got this error:

fece2d25c31e   rasa/rasa:2.8.11-full               "rasa x --no-prompt …"   25 seconds ago   Restarting (1) 1 second ago                                                                                            rasa_rasa-production_1
5110c0309142   rasa/rasa:2.8.11-full               "rasa x --no-prompt …"   25 seconds ago   Up Less than a second         5005/tcp                                                                                 rasa_rasa-worker_1
1802c44e5783   rasa/rasa-x:0.42.5                  "/tini -g -- sh -c '…"   25 seconds ago   Up 24 seconds                 5002/tcp                                                                                 rasa_rasa-x_1
fad08eee021d   rasa/rasa-x:0.42.5                  "python -m rasax.com…"   25 seconds ago   Up 24 seconds (healthy)       8000/tcp                                                                                 rasa_db-migration_1
73b25727b4d9   rasa/duckling:0.1.6.5-r2            "duckling-example-ex…"   26 seconds ago   Up 25 seconds                 8000/tcp                                                                                 rasa_duckling_1
3aa5bbba513d   bitnami/redis:6.2.4                 "/opt/bitnami/script…"   26 seconds ago   Up 25 seconds                 6379/tcp                                                                                 rasa_redis_1
57f236a86223   bitnami/postgresql:11.11.0          "/opt/bitnami/script…"   26 seconds ago   Up 25 seconds                 5432/tcp                                                                                 rasa_db_1
44cd331c132b   bitnami/rabbitmq:3.8.17             "/opt/bitnami/script…"   26 seconds ago   Up 25 seconds                 4369/tcp, 5671-5672/tcp, 15671-15672/tcp, 25672/tcp                                      rasa_rabbit_1
c00075034658   rasa/rasa:2.8.11-full               "rasa run actions"       14 minutes ago   Up 14 minutes                 5005/tcp                                                                                 busy_volhard
059625da0852   rasa/rasa:2.8.11-full               "rasa run --enable-a…"   16 minutes ago   Up 16 minutes                 5005/tcp                                                                                 wonderful_chandrasekhar
antoniopedrolopes@rasa:/etc/rasa$ docker logs fece2d25c31e
Starting Rasa X in production mode... 🚀
RasaException: Failed to find input channel class for 'rasa_audiocodes.audiocodes.AudiocodesInput'. Unknown input channel. Check your credentials configuration to make sure the mentioned channel is not misspelled. If you are creating your own channel, make sure it is a proper name of a class in a module.

@nik202 any thoughts about this?

Thanks a lot!

why you used this? can you give me some idea?

Hi @nik202 ,

Our purpose is to use our chatbot, connected with our call center.

Right now, I installed rasa open source, in a venv on google cloud vm.

With 2 terminals, I can run rasa run -m models --enable-api --cors "*" --debug in one of the terminal and rasa run actions.

After this, I can call a phone number & talk to our chatbot as it answers very well.

My problem is that on docker installation of rasa-x, I cannot do it. I don’t know where I should put this line. - ./rasa_audiocodes:/opt/venv/lib/python3.8/site-packages/rasa_audiocodes.

Was I clear? Thanks!

you are using custom action for audiocodes? where you used this audiocodes?

Hi @nik202 !

No, I’me not using any custom action. When someone calls a number, an intent is triggered then the conversations starts.

you are using AudioCodes here, or where I just asked that???

It means this: https://github.com/ac-voice-ai/rasa-audiocodes/blob/master/docker-compose.yml

I’d highly recommend seeing the docker and docker-compose tutorials

Good Luck! Do reply to another open thread on which I messaged?

1 Like

Hi @nik202

Sorry to bother you again with this issue, but:

  • as you said, my docker.compose.override.yml looks like this:
version: "3.4"
services:
    app:
      image: "nonola76/rasa_action:actionserver"
      volumes:
        - './actions:/app/actions'
      expose:
        - '5055'
      depends_on:
        - rasa-production

    rasa:
      image: rasa/rasa:2.8.11
      command: run
      ports:
        - 5005:5005
      volumes:
        - ./app:/app
        - ./rasa_audiocodes:/home/antoniopedrolopes/.local/lib/python3.8/site-packages/rasa_audiocodes
  • my credentials.yml in etc/rasa:
rasa:
  url: ${RASA_X_HOST}/api

rasa_audiocodes.AudiocodesInput:
  token: "1234"

when I run “sudo docker-compose up -d”, I get this errors:

rasa_1             | 2022-03-22 10:40:43 WARNING  rasa.utils.common  - Failed to write global config. Error: [Errno 13] Permission denied: '/app/.config'. Skipping.
rasa_1             | Traceback (most recent call last):
rasa_1             |   File "/opt/venv/bin/rasa", line 8, in <module>
rasa_1             |     sys.exit(main())
rasa_1             |   File "/opt/venv/lib/python3.8/site-packages/rasa/__main__.py", line 118, in main
rasa_1             |     cmdline_arguments.func(cmdline_arguments)
rasa_1             |   File "/opt/venv/lib/python3.8/site-packages/rasa/cli/run.py", line 118, in run
rasa_1             |     args.model = _validate_model_path(args.model, "model", DEFAULT_MODELS_PATH)
rasa_1             |   File "/opt/venv/lib/python3.8/site-packages/rasa/cli/run.py", line 71, in _validate_model_path
rasa_1             |     os.makedirs(default, exist_ok=True)
rasa_1             |   File "/usr/lib/python3.8/os.py", line 223, in makedirs
rasa_1             |     mkdir(name, mode)
rasa_1             | PermissionError: [Errno 13] Permission denied: 'models'
rasa_rasa_1 exited with code 1
rasa-worker_1      | Starting Rasa X in production mode... 🚀
rasa-worker_1      | RasaException: Failed to find input channel class for 'rasa_audiocodes.AudiocodesInput'. Unknown input channel. Check your credentials configuration to make sure the mentioned channel is not misspelled. If you are creating your own channel, make sure it is a proper name of a class in a module.
rasa-production_1  | Starting Rasa X in production mode... 🚀

Rasa x (without this changes) is working fine, but I’d rally like use this channel (audiocodes).

Can you help me, please?

Thanks a lot!

@nonola no this is Dockerfile-compose.yml for me, only action server detained should be mentioned check the rasa x documentation for creating action server image.

@nik202

But where do I insert this code?

@nonola you need to mention audiocodes in the requirements.txt

@nik202,

Do you have time for a quick meeting? I’ve got your email, can I send you an invitation?

@nonola not right now please may be evening? will let you know.

1 Like

@nik202

Sure, no problem! I’ll be waiting!

Thanks

Hi @nik202

Are you available? Do you have 10minutes?

Thanks

@nonola I guess you need to check your mail???

1 Like

@nonola all good? everything sorted?

Hi @nik202 ,

It worked well. But really have to connect it to rasa-x. I need to use rasa-x because of my coleagues, but at the same time, running rasa_audiocodes…

I’m struggling with that… :frowning:

for Rasa X? means you are able to run with ROS but not with Rasa X right??? that your current high priority issue?

Right?