marcbejar
Explore posts from serversCDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Yup! Already managed to connect to the db via WARP. I just had to connect the device my PC to cloudlfare One, and add a policy to the tunnel to allow that device (I used the email method).
The only thing is that in the tutorial it says you can connect the db via:
But the only way I got it working is by setting 127.0.0.1 instead of localhost. Once this done I can use localhost:9210 to acces the db with drizzle, pgAdmin, dbAber, etc... Finally all setted up! :dogekek:
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Next step is to figure out how to connect to the db from the orm i use to run migrations and stuff like this. As @thomasgauvin said first move is to follow the arbitrary TCP guide. Thanks a lot for the support!
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Definitely this was the "issue". I have setted up a cert via openssl and initialized docker with the ssl=on command and int worked!
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
If I find a solution I will post here the steps I needed to follow... Maybe someone finds them util in a future
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
I set up a new VPS with just posgres on localhost:5432. Created a tunnel and configured an Hyperdrive config. Then hinded the hyoerdrive to the same worker and now it stablishes connection.
So now I'm 100% sure the problem is in the docker networking configuration. There is a problem with the services comunicating to each other.
I'm gonna ask for help in some docker compose forums hoping someone can help me, as this is not at all an Hyperdrive problem.
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Ahahah ok thanks. Really apreciate your help. I'm learning a lot of things this days...
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Is this the one I have to follow?
https://developers.cloudflare.com/cloudflare-one/applications/non-http/cloudflared-authentication/arbitrary-tcp/
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Ah nono, what I did is just testing that the adresses I set in the hostnames are the correct ones, just to discard. Now I will try to set what you said of creating a cloudflared-cloudflared
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Let me try all that, as is it a Docker Compose it creates a default network, so maybe is what you are telling.. A gap between the services.
I added a service for pgAdmin, so I will try to create db connections in pgAdmin for localhost:5432 and postgres:5432
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Yup, I'm just switching the HD from the deployed worker in the Dashboard
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
I will check the first one. To check the second one I have already made a NEON db with the same schema and data and binded it to Hyperdrive. It works great. So I think It's not a JS problem i think.
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
So good news, the worker is connecting to the tunnel, but somehow is not returning what i need. Also it seems to route properly to tcp://postgres:5432
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
Ok, I added the loglevel=debug flag to docker compose command, and the debug result of fetching the API that calls the hyperdrive db is the following:
2024-10-20T19:37:46Z DBG GET https://test.myhostname.com/ HTTP/1.1 connIndex=0 content-length=0 event=1 headers={"Accept-Encoding":["gzip, br"],"Cdn-Loop":["cloudflare; loops=1"],"Cf-Access-Jwt-Assertion":["areallylongcode"],"Cf-Connecting-Ip":["2606:4700:3030::"],"Cf-Ipcountry":["XX"],"Cf-Ray":["8d5b76de6c0076ef-LHR"],"Cf-Visitor":["{"scheme":"https"}"],"Cf-Warp-Tag-Id":["4eb41b3b-6616-4254-a300-780b2f295693"],"Cookie":["CF_Authorization=areallylongcode"],"Sec-Websocket-Key":["R0M4NHBESkhkTQ=="],"Sec-Websocket-Version":["13"],"User-Agent":["Cloudflare-Hyperdrive"],"X-Forwarded-For":["2606:4700:3030::"],"X-Forwarded-Proto":["https"]} host=test.myhostname.com ingressRule=0 originService=tcp://postgres:5432 path=/
2024-10-20T19:37:46Z DBG origin connection established connIndex=0 destAddr=tcp://postgres:5432 event=1 ingressRule=0 originService=tcp://postgres:5432
2024-10-20T19:37:46Z DBG proxy stream acknowledged connIndex=0 destAddr=tcp://postgres:5432 event=1 ingressRule=0 originService=tcp://postgres:5432
2024-10-20T19:37:46Z DBG upstream->downstream copy: read tcp 172.18.0.6:44510->172.18.0.5:5432: use of closed network connection connIndex=0 destAddr=tcp://postgres:5432 event=1 ingressRule=0 originService=tcp://postgres:5432
30 replies
CDCloudflare Developers
•Created by marcbejar on 10/19/2024 in #hyperdrive
Tunnel debugging
I'm not able to figure out where to find those logs. Should they be in the Cloudflareone/Logs/Access? It looks all empty there.
30 replies
CDCloudflare Developers
•Created by this_is_wayne on 9/4/2024 in #general-help
CLOUDFLARE ERROR
It happens to me, everytime I reboot the system I have to generate a new connection. Try running this commands win the cli
warp-cli disconnect
warp-cli registration delete
warp-cli registration new
warp-cli connect
11 replies