doctl icon indicating copy to clipboard operation
doctl copied to clipboard

Error when on VPN

Open FreeTheSmoke opened this issue 4 years ago • 6 comments

Attempting to authenticate with API token using 'doctl auth init' was not possible when on my VPN (Service:Private Internet Access. Server:Melbourne, Aus) it prompts for entry of the token, but after that it just spews thousands of lines of junk. I saw cloudflare written somewhere amongst it all and after dropping the VPN, and authenticating with token, VPN can be used again.

Blasting a whole webpage, including images onto the stdout is not super helpful, could you maybe detect the use of CLI Client and change the behavior to a short, helpful message?

FreeTheSmoke avatar Jul 29 '20 11:07 FreeTheSmoke

I have the same error problem. This is the error message:

Error: Get "https://api.digitalocean.com/v2/account": dial tcp: lookup api.digitalocean.com on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address

Disabling VPN resolves the issue.

bkiac avatar Nov 10 '20 15:11 bkiac

Are you able to access api.digitalocean.com at all with your VPN enabled (e.g. using curl)? Or does this only effect doctl?

andrewsomething avatar Nov 10 '20 15:11 andrewsomething

Yes, it only affects doctl.

$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer $DO_TOKEN" "https://api.digitalocean.com/v2/account"
{"account":{"droplet_limit":10,"floating_ip_limit":3,"volume_limit":10,"email":"<my email>","uuid":"<my uuid>","email_verified":true,"status":"active","status_message":""}}

$ doctl account get
Error: Get "https://api.digitalocean.com/v2/account": dial tcp: lookup api.digitalocean.com on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address

bkiac avatar Nov 10 '20 15:11 bkiac

@FreeTheSmoke & @bkiac can you share which OS you're using?

scotchneat avatar Nov 10 '20 18:11 scotchneat

My OS is Pop!_OS 20.04 LTS and my VPN is ExpressVPN 3.0.2.12.

bkiac avatar Nov 10 '20 18:11 bkiac

This may be related to https://github.com/golang/go/issues/25321.

bentranter avatar Dec 15 '20 17:12 bentranter