https://supertokens.com/ logo
Title
n

nkshah2

01/16/2023, 10:10 AM
Hi, Have you set up an instance of SuperTokens core to work with?
You would normally provide a URL for this instance in the backend SDK during initialisation
j

jamesl

01/16/2023, 10:12 AM
How to setup an instance of Supertokens core?
I just did like this
n

nkshah2

01/16/2023, 10:14 AM
Deleting the message since it had your API key, can you confirm that the core instance is up?
r

rp

01/16/2023, 10:16 AM
can you copy the connection URI and navigate to that on your browser?
do you see "Hello" message back?
j

jamesl

01/16/2023, 10:16 AM
Yes
I can see
r

rp

01/16/2023, 10:16 AM
right. So check the backend SDk config
make sure you have set the correct conntionURI in supertokens.init and the right API key
j

jamesl

01/16/2023, 10:19 AM
That's correct.
:/
It works well in dev mode on localhost
r

rp

01/16/2023, 10:19 AM
hmm. The core is working (cause you got the hello back)
but your backend sdk can't reach the core.. that's weird
j

jamesl

01/16/2023, 10:20 AM
but when I deploy the backend on https://api.xxxx.com
frontend is https://xxxx.com
r

rp

01/16/2023, 10:21 AM
do you have some firewall setting in your server that prevents outgoing connections?
double check env vars.
j

jamesl

01/16/2023, 10:22 AM
I hardcoded the env vars for now
r

rp

01/16/2023, 10:22 AM
hmm
Can you see how?
j

jamesl

01/16/2023, 10:25 AM
I used cpanel to deploy this
if so, which port I should open?
I am using managed service, so Idon't think it's firewall problem
r

rp

01/16/2023, 10:35 AM
hmm. Im really not sure what the issue could be. But something on your end is preventing your api process to talk to the supertokens core
the way you have configured the connectionURI and api key seems fine
may i need to open 3567 port on my server?
r

rp

01/16/2023, 11:54 AM
you wouldn't need to
cause you only need to open ports for incoming connections not outgoing
instead, check for firewall settings for outgoing connections
maybe also ssh into your server and run
curl https://prod-700890c1933611edb37a4d2da2eb46c0-us-east-1.aws.supertokens.io:3567/
What do you see?
j

jamesl

01/16/2023, 2:18 PM
absolutely there is problem in firewall
r

rp

01/16/2023, 2:19 PM
hm. So this is probably some issue with your firewall setting. Cause if you try and run this command from your personal computer (like i did), it works
j

jamesl

01/16/2023, 2:19 PM
Yes
r

rp

01/16/2023, 2:19 PM
does the curl command work on your personal machine?
j

jamesl

01/16/2023, 2:20 PM
Yes
surely
r

rp

01/16/2023, 2:20 PM
that means the core is working fine
the fact that your server can't reach it, it means there is some issue with the server's network setting
j

jamesl

01/16/2023, 2:20 PM
ok let me find issue. Thank you so much for your help