hiera-editor
hiera-editor copied to clipboard
Error when starting program on Windows 10 using Puppet Agent 6.0.4
When I start Hiera Editor I get this error message:
Failed to install modules
Error: 1 Unable to load puppet. Please install it using native packages for your platform (eg .deb, .rpm, .dmg, etc).
puppet --version returned pid 9200 exit 1
C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/spec_set.rb:87:in `block in materialize': Could not find thor-0.20.3 in any of the sources (Bundler::GemNotFound)
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/spec_set.rb:81:in `map!'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/spec_set.rb:81:in `materialize'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/definition.rb:170:in `specs'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/definition.rb:237:in `specs_for'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/definition.rb:226:in `requested_specs'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/runtime.rb:108:in `block in definition_method'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/runtime.rb:20:in `setup'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler.rb:107:in `setup'
from C:/Users/John/AppData/Local/Programs/hiera-editor/resources/app.asar.unpacked/ruby/bundler/gems/bundler-2.0.1/lib/bundler/setup.rb:20:in `<top (required)>'
from C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
from C:/Program Files/Puppet Labs/Puppet/puppet/lib/ruby/2.5.0/rubygems/core_ext/kernel_require.rb:59:in `require'
This is after I've followed the setup wizard but failed to authorize on the last step when I got the error Error: Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: puppet.myserver.org. is not in the cert's altnames: DNS:puppet, DNS:puppet
.
I'm running this version of Puppet:
PS C:\Users\John> puppet --version
6.0.4
PS C:\Users\John> echo $LASTEXITCODE
0
PS C:\Users\John> pdk --version
1.9.1
PS C:\Users\John>
Thank you for your interest in the project. I will look that up in the nearest future.
The modules install fine when I test on Ubuntu 18.04 using hiera-editor-0.1.5-x86_64.AppImage. However after the module installation I still get the Error [ERR_TLS_CERT_ALTNAME_INVALID]: Hostname/IP does not match certificate's altnames: Host: puppet.myserver.org. is not in the cert's altnames: DNS:puppet, DNS:puppet
error.
john@johns-linuxnotebook:~$ lsb_release --all
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
john@johns-linuxnotebook:~$ puppet --version
6.0.5
john@johns-linuxnotebook:~$
Hiera Editor does not depend (and thus not require) on an agent on the system as it uses internal puppet agent (6.1.0 i think). The issue I see is your Puppet master server machine's hostname
hasn't been configured properly and Puppet Master presents itself as simply puppet
instead of puppet.myserver.org
.
Please try edit /etc/puppetlabs/puppet/puppet.conf
on you Puppet Master like this:
[main]
environment = ...
server = puppet.myserver.org
And also don't forget to add puppet.myserver.org
to /etc/hosts
file.
You would probably need to also reissue all certs.
Thanks for your help! To quickly proceed I installed a new Puppet Master with the FQDN set to only puppet
now instead of puppet.myserver.org
. Now I don't get this error so I believe this is solved, but now I instead on step 6 get this error Error: Error: unable to verify the first certificate
.
My /etc/puppetlabs/puppet/puppet.conf file contains:
[main]
certname = puppet
server = puppet
..
The cert is signed properly on the Master.
Haha you got it in reverse. The problem with your configuration that the certificate's Common Name of your puppet master and the domain name you are connecting to now do not match.
You have to redo all of this with hostname of the machine set to puppet.myserver.org
AND with [main] .. server = puppet.myserver.org
.
Then, upon connecting to the Puppet Master via puppet.myserver.org
the certificate of the server will match. Also, assuming you have Puppet Agent and Puppet Master installed on a same machine, you'd have to also add 127.0.0.1 puppet.myserver.org
to hosts file so the agent will connect easily.
An important side note that puppet.myserver.org
has to be a valid FQDN available for DNS to resolve.
Once you'll do all of this, you'd have to regenerate certificates (and got forbid, PuppetDB).
And only then Hiera Editor would be able to request a certificate for itself.