Cannot view conversations from Slack in Rasa X

Hi,

I deployed my bot on Slack and now people is able to chat with it. However I don’t display these conversations in my Rasa X UI.

The only correlated documentation that I could find about it is this:

To view conversations that happen on these channels in Rasa X, you need to connect your channel to Rasa by editing the credentials.yml file mounted to the rasa-production and the rasa-worker containers. For detailed instructions on how to do this for your relevant channel, you can head over here. If you have previously connected a channel to Rasa, this step is no different from it. (link)

But it’s not quite clear about what I have to do, and the “here” link sends to the general page of external applications which doesn’t say anything about it. Anyone can help me?

Are you using a local or server install?

When you use the Talk to your bot feature in Rasa X, do you see those conversations on the Conversations screen?

Hi @stephens, thank you for your help. I’m using a local install and making it public with ngrok.

I tried the Talk to your bot and didn’t appear in the Conversations screen. Also, if I click on Share the bot, I get the local link and I text with it from there, I don’t see the conversation.

However, if I start ngrok on port 5002 and I replace the ngrok link to http://localhost:5002, then I use that link for making tester talk with the bot, I do see the conversations.

Tiziano, there’s a RabbitMQ message broker that is used to pass the conversations from Rasa to Rasa X. You should see this in your docker-compose file and the default setting uses port 5432. I wonder if this port is blocked so that the conversations aren’t getting to Rasa X.

1 Like

Hi @stephens, thank you for your answer, but can you clarify it a bit more? Where can I access my docker-compose file? (I thought I don’t need docker if I’m running it in local) If it is as you say, shouldn’t I be unable to see any conversation at all? Instead, as I told you, if I share my bot to testers from the Share button in Rasa X, making the link public with ngrok, I can see the conversations.

Also, I’m not sure I did all I had to do for enabling Slack to send messages to Rasa X, in fact I have not clear what it says here:

To view conversations that happen on these channels in Rasa X, you need to connect your channel to Rasa by editing the credentials.yml file mounted to the rasa-production and the rasa-worker containers. For detailed instructions on how to do this for your relevant channel, you can head over here . If you have previously connected a channel to Rasa, this step is no different from it. (link )

What are rasa-production and rasa-worker containers?

UPDATE: I ran my bot on Slack to check what was happening on port 5432 and saw that the port was not used at all.

What are rasa-production and rasa-worker containers?

Those are for server mode, they do not apply here – in this case you just need to edit the credentials.yml in your local project directory.

When you run rasa x, it runs the UI on port 5002 and the rasa server on the normal port 5005. I think the problem is that you are using ngrok on your rasa x port (5002) and not your rasa port (5005). You want ngrok to reroute the requests to the rasa server, not the rasa x one. So to clarify:

  1. run ngrok on 5005
  2. rasa x
  3. slack url for event subscription should look like http://ngrok_url/webhooks/slack/webhook
1 Like

Hi @erohmensing, thanks for your answer.

I’m actually running ngrok on 5005 already: image

And I also assured to put all the URLs in Slack correctly. In fact I can talk with my bot on Slack. The only problem is that I’m not getting the conversations in Rasa X.

Hm, okay. I’m not sure about that then, I’d have to look further into it. Local mode isn’t really meant for production use, but rather more for demos and local development, while server mode is meant for serving a bot.

Do you have anything custom in your endpoints.yml?

1 Like

@erohmensing no, I just have this:
action_endpoint: url: "http://localhost:5055/webhook"

Ok, I see. The final goal is indeed to use the server mode, but at this step I just wanted to try the bot with testers before going to production. But if it’s needed I will proceed to switch to the server mode. Do you have any tip? I had a look at the docs but I have not clear where to start. Thank you again

Sorry, it’s possible that I was wrong and that the endpoint is actually 5002, i’m looking here: https://rasa.com/docs/rasa-x/connect-to-external-channels/#testing-on-your-local-computer-with-ngrok which suggests you use it on 5002. Sorry, I don’t have much local mode experience :grinning_face_with_smiling_eyes:so you can try that first

For server mode, I would start here with installation: https://rasa.com/docs/rasa-x/deploy/#installation if you can get a supported server (ubuntu 16 or 18 or debian 9), it should be quite simple setup with the installation script.

@erohmensing what you said in the first message is the same that is written in the page you linked, that is, rasa x runs on port 5002 and ngrok for connecting external channels should run on port 5005. I cannot try it right now, but I don’t think I can run both on the same port.

Thank you anyway for your help!

@stephens don’t you have any other idea for solving my problem? I would really need to test my bot with users as soon as possible…

Can you shutdown ngrok, connect to http://localhost:5002, use Talk to your bot and see the conversations?

@stephens if you mean this section:

no, I can’t see the conversations. But from what I understood it should be supposed to be so, since Talk to your bot is Interactive Learning and it wouldn’t make much sense to revise it a second time.

By the way, if I share the bot from here:

I do can see the conversations.

I tried to run ngrok on port 5002 and couldn’t connect Rasa to Slack. It seems that the only port that works is 5005 (as written in the docs).

By the way, when I launch the command rasa run and then in an other window rasa x, the second one (regardless the order I launch them) shows the error:

OSError: [Errno 10048] error while attempting to bind on address ('0.0.0.0', 5005): only one usage of each socket address (protocol/network address/port) is normally permitted

And I don’t understand why, since rasa x runs on port 5002, not 5005

Here’s a video showing the conversations screen. It sounds like you have port conflicts on your system.

@stephens Can you help me solving the conflict? Cause I don’t understand what I’m doing wrong. I have Rasa x running on port 5002, the action server on port 5055 and Slack on port 5005 which is also the same as Rasa server.

Hello Tiziano, did you manage to fix your problem ?