Skip to content

🐛 Failed to request quick Tunnel may caused by program internal nameserver(detection?) #793

Description

@zhangjing-GitHub-Code

Describe the bug
(maybe i should ask this in termux...)
I use cloudflared on Termux, Android 12
when i run ./cloudflare tunnel --url ..., it logs

❯ ./cloudflared tunnel --url ssh://localhost:8022 --proxy-dns-address 0.0.0.0
2022-10-27T12:26:36Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that these account-less Tunnels have no uptime guarantee. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps

2022-10-27T12:26:36Z INF Requesting new quick Tunnel on trycloudflare.com... 
failed to request quick Tunnel: Post "https://api.trycloudflare.com/tunnel": dial tcp: lookup api.trycloudflare.com on [::1]:53: read udp [::1]:58253->[::1]:53: read: connection refused

It seems like the cloudflared thinks nameserver is ::1, but $PREFIX/etc/resolv.conf contains:

nameserver 9.9.9.9
nameserver 114.114.114.114
nameserver 8.8.8.8
nameserver 8.8.4.4

And nslookup can get correct ip address of api.trycloudflare.com.

❯ nslookup api.trycloudflare.com                
Server:         9.9.9.9                         
Address:        9.9.9.9#53                                                                      
Non-authoritative answer:                       
Name:   api.trycloudflare.com                   
Address: 104.17.124.55                          
Name:   api.trycloudflare.com                   
Address: 104.17.123.55

To Reproduce
Steps to reproduce the behavior:

  1. Run './cloudflared tunnel' (in termux v0.118.0)
  2. See error

If it's an issue with Cloudflare Tunnel:
but not with account(I logined my account but I use tunnel without account)
3. Tunnel ID :
4. cloudflared config:

Expected behavior
The program can get api.trycloudflare.com's ip address then create my tunnel.

Environment and versions

  • OS: [Termux 0.118.0 on Android 12(vivo Y77)]
  • Architecture: [aarch64]
  • Version: [0.118.0]

Logs and errors
up there.

Additional context
none

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority: NormalMinor issue impacting one or more usersType: BugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions