ERR Unable to lookup protocol

When I run cloudflared-linux-amd64 tunnel --config ./.cloudflared/config2.yml run
I get
ERR Unable to lookup protocol. Defaulting to `http2`. If this fails, you can set `--protocol h2mux` in your cloudflared command. error="lookup protocol-v2.argotunnel.com on xx.xx xx.xx:xx: read udp xx.xx.xx.xxx:xxxx->xx.xx.xx.xxx:xxx: i/o timeout"

More info:

Starting tunnel tunnelID=xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
2021-12-18T06:01:25Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]
2021-12-18T06:01:25Z INF Version 2021.11.0
2021-12-18T06:01:25Z INF GOOS: linux, GOVersion: devel +a84af465cb Mon Aug 9 10:31:00 2021 -0700, GoArch: amd64
2021-12-18T06:01:25Z INF Settings: map[config:./.cloudflared/config2.yml]
2021-12-18T06:01:25Z 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-12-18T06:01:25Z INF Generated Connector ID: 1xxxxxxxxxxxxxxxxxxxxx
2021-12-18T06:01:27Z WRN Your version 2021.11.0 is outdated. We recommend upgrading it to 2021.12.1
2021-12-18T06:01:35Z ERR Unable to lookup protocol. Defaulting to `http2`. If this fails, you can set `--protocol h2mux` in your cloudflared command. error="lookup protocol-v2.argotunnel.com on xxxxxxxxx: read udp xxxxxxxx->xxxxxxxx: i/o timeout"
2021-12-18T06:01:35Z INF Initial protocol http2
2021-12-18T06:01:35Z INF Starting metrics server on 127.0.0.1:35497/metrics
2021-12-18T06:01:37Z INF Connection xxxxxxxxxxxxxxxxxxxxx registered connIndex=0 location=SIN
2021-12-18T06:01:38Z INF Connection xxxxxxxxxxxxxxxxxxx registered connIndex=1 location=BOM
2021-12-18T06:01:40Z INF Connection xxxxxxxxxxxx registered connIndex=2 location=SIN
2021-12-18T06:01:40Z INF Connection xxxxxxxxxxxxxxxxx registered connIndex=3 location=BOM
2021-12-18T06:02:09Z ERR  error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:8080: connect: connection refused" cfRay=xxxxxxxxxxxxxxxxx originService=http://localhost:8080
2021-12-18T06:02:10Z ERR  error="Unable to reach the origin service. The service may be down or it may not be responding to traffic from cloudflared: dial tcp [::1]:8080: connect: connection refused" cfRay=xxxxxxxxxxxxxxx originService=http://localhost:8080

my config:

tunnel: xxxx                                                                    
     credentials-file: xxxxxxxxxxxxxxxxxxxxx.json                     
     ingress:                                                                        
       - hostname: xxxx.xxxxxxxxxxx.com                                         
         service:  http://127.0.0.1:80                                               
       - service: http_status:404

This line looks to be a problem:

2021-12-18T06:01:25Z INF Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]

I suggest you use a full path for the --config flag.

There are 2 parts here as far as I can see:

  1. the failure to look up a TXT DNS record is causing a non fatal error; cloudflared still proceeds. as to why your system cannot dig a TXT record from protocol-v2.argotunnel.com is something only you can tell us :slight_smile:

  2. cloudflared is trying to proxy requests to β€œ[::1]:8080”, but you have a config that is redirecting to port 80; the root cause is likely what @sdayman pointed to: you did not pass the config file correctly to cloudflared
    note that this is the fatal error, not 1)

1 Like

This problem is no more, but I don’t do any change.