Core
Core
Explore posts from servers
CDCloudflare Developers
Created by Core on 8/11/2024 in #general-help
Domain CNAME pointing to Zero trust tunnel gives error: This site can’t provide a secure connection
No description
9 replies
CDCloudflare Developers
Created by Core on 7/16/2024 in #general-help
Zero Trust tunnel is working with the Windows version but not with the Docker image
Hello. I set up a tunnel and installed cloudflared with the windows installer. Everything works fine, but I need to automate the the setup process with Docker. I just followed the instructions. I tried to run the docker image in 2 different ways, but none worked. The status of the tunnel is healthy, but it gives a 502 Bad Getaway error:
error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:4200: connect: connection refused" connIndex=1 event=1 ingressRule=0 originService=http://localhost:4200
error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp 127.0.0.1:4200: connect: connection refused" connIndex=1 event=1 ingressRule=0 originService=http://localhost:4200
This is how I tried to run the cloudflared image
1. docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token my_token

2. docker run --net=host cloudflare/cloudflared:latest tunnel --no-autoupdate run --token my_token
1. docker run cloudflare/cloudflared:latest tunnel --no-autoupdate run --token my_token

2. docker run --net=host cloudflare/cloudflared:latest tunnel --no-autoupdate run --token my_token
By running it the following way:
docker run --net=host -e TUNNEL_URL=http://0.0.0.0:8000 cloudflare/cloudflared:latest tunnel --no-autoupdate run --token my_token
docker run --net=host -e TUNNEL_URL=http://0.0.0.0:8000 cloudflare/cloudflared:latest tunnel --no-autoupdate run --token my_token
The error is a bit different when trying to reach the domain:
Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:4200: connect: connection refused" connIndex=1 event=1 ingressRule=0 originService=http://localhost:4200
Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:4200: connect: connection refused" connIndex=1 event=1 ingressRule=0 originService=http://localhost:4200
It looks like the docker image does not see the localhost, even if I used the --net=host flag
2 replies