Cloudflare Tunnel not working from config.yml

I’m struggling to make Cloudflare Tunnel to work. It looks there is no issue with the tunnel or my internal network, because I can make it work when running from command-line. For example, if try to run my application like this:

cloudflared tunnel --url http://192.168.88.40:80

It works fine (using the random URL it provides to me). But when I run it like this:

cloudflared tunnel run mytunnel

With a config.yml like this:

url: http://192.168.88.40:80
tunnel: 56ca124e-dc47-4d84-a62c-0186f47b60cc
credentials-file: /root/.cloudflared/56ca124e-dc47-4d84-a62c-0186f47b60cc.json
procotol: http2

It simply doesn’t work. When I try to access the tunnel from my URL, I get the error 500 response:

HTTP/2 500 
date: Wed, 13 Oct 2021 12:25:53 GMT
content-length: 0
cache-control: private, no-store
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=Y2ZfSJ8ZFU%2Fo3kN5GVj%2FsDwyR%2BuAx0bLTE0HmUsERx1s2A4s%2F%2FfSQvjrhRsshiGHBRwfc22%2Fq9sgTZUTobwVcJ7u4pi5Gv1pSvrYlwtWTNvu7R6M2IsyLSqM3CD5TTKZjo83"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 69d88d9da934eefe-MIA
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400

I don’t know what else to look for. Does anyone have an idea of how to debug or what should I look for to solve this issue?

Your tunnel 56ca124e-dc47-4d84-a62c-0186f47b60cc hasn’t been connected since 2021-10-13T00:34:10 (UTC).

At the time of the request above 13 Oct 2021 12:25:53 GMT it should have failed because the origin was unreachable (since cloudflared was not connected at the time).

@nuno.diegues Thank you for your response.
I’m running the tunnel just for testing from the command-line and then I turn it off. The tunnel was connected at the time I tested, otherwise I would receive an error 1033, isn’t it?

Error 1033 is something that’d show up in the body of the response. The HTTP status code would still be a 5xx.

Well, to bring the discussion back to the original issue, I left the tunnel running now. I can see in teams it’s running:

The output of tunnel execution:

[email protected]:~/.cloudflared# ./cloudflared tunnel run landgraf2
2021-10-13T13:30:51Z INF Starting tunnel tunnelID=56ca124e-dc47-4d84-a62c-0186f47b60cc
2021-10-13T13:30:51Z INF Version 2021.10.0
2021-10-13T13:30:51Z INF GOOS: linux, GOVersion: devel +a84af465cb Mon Aug 9 10:31:00 2021 -0700, GoArch: amd64
2021-10-13T13:30:51Z INF Settings: map[cred-file:/root/.cloudflared/56ca124e-dc47-4d84-a62c-0186f47b60cc.json credentials-file:/root/.cloudflared/56ca124e-dc47-4d84-a62c-0186f47b60cc.json]
2021-10-13T13:30:51Z INF cloudflared will not automatically update when run from the shell. To enable auto-updates, run cloudflared as a service: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps/run-tunnel/run-as-service
2021-10-13T13:30:51Z INF Generated Connector ID: d3dd0bb1-0aa1-4372-ba18-de543c74e108
2021-10-13T13:30:51Z INF Initial protocol http2
2021-10-13T13:30:51Z INF Starting metrics server on 127.0.0.1:37721/metrics
2021-10-13T13:30:51Z INF Connection e5412388-49d1-4232-92fe-07bef56bbc22 registered connIndex=0 location=GIG
2021-10-13T13:30:52Z INF Connection cfaa3e6f-ead0-463e-8d77-64f368b2cd49 registered connIndex=1 location=CWB
2021-10-13T13:30:53Z INF Connection 182d9381-c545-4e21-8cc5-ceaf8d2384c4 registered connIndex=2 location=GIG
2021-10-13T13:30:54Z INF Connection 9b217328-92c3-4d95-b33a-7ca85feaad4e registered connIndex=3 location=CWB

The config.yml:

tunnel: 56ca124e-dc47-4d84-a62c-0186f47b60cc
credentials-file: /root/.cloudflared/56ca124e-dc47-4d84-a62c-0186f47b60cc.json

ingress:
  - hostname: omv2.landgraf.dev
    service: http://192.168.88.40:80
  - service: http_status:404

And the response from a GET request to https://omv2.landgraf.dev:

$ curl -I https://omv2.landgraf.dev
HTTP/2 500 
date: Wed, 13 Oct 2021 13:35:03 GMT
content-length: 0
cache-control: private, no-store
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
report-to: {"endpoints":[{"url":"https:\/\/a.nel.cloudflare.com\/report\/v3?s=b%2BX0%2FoyN0M6y05e2uG1yK9atILvPYKqbNd7qSsOR%2F5tVm1O12qbnhIZFRGvRuMei8dGi%2FYjKHnO%2ByEnQx0RBjRCDd0TbLvO%2FCIYAYkxzzVS0xVx5eUP7Z9%2BRUMaFqwxepGiWhw%3D%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
server: cloudflare
cf-ray: 69d8f2ebcdd602b6-MIA
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400, h3-28=":443"; ma=86400, h3-27=":443"; ma=86400

Btw, here is the response from a GET request to https://omv.landgraf.dev (the previous test, the tunnel is not running now). You can see the response headers and even status code is very different:

$ curl -I https://omv.landgraf.dev
HTTP/2 530 
date: Wed, 13 Oct 2021 13:34:58 GMT
content-type: text/html; charset=UTF-8
x-frame-options: SAMEORIGIN
referrer-policy: same-origin
cache-control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
expires: Thu, 01 Jan 1970 00:00:01 GMT
cf-ray: 69d8f2cf4db80331-MIA
server: cloudflare

Agreed — your config looks good, and now I saw your tunnel up, but it still ends up with a failed request.

Have you opened a support ticket for this already so that we can look into it?

1 Like

@nuno.diegues I don’t think I’m entitled to it, I’m on a free plan.

You can email in: support AT cloudflare DOT com

As soon as you get the autoreply, post the ticket # here.

1 Like

Thank you @sdayman, here is the ticket number: 2279944.

1 Like

@sdayman The ticket has been marked as closed automatically, probably because of the free plan.

@nuno.diegues can reopen it when he looks into it.

1 Like

We got it. Thanks.

4 Likes

Hi @nuno.diegues and @sdayman do you have any news regarding this issue? My support ticket was marked as solved right away, but then I waited to see if something happened there or here. But it’s still silent.

I’m not privy to the details of how the tickets are handled (particularly depending on the plan you may have, e.g. free).

In this specific case, there was indeed a problem — which was affecting only free plans as far as I was told, and also I believe it had to be new accounts — and the team was working to fix it.

Are you still facing the issue? I can see that it was marked as fixed internally.

3 Likes

Thank you. It looks like it’s working now, indeed. Your help is really appreciated.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.