-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Packer on MacOS installed via Homebrew throws x509: certificate signed by unknown authority #6073
Comments
Noted the following differences when running with from Homebrew
from packer.io/downloads.html
|
I can't reproduce. 😕 I tested with the Packer from our downloads page, and it ran a simple Oracle-classic build with no issues. Then I downloaded the Homebrew Packer, and it also built fine. Homebrew seems to recompile Packer from source rather than using the Packer Downloads page, which is why you got the golang version mismatch (note, this was my fault -- I should have released Packer 1.2.2 compiled with golang 1.10 instead of compiled with golang 1.8.1; and I've since fixed this so that the Packer downloaded from our website is in fact compiled with golang 1.10, so there should be no mismatch between the two anymore), but being unable to reproduce the issue with the Homebrew Packer, I'm not sure where to go from here. Are you sure there isn't something weird going on with your config? |
Hmm, in case it helps I'm running macOS High Sierra 10.13.3 |
Ah. We've seen some other weirdness with golang 1.10 and osx High Sierra. What happens if you re-download Packer from our downloads page so you're using the one compiled with 1.10? Does it stop working again? |
The re-downloaded of version 1.2.2 that is now built with go 1.10 has stopped working for me |
Okay, so this sounds like an upstream bug with golang 1.10 and osx High Sierra. Second bug I've seen this week relating to those that is affecting Packer builds. I need to figure out exactly where this bug is and open an issue with golang, if there isn't one already. |
I have similar issue that might be related to this one:
|
This might been fixed by https://golang.org/doc/devel/release.html#go1.10.minor |
wow, what timing, lol |
Here is packer built with go 1.10.1 for darwin. Would appreciate any help in testing if this solves the problem. |
Nope, still get the same error :-( |
unfortunately I'm not able to reproduce this error, either. Will continue investigating. Seems like it might have something to do with your environment. Wonder if any type of VPN client might affect your x509 certs. If that's the case then maybe we can add a flag to skip CA checking |
The issue does seem to be specific to this environment. I've tested on a separate Mac and it works fine. Doing some further digging I think the following golang fix is related golang/go#16532 - Prior to 1.10 golang was only using the Certificates in the "System Roots" keychain, with go 1.10 it also uses the Certificates "System" keychain. So it seems an invalid Certificate in the "System" keychain of this machine is causing the issue. Not a Packer bug, closing the issue. |
Reopening. There must be something Packer specific going on, because Terraform is using the same Oracle Cloud go SDK library, is also built with go 1.10, and I can provision to the same API endpoint without any issues. |
It looks like this issue is only with OSX 10.13.3 and 10.13.4. I can run packer in docker container without any problems. |
@scross01 I'm comparing how terraform constructs the opc client vs how packer does it, and I don't see too much difference. The only difference that might have an effect is the option to skip certificate validation:
Any chance you have that env var set or have the insecure option set in your tf config? |
Double-checked, definitely don't have the insecure option set. |
@scross01 if you've got gdb configured, would you mind telling me the output of
|
|
I am having a similar issue and I have tried rebuilding go and packer from source. The issue appears to be with packer using the System keychain. Terraform is able to connect to ec2 just fine, but packer errors out. In the mean time I can work around it by setting the default CA with overriding |
I have been using Packer 1.2.2 on macOS 10.13.4 installed via homebrew. I have not seen the errors mentioned here on macOS (or Debian Linux 9.x). I believe that one of the macOS updates sometime since Jan 2018 (I forget exactly when) replaced OpenSSL with LibreSSL--this info might prove useful to someone here trying to diagnose things. The output of |
I'm seeing this issue as well on macOS High Sierra (10.13.3). Brew installed, downloaded versions, and from source have the same behavior:
The cert chain that
Though oddly enough I don't see these errors in uk-london-1 (CA root is digicert). Is there a clear way to understand what CA Roots are being used? What's really odd is the dowloaded version of 1.1.3 works fine, however when I built 1.1.3 I see similar issues as newer versions. Is this a regression how |
Getting this issue on every version downloaded from both packer.io and homebrew.bintray.com. Have tried 1.1.3, 1.2.2 and 1.2.5. Same issue on all of them. |
On OSX 10.13.6, I'm seeing these same issues on 1.3.2, but 1.1.3 works fine.
|
Is this still an issue for anyone? |
I've just been fighting with this for the last 3 hours. I finally fixed It though I'm not sure which of my steps actually did it. This was my error any time I combined a
Infuriating. I went thought the process of double checking my config, I even paired down the post processor to nothing more than a
No idea why that was the case and I'm not sure if it was a cumulative effect of upgrading go and all the other changes as well but it works FFS so maybe try that if you're still having issues. For the record i'm on Catalina Thank home-brew Jesus for this win. |
Wow thanks for the details @zetas I will look over our docs about installing via homebrew and try to figure out why we have such a weird path. |
Ah, the path in our docs is to the hashicorp-maintained tap, not the homebrew-maintained one. There are some differences in build flags. I wonder if that's what's going on here. I can look into some differences and see if I can figure out why one works and the other doesn't. For context on why Hashicorp does this, see here: https://github.com/hashicorp/homebrew-tap |
@SwampDragons hi, I have this issue now on my local proxmox server cluster and mac m1. |
Hi there @it-pappa we have a team dedicated to the distribution of the HashiCorp homebrew tap who might be able to better assist and provide guidance on installation issues. I'm going to see about transferring over this issue and encourage you to follow up there. As for your question, "is this known?" are you referring to HashiCorp's official homebrew tap for Packer? |
Hi there I wasn't able to transfer this over to HashiCorp's homebrew repo. Since this is being managed by a separate team I am going to close this issue, and ask that you open an issue on https://github.com/hashicorp/homebrew-tap if you are still having issues. Please keep in mind that the original issue pertains to the community maintained homebrew install of Packer, which may differ from what HashiCorp releases as they just redistribute the signed release binaries from https://releases.hashicorp.com/packer |
The packer builds for MacOS appear to be different depending whether that are obtained from https://packer.io/download vs installing via Homebrew. The Homebrew installed version is throwing SSL certificate errors
x509: certificate signed by unknown authority
. The MacOS version downloaded from packer.io/downloads.html works okay.from homebrew
from packer.io/downloads.html
provisioning continues as expected.
The text was updated successfully, but these errors were encountered: