Hi everyone!
I have just deployed my RASA chatbot in Google Cloud Platform using App Engine, now I want to make my HTML code available in Socket.io .
It works perfectly locally but in GCP server I get this error about authentication, I don´t know how to solve it. Thanks. (I´m using HTTPS)
1 Like
souvikg10
(Souvik Ghosh)
June 15, 2021, 7:27am
2
you might need to open up the firewall to accepts sockets.
I tried to do the following command to open the firewall port:
gcloud compute firewall-rules create default-allow-websockets \
--allow tcp:65080 \
--target-tags websocket \
--description "Allow websocket traffic on port 65080"
It doesn´t change anything, still seeing “Unauthorized”.
This is the URL: https://high-apricot-315919.nw.r.appspot.com/socket.io
souvikg10
(Souvik Ghosh)
June 15, 2021, 9:50am
4
mariasanzs:
65080
I think rasa listens on port 5005
did you add to the app.yaml
network:
session_affinity: true
Sorry, I copied from the stack overflow post but I have used 5005 in my machine.
I also add it to the app.yaml
This is the firewall rule I created:
And this is what I have in my app.yaml
souvikg10
(Souvik Ghosh)
June 15, 2021, 9:59am
6
seems like the rest channel is working fine when i try the rest endpoint.
likely an issue with socket.io and gcp then
Did you add JWT authentication to your credentials.yml in rasa??
No, I didn´t know that I need to add a JWT authentication in credentials.yml.
Can you explain me how to do it?
Thanks for your help
souvikg10
(Souvik Ghosh)
June 15, 2021, 10:05am
8
JWT is optional, i was thinking perhaps you have added in the credentials.yml
and not passing it in the header hence the unauthorized. But i guess that is not the case.
According to this repo: GitHub - o1lab/socket.io-on-gae: Socket.io on Google App Engine
Note: Secure WebSockets are currently not supported by Managed VMs. WebSockets will only work if you load your page over HTTP (not HTTPS).
But this is from 5 years ago. it is possible that Google App Engine does not fully support websockets API.
hmmm okay. so, should I try to use HTTP instead of HTTPS?.
I don´t know what to do hahaha, I just want to deploy my bot with GCP hahaha
souvikg10
(Souvik Ghosh)
June 15, 2021, 11:16am
10
@mariasanzs
well i think i shared my app that uses google cloud run instead
https://rasa-bot-api-m3chhft4la-ue.a.run.app/socket.io
it does work for me, but you need to connect from a front-end with the same kind of socket.io client instead. not using the browser but i dont have the unauthorized access.
The code is here:
souvikg10
(Souvik Ghosh)
June 15, 2021, 11:17am
11
also if you clone this repo:
follow this thread
After much attemp i still failed to deploy but i can see the service in cloud run
I had tried giving auth. user full access control through properties and also icacls /grant Everyone:F /t
[error]
CuFFaz
(Cu F Faz)
November 17, 2021, 11:17am
12
Were you able to resolve the problem? If yes, could you please reinstate as to how you did it.