RASA RocketChat outgoing webhook issue not receiving any message

Hello everyone! I’m currently trying to integrate RASA with Rocket.Chat on my private cloud VM. Both RASA and Rocket.Chat are running smoothly, although I haven’t installed SSL yet. I followed the instructions provided by the Apps.Rasa repository and the RASA connectors documentation.

However, I’m facing an issue where I’m not receiving any response from RASA when I send a message from the user (admin) through Rocket.Chat. Strangely, I am able to communicate with RASA using the rasa interactive command. It seems that the Rocket.Chat Outgoing Webhook Integration is not functioning as expected. I’m wondering if I’m missing any crucial steps or if there’s an error in my approach.

Currently, I’m using the RASA example after running rasa init, and I’m not utilizing any custom RASA actions at the moment. Here’s the current status of my setup:

RASA STATUS:

  • Rasa Version: 3.6.0
  • Using rasa run -p 5005 --cors ‘*’ --credentials credentials.yml --connector rocketchat
  • Accessing the status via http://:5005/
  • The response is: “Hello from Rasa: 3.6.0”

ROCKETCHAT OUTGOING WEBHOOK STATUS:

  • Accessing the status via http://:5005/webhooks/rocketchat/
  • The response is: {"status":"ok"}

ROCKETCHAT OUTGOING WEBHOOK TEST:

  • Using the following command to test the webhook: curl -X POST -H "Content-Type: application/json" -d '{"message": "Hello"}' http://<IP>:5005/webhooks/rest/webhook
  • The response is: [{"recipient_id":"default","text":"Hey! How are you?"}]

To summarize, I’m encountering difficulties receiving responses from RASA through the Rocket.Chat integration, although RASA itself seems to be working fine. I would greatly appreciate any insights or guidance to resolve this issue.

Thank you in advance for your help!

@stephens

I’ve never used rocket chat or the channel.

  • Is your credentials.yml configured as shown on the rocketchat channel page? Can you show the credentials.yml?
  • When the bot starts, do you see the REST and RocketChat endpoints listed?
  • Are there errors in the rasa debug log associated with the rocket chat channel?
  • Confirm that you can reach the server_url: "https://demo.rocket.chat" endpoint from inside the rasa container with curl or another tool.

Greg

Thanks @stephens for your kind response.

Yes, I have configured it as shown on the Rocket.Chat channel page.

Rasa debug mode logs using rasa run -p 5005 --cors "*" --credentials credentials.yml --connector rocketchat --debug

/                                                  GET                            rasa_core_no_api.hello
/webhooks/rocketchat                               GET                            rasa_core_no_api.rocketchat_webhook.health
/webhooks/rocketchat/webhook                       POST                           rasa_core_no_api.rocketchat_webhook.webhook
2023-06-26 01:01:30 INFO     root  - Starting Rasa server on http://0.0.0.0:5005
2023-06-26 01:01:30 DEBUG    rasa.core.utils  - Using the default number of Sanic workers (1).
2023-06-26 01:01:32 DEBUG    urllib3.connectionpool  - Starting new HTTPS connection (1): api.segment.io:443
2023-06-26 01:01:33 DEBUG    urllib3.connectionpool  - https://api.segment.io:443 "POST /v1/track HTTP/1.1" 200 21
..
...
2023-06-26 01:01:33 DEBUG    rasa.core.tracker_store  - Connected to InMemoryTrackerStore.
2023-06-26 01:02:06 DEBUG    rasa.utils.tensorflow.models  - Loading the model from /tmp/tmpt1jjmlb9/train_TEDPolicy3/ted_policy.tf_model with finetune_mode=False...
2023-06-26 01:02:21 DEBUG    rasa.utils.tensorflow.models  - Finished loading the model.
2023-06-26 01:02:21 DEBUG    rasa.engine.graph  - Node 'rule_only_data_provider' loading 'RuleOnlyDataProvider.load' and kwargs: '{}'.
2023-06-26 01:02:21 DEBUG    rasa.engine.storage.local_model_storage  - Resource 'train_RulePolicy1' was requested for reading.
2023-06-26 01:02:21 DEBUG    rasa.engine.graph  - Node 'select_prediction' loading 'DefaultPolicyPredictionEnsemble.load' and kwargs: '{}'.
2023-06-26 01:02:21 INFO     root  - Rasa server is up and running.
2023-06-26 01:02:21 INFO     root  - Enabling coroutine debugging. Loop id 94704849999392.

and getting the only rasa endpoint

2023-06-26 01:11:55 INFO     root  - Connecting to channel 'rocketchat' which was specified by the '--connector' argument. Any other channels will be ignored. To connect to all given channels, omit the '--connector' argument.
2023-06-26 01:11:55 INFO     root  - Starting Rasa server on http://0.0.0.0:5005
2023-06-26 01:11:57 INFO     rasa.core.processor  - Loading model models/20230624-232629-hard-valuation.tar.gz...
2023-06-26 01:12:45 INFO     root  - Rasa server is up and running.

To confirm the connectivity between Rasa and Rocket.Chat, I used the curl command from within the Rasa virtual environment. Here is the output:

(venv) root@pr_machine:~/rasa# curl -I 192.168.102.109:3000
HTTP/1.1 200 OK
X-Instance-ID: [Instance ID]
X-XSS-Protection: 1
X-Content-Type-Options: nosniff
X-Frame-Options: sameorigin
Content-Security-Policy: [Content Security Policy]
Content-Type: text/html; charset=utf-8
Vary: Accept-Encoding
Date: Sun, 25 Jun 2023 22:03:31 GMT
Connection: keep-alive
Keep-Alive: timeout=5

Why are you using this option?

Something doesn’t sound right when you show that the curl to the REST channel works but then you disable the REST channel by using the --connector option and you can see that the REST channel isn’t starting since it’s missing from the list of endpoints in the debug.

To connect only with RC

You are absolutely correct, and I apologize for my lack of awareness earlier. I retried running the command without the --connector rocketchat option. However, I found a successful solution by redeploying the application on localhost (Windows).

By the way, I faced challenges on the VM due to VPN and other inbound restrictions, as communicated by the infrastructure and cloud support team. Maybe it was the root issue.