Looking for some help here, anything
Looking for some help here, anything would be appreciated.
So, I'm trying to self-host some services without opening any ports in my router. I've been trying to do this through cloudflare's tunnels but no luck yet. I keep encountering this error when I enter my website through my subdomain (see image 1).
The tunnel's hostname setup is the following (see image 2). The reason why I've chosen localhost:8080 is because that's where my service is running at the moment, although I don't know if that's correct. When I open localhost:8080 I'm actually able to see my YouTrack service running.
15 Replies
Are there any errors in your tunnels logs: https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/monitor-tunnels/logs/
Cloudflare Docs
Tunnel logs · Cloudflare Zero Trust docs
Tunnel logs record all activity between a cloudflared instance and Cloudflare’s global network, as well as all activity between cloudflared and your …
Yeah, I get this error: ERR Request failed error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp: lookup youtrack on SOME_IP: read udp SOME_OTHER_IP:43727->SOME_IP: i/o timeout" connIndex=1 dest=https://youtrack.MYDOMAIN.xyz/favicon.ico event=0 ip=SOME_IP type=http
To be clear, wherever I put SOME_IP, I'm referring to the same one
That might be DNS lookup failure. Do you have
youtrack
as a part of your config anywhere?Yep, I've got this setup
Sorry meant as a part of your tunnel config. Something is causing cloudflared to want to lookup
youtrack
via DNS which is going to failAhh I see. Uhm, well, the only part that actually refers to
youtrack
is the tunnel name (which is youtrack) and the subdomain in the public hostname (which is also youtrack). Outside of that nothig elseThat is very weird. Random question, have you tried restarting the tunnel?
Yeah, I'm not sure what's going on but I'm also not very familiar with this stuff...
I've restarted it, yeah. I run it through the Docker client but I haven't had much luck with that
Oh wait you are running this through docker?
Correct
Are you by chance using the
youtrack
container name as part of your config instead of localhost and using the default docker network?Hmmm, I'm not sure. I did set the name of the container to be youtrack.
For the config of my service I've been following these instructions https://www.jetbrains.com/help/youtrack/server/youtrack-docker-installation.html#run-youtrack-service where they use the following command:
docker run -it --name <youtrack-server-instance> ^
-v <path to data directory>:/opt/youtrack/data ^
-v <path to conf directory>:/opt/youtrack/conf ^
-v <path to logs directory>:/opt/youtrack/logs ^
-v <path to backups directory>:/opt/youtrack/backups ^
-p <port on host>:8080 ^
jetbrains/youtrack:<version>
I've ran this in the docker client like this (see image)
I didn't change anything related to the docker network, so I guess I'm using the default one.
Sorry, I'm not familiar with what you refer to "curl it". Is there any resource you know of that I can check out that might help me answering you better?
Yep, cloudflared is also running in a container
At the moment I have two containers, the one for cloudflare and the one of youtrack
Container name won't work on default docker network. You need to make a custom docker network to use container names
Oohhhhhhh, it worked! I changed it to
host.docker.internal:8080
and issue is gone.
Thank you so much, folks!