porter
porter copied to clipboard
Installing porter fails using https://cdn.porter.sh/latest/install-linux.sh
Describe the bug
I'm using the install script from here: https://porter.sh/install/ --> Linux: curl https://cdn.porter.sh/latest/install-linux.sh | bash
Gettingthis error: Error: error downloading https://cdn.porter.sh/mixins/atom.xml Please include the following information in any bug reports: PORTER_TRACE: porter/v0.36.0 porter_trace_1616753337183160100 : Get https://cdn.porter.sh/mixins/atom.xml: dial tcp: lookup cdn.porter.sh on 172.23.192.1:53: cannot unmarshal DNS message
To Reproduce
Steps to reproduce the behavior:
- Run
curl https://cdn.porter.sh/latest/install-linux.sh | bash
- See error
Expected behavior
Installation succeeds
Me trying stuff...
I can install Porter if I leave out the mixin and plugin installations.
Trying to install a specific mixin version fails
> porter mixin install exec --url https://cdn.porter.sh/mixins/exec/v0.36.0/exec-linux-amd64
Error: error downloading https://cdn.porter.sh/mixins/exec/v0.36.0/exec-linux-amd64/latest/exec-linux-amd64
Please include the following information in any bug reports:
PORTER_TRACE: porter/v0.36.0 porter_trace_1616754006196973200 : Get https://cdn.porter.sh/mixins/exec/v0.36.0/exec-linux-amd64/latest/exec-linux-amd64: dial tcp: lookup cdn.porter.sh on 172.23.192.1:53: cannot unmarshal DNS message
if you're having this problem in WSL, there is a workaround: https://gist.github.com/coltenkrauter/608cfe02319ce60facd76373249b8ca6. it's horrible, but it works.
WSL team is trying to fix this, but it is a reasonably hairy networking dance they have to do so it might take a bit.
https://github.com/getporter/porter/issues/1507 here we go again ☺️
it's a nightmare but the WSL error is really a pain. :sigh: you would not believe the conversation we are having with Azure storage support on that one.
are you on WSL2, @karolz-ms ?
https://github.com/getporter/porter/issues/1507 was not with WSL2, and the error was different, but it is in the same ballpark: essentially Porter installation script is trying to download some bits from the CDN and fails. In this case it seems like the DNS is in a bad state and CDN host name cannot be resolved. In https://github.com/getporter/porter/issues/1507 the CDN host name resolved fine but then the binary download failed.
I was able to install Porter from my WSL2 environment just fine, but that was a couple of weeks ago
right, thanks! we'll go start yelling all over again once more before we pay to move to another CDN solution. :-|
Thanks for reporting that error. @squillace is this exact error due to WSL2? I have never seen it before and I'm not sure if I should escalate it as well to Azure support or if it's something else.
cannot unmarshal DNS message
Definitely seems related to WSL2
I just installed in an Azure Cloud shell just fine with the CDN bash script. When I try in WSL2 (Ubuntu 20.04) I get the same error Get https://cdn.porter.sh/mixins/atom.xml: dial tcp: lookup cdn.porter.sh on 172.22.160.1:53
it's kinda weird, I'm going through my collection of installer scripts for a whole set of different tools, sdks etc, all of which run fine in WSL2, except Porter :(
I ran dig to see if there was anything wrong with DNS and it looks the same in WSL2 and cloudshell, in WSL2 it resolves just fine
$ dig +short cdn.porter.sh
portercdn.azureedge.net.
portercdn.afd.azureedge.net.
star-azureedge-prod.trafficmanager.net.
dual.t-0009.t-msedge.net.
t-0009.t-msedge.net.
Edge-Prod-LON21r3.ctrl.t-0009.t-msedge.net.
standard.t-0009.t-msedge.net.
13.107.246.19
13.107.213.19
And trying to wget or curl the file https://cdn.porter.sh/mixins/atom.xml also works in WSL2 just fine
Seems related to Golang and certain DNS records/servers, see https://github.com/golang/go/issues/44135
It's trivial to reproduce in Go just by calling net.LookupHost("cdn.porter.sh")
, but if you try it with a different hostname like "example.net" it's fine. Setting this env var GODEBUG=netdns=cgo
fixes it and I no longer get any error for "cdn.porter.sh" but adding that to the install script seemed to have no effect
I wonder what is different about the Netlify DNS 🤔
I just tried with a quick site created on Netlify admiring-noyce-3afd82.netlify.app
, and the resolves fine in DNS using net.LookupHost
so yeah I'm outta ideas! ¯\_(ツ)_/¯
@carolynvs yes, that's the error
@benc-uk Thanks for the details! I will look into that further and see what can be changed in how dns is compiled in our binaries to fix it.
Yeah @benc-uk double thanks on our part. This particular problem has been irritating us for months.