digitalocean / doctl

The official command line interface for the DigitalOcean API.
https://docs.digitalocean.com/reference/doctl/
Apache License 2.0
3.24k stars 385 forks source link

connect api prompts error cannot assign requested address #947

Open ghost opened 3 years ago

ghost commented 3 years ago

Describe the Issue:

I try to install it via source package from release page, while I execute command on my laptop (Arch Linux), it prompts error info

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

Then I try to install it on DigitalOcean droplet (Ubuntu 20.10), it works well.

But if I install it via pacman package manager on my laptop, the binary file works well.

I don't know what happens.

Environment:

Additional Details:

# doctl account ratelimit --trace

doctl: 2021/01/23 11:29:52 -> "GET /v2/account HTTP/1.1\r\nHost: api.digitalocean.com\r\nUser-Agent: doctl/1.55.0-release (linux amd64) godo/1.57.0\r\nAccept: application/json\r\nAccept-Encoding: gzip\r\n\r\n"
scotchneat commented 3 years ago

@MaxdSre thank you for reporting the issue. The message you receive is the same others have reported in #845. Are you receiving the error when running doctl auth init and do you happen to be connected to a VPN at the time?

jeremy-rutman commented 3 years ago

I also hit

root@master:/home/ubuntu/tm_scrape_wipo# doctl compute droplet list 
Error: Get "https://api.digitalocean.com/v2/droplets?page=1&per_page=200": dial tcp: lookup api.digitalocean.com on [::1]:53: read udp [::1]:38657->[::1]:53: read: connection refused

No vpn involved.