PlatformIO Community

[Ubuntu] Remote unit test broken after proxy use


Good day reader,

I am having some trouble with remote unit testing after using it through a proxy. I used ssh to SOCKS proxy to another network and whilst the proxy was active the remote unit testing didn’t work. Not a big deal, however now that I have disable the proxy (and settings) it is still not functioning.

I think that python or PIO somehow saved a wrong DNS entry. This suspicion comes from the following and only error I can find:

[API] ConnectionError: HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /v1/account/login (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fcd36c07bd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)) (incremented retry: max=5, total=5)
Error: [API] Could not connect to PlatformIO API Service. Please try later.

I have tried rebooting, changing /etc/resolv.conf, reloading systemd-resolve and changing DNS settings in the network manager.
I have also tried using PIO from command line as well as in atom and VSCode, non of which are working.

Does somebody have an idea what could be going wrong?

Thank you very much for your time.

Tim van Osch.

I also frequently use an unrelated OpenVPN connection. Perhaps that somehow changed some DNS settings, although I set it up to not use a different DNS.


Fixed, I was looking totally wrong. Will update in a few minutes.

Because the error was popping up in my console I assumed it was my environment reporting the errors. However it apparently was the agent reporting the error.

I am running the agent in a docker container, where the given error is more common. To fix this issue simply change the container its DNS server to something else. Example below (Google’s DNS)

DOCKER_OPTS = --dns --dns