Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing porter fails using https://cdn.porter.sh/latest/install-linux.sh #1521

Open
mikkelhegn opened this issue Mar 26, 2021 · 14 comments
Open
Labels
bug Oops, sorry!

Comments

@mikkelhegn
Copy link

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:

  1. Run curl https://cdn.porter.sh/latest/install-linux.sh | bash
  2. See error

Expected behavior

Installation succeeds

@mikkelhegn mikkelhegn added the bug Oops, sorry! label Mar 26, 2021
@mikkelhegn
Copy link
Author

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

@squillace
Copy link

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.

@karolz-ms
Copy link

#1507 here we go again ☺️

@squillace
Copy link

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.

@squillace
Copy link

are you on WSL2, @karolz-ms ?

@karolz-ms
Copy link

#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 #1507 the CDN host name resolved fine but then the binary download failed.

@karolz-ms
Copy link

I was able to install Porter from my WSL2 environment just fine, but that was a couple of weeks ago

@squillace
Copy link

right, thanks! we'll go start yelling all over again once more before we pay to move to another CDN solution. :-|

@carolynvs
Copy link
Member

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

@benc-uk
Copy link

benc-uk commented Apr 5, 2021

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

@benc-uk
Copy link

benc-uk commented Apr 5, 2021

Seems related to Golang and certain DNS records/servers, see golang/go#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! ¯\_(ツ)_/¯

@squillace
Copy link

@carolynvs yes, that's the error

@carolynvs
Copy link
Member

@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.

@carolynvs carolynvs added the 1 - 🍫 Eat chocolate _after_ emergency donuts label Apr 5, 2021
@squillace
Copy link

Yeah @benc-uk double thanks on our part. This particular problem has been irritating us for months.

@carolynvs carolynvs added this to the 1.0 milestone May 10, 2021
@carolynvs carolynvs added stumped 🤷‍♀️ and removed 1 - 🍫 Eat chocolate _after_ emergency donuts labels Oct 7, 2021
@carolynvs carolynvs removed this from the 1.0 milestone Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Oops, sorry!
Projects
No open projects
Status: No status
Development

No branches or pull requests

6 participants