Rasa action server not responding using ngrok and rocketchat

Hello. My bot used to work fine, it just suddenly stopped working.

Both action and core server are up, and I have an API that connects to rocket chat and do stuff. The bot acquires lock for conversation Ngrok sends the request, but the action server does not respond

I dont know what to do. Tried everything, my endpoints are right

@vapdev please share rasa --version?

Its 2.6.2

@vapdev on which port rasa server is running and action server? and can you share the snippet code for rocket chat where you have mentioned socket path or its just a action server not working?

Rasa is 5005, Action 5055. Its just the action server not working, i dont set any socket path

@vapdev Ok check endpoints.yml file mentioned IP its 127.0.0.1 update with 0.0.0.0 I guess it should work?

@vapdev Even check rasa server is running on port 5000 and you telling 5005 I am suggesting as per shared images.

I tried changing the ip to 0.0.0.0 but remains the same. It is running on 5005

I tried before running locally without ngrok and rocket chat, in rasa shell, and the actions server responds. I wonder if it might be some network block or something

@vapdev strange, did you updated the ngrok, hope you authenticate token for ngrok ?

Yes, ngrok is up to date.

I found the rocket chat logs:

I20211203-17:51:38.215(0) server.js:204 Integrations ➔ Outgoing WebHook.error Error for the Integration “ikaroBot” to http://1d16-187-95-111-170.ngrok.io/webhooks/custom_rocketchat/webhook is:

I20211203-17:51:38.217(0) server.js:204 Integrations ➔ Outgoing WebHook.error Error: failed [504]     at Object.exports.makeErrorByStatus (packages/http.js:176:10)     at Request._callback (packages/http.js:140:24)     at Request.self.callback (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:185:22)     at Request.emit (events.js:311:20)     at Request.EventEmitter.emit (domain.js:482:12)     at Request.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1161:10)     at Request.emit (events.js:311:20)     at Request.EventEmitter.emit (domain.js:482:12)     at IncomingMessage.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1083:12)     at Object.onceWrapper (events.js:417:28)     at IncomingMessage.emit (events.js:323:22)     at IncomingMessage.EventEmitter.emit (domain.js:482:12)     at endReadableNT (_stream_readable.js:1204:12)     at processTicksAndRejections (internal/process/task_queues.js:84:21) {   response: {     statusCode: 504,     content: '',     headers: {       date: 'Fri, 03 Dec 2021 17:51:38 GMT',       'cache-control': 'no-cache',       pragma: 'no-cache',       'content-type': 'text/html; charset="UTF-8"',       'content-length': '0',       via: 'HTTP/1.1 forward.http.proxy:3128',       connection: 'close'     },     data: null   } } 
I20211203-17:51:38.218(0) server.js:204 Integrations ➔ Outgoing WebHook.error Error for the Integration "ikaroBot" to http://1d16-187-95-111-170.ngrok.io/webhooks/custom_rocketchat/webhook is: 
I20211203-17:51:38.219(0) server.js:204 Integrations ➔ Outgoing WebHook.error {   statusCode: 504,   content: '',   headers: {     date: 'Fri, 03 Dec 2021 17:51:38 GMT',     'cache-control': 'no-cache',     pragma: 'no-cache',     'content-type': 'text/html; charset="UTF-8"',     'content-length': '0',     via: 'HTTP/1.1 forward.http.proxy:3128',     connection: 'close'   },   data: null } 
I20211203-17:51:45.168(0) server.js:204 Integrations ➔ Outgoing WebHook.error Error for the Integration "ikaroBot" to http://1d16-187-95-111-170.ngrok.io/webhooks/custom_rocketchat/webhook is: 
I20211203-17:51:45.170(0) server.js:204 Integrations ➔ Outgoing WebHook.error Error: failed [504]     at Object.exports.makeErrorByStatus (packages/http.js:176:10)     at Request._callback (packages/http.js:140:24)     at Request.self.callback (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:185:22)     at Request.emit (events.js:311:20)     at Request.EventEmitter.emit (domain.js:482:12)     at Request.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1161:10)     at Request.emit (events.js:311:20)     at Request.EventEmitter.emit (domain.js:482:12)     at IncomingMessage.<anonymous> (/app/bundle/programs/server/npm/node_modules/meteor/http/node_modules/request/request.js:1083:12)     at Object.onceWrapper (events.js:417:28)     at IncomingMessage.emit (events.js:323:22)     at IncomingMessage.EventEmitter.emit (domain.js:482:12)     at endReadableNT (_stream_readable.js:1204:12)     at processTicksAndRejections (internal/process/task_queues.js:84:21) {   response: {     statusCode: 504,     content: '',     headers: {       date: 'Fri, 03 Dec 2021 17:51:45 GMT',       'cache-control': 'no-cache',       pragma: 'no-cache',       'content-type': 'text/html; charset="UTF-8"',       'content-length': '0',       via: 'HTTP/1.1 forward.http.proxy:3128',       connection: 'close'     },     data: null   } } 
I20211203-17:51:45.170(0) server.js:204 Integrations ➔ Outgoing WebHook.error Error for the Integration "ikaroBot" to http://1d16-187-95-111-170.ngrok.io/webhooks/custom_rocketchat/webhook is: 
I20211203-17:51:45.171(0) server.js:204 Integrations ➔ Outgoing WebHook.error {   statusCode: 504,   content: '',   headers: {     date: 'Fri, 03 Dec 2021 17:51:45 GMT',     'cache-control': 'no-cache',     pragma: 'no-cache',     'content-type': 'text/html; charset="UTF-8"',     'content-length': '0',     via: 'HTTP/1.1 forward.http.proxy:3128',     connection: 'close'   },   data: null }

But i dont understand

@vapdev did you build custom channel or using mentioned web hook rocketchat ref: RocketChat

Try check with localhost first that its running or not, then use ngrok ?

@vapdev check also credentials.yml of http or https ?

rocketchat:
  user: "yourbotname"
  password: "YOUR_PASSWORD"
  server_url: "https://demo.rocket.chat"

if custom you need to change rocketchat to custom ?

Always mention @ and nik202 for fast reply.

Thanks.

@vapdev I will recommend to check the complete installation process of rocketchat if you are using npm node module and mentor etc.

1 Like

Ok. thanks for the help so far. I’ve seen more people having this kind of problem, but with slack instead of rocket chat.

Please mark Nik’s answer as solution if it helped you :slight_smile:

I just found out what was going on. My chatbot was connected to a tracker store, mongodb cloud that does not exist anymore. I got no error messages or such, but the bot would not respond. I just commented the tracker store lines in the credentials and it started working again

1 Like

Check if you have a working data base linked to the tracker store, or just comment it and use in memory tracker store. Also try turning off your firewall, or even change to another connection and see if that may work.