Hey guys! So my bot is running on AWS and i’m getting the reply in my browser. But it’s a “http” i.e. it’s not secure port. I need secure port to run with my web app. Whenever I enable the SSL on port 5005 and try to run the bot it gives error and says,
File “/home/ubuntu/.local/lib/python3.6/site-packages/gevent/server.py”, line 256,│
in _tcp_listener │
sock.bind(address) │
OSError: [Errno 98] Address already in use: (‘0.0.0.0’, 5005)
Now when I disable my SSL and run the bot, It runs easily and replies on http call.
So how can I convert this http to https? Any help is appreciated.
actually i want to connect to my app server which is https and rasa bot is http! So it’s saying misaligned data. How do i enable SSL in rasa core? actually no bot is running! This happens when i run bot for 1st time.
Instead of trying to add an SSL cert to Rasa’s “private” API’s I’d recommend using a reverse proxy. You can do this using NGINX or Apache.
You can also create your own HTTP end-point wrapper using Flask and just use the Python API to return responses to your bot. There’s an example of how to do this on this repo.
Usually, the rule of thumb is, redirecting requests from port 80 to 443, rather than setting up HTTPS on the port 80.
As for the reverse proxy, it is a common action to not expose ports different from the default sockets for HTTP and HTTPS. As you will see on the documentation, your app will still run on port 5055, but it will be accessed via NGINX first. This will allow for interesting scenario configurations, being load balancing one of the best implicit benefits.
Thanks @arifchauhan I used ngrok to solve my issue and it’s working already. But my question is it that only works for 8hr and stops after 8hr! Also when i set a subdomain it says you need to pay for it! Is there an open source solution for ngrok?
Ngrok is a development tool. Even though it is a great tool, it is not made for long running processes, even when using the premium account. In addition, since it is not a formal web server (it’s a tunneling program), it is not optimized for load balancing and other perks needed when serving production apps over the internet.
I believe the solution has already been discussed and you just need to configure Nginx, the links I provided have step by step guides. Unfortunately, there’s no magical way of doing this with just one step.
HTTPS , but requested an insecure XMLHttpRequest endpoint ‘http://:5005/conversations/default/respond’. This request has been blocked; the content must be served over HTTPS .
@Akshit as rroa explained, you should run your rasabot on http and use a proxy in between for handling https. On AWS you can use an application load balancer for doing that for you.