Rasa Webchat works locally, not on network or EC2 server

I am using the following react Widget “rasa-webchat-josh” code to test a bot on a server

I have added the socket.io connection details in credentials.yml

I am launching the rasa server with

rasa run --debug --cors “*”

It works fine from my chrome browser on my local machine. However, when connecting to it from the another device on my network the client does not connect to Rasa on the backend - on the browser, the page is blank and shows the error [net::err_connection_refused] however the rasa server does not show any connection attempt.

Ultimately I want to serve this from an AWS EC2 instance, however when setup from there I get the same situation described above.

I have read through many of the other posts here regarding similar issues, but nothing has yet solved my issue. Let me know what other information might be useful to help me. Thanks for reading!

A good way to see if it is the specific socket channel causing the issue is by also setting up the REST channel and seeing if you can ping it. It’s possible that maybe your instance where you’re running it is not available to the outside world, you have the wrong port, or something like that.