https://supertokens.com/ logo
SSL issue with the core
a

Aquamarine

04/25/2023, 9:06 PM
Hey hey ! I'm currently implementing supertokens and its been deployed to a kubernetes cluster (helm package for backend - helm package for core - postgre). But when i'm requesting my backend I get this error and I think it's the backend not talking well with the core. postman body:
Error: write EPROTO 08BC62B9597F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:<br><br>    at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Stack trace in backend:
at WriteWrap.onWriteComplete [as oncomplete] (node:internal/stream_base_commons:94:16)
Error: write EPROTO 08BC62B9597F0000:error:0A00010B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:354:
Looks like some SSL problems but all comunications between my backend middlewares and the core is quite opaque. Anyone faced the same problem or have an idea ?
r

rp

04/26/2023, 5:27 AM
hey @Aquamarine the core doesn't support SSL based connections yet. So you need to add a
http://..
url in the connectionUri in the backend SDK. If you want to have SSL for the core, you can add something like an nginx in front of the core which accepts ssl connections, and then reverse proxies to the core.
a

Aquamarine

04/26/2023, 8:34 AM
Thanks for your answer it indeed works ! I was passing the internal cluster DNS resolution name to the
connectionURI: <service_name>.<k8s_namespace>:<port>
init which was
supertokens.supertokens-core:3567
Since I did not pass any protocol, shouldn't the backend module default to HTTP and not HTTPS when contacting the core ?
r

rp

04/26/2023, 8:35 AM
well.. it's a reusable function that adds https if it's not localhost, or some IP address.