Closed abotelho-cbn closed 1 year ago
I'm seeing the same error, seems there are some types that fail to generate.
Puppet version: 6.26.0
mod 'katello/candlepin', '12.2.0'
mod 'katello/certs', '15.1.0'
mod 'katello/katello', '21.3.0'
mod 'katello/qpid', '9.1.0'
mod 'theforeman/foreman', '19.2.1'
mod 'theforeman/foreman_proxy', '21.0.0'
mod 'theforeman/foreman_scap_client', '0.4.0'
mod 'theforeman/pulpcore', '5.2.1'
mod 'theforeman/puppet', '16.1.0'
running puppet generate types
shows:
Error: Failed to load custom type 'cert_key_bundle' from '/etc/puppetlabs/code/environments/experimental/modules/certs/lib/puppet/type/cert_key_bundle.rb': uninitialized constant Puppet::Type::File
Did you mean? File
Error: Failed to load custom type 'keystore' from '/etc/puppetlabs/code/environments/experimental/modules/certs/lib/puppet/type/keystore.rb': uninitialized constant Puppet::Type::File
Did you mean? File
Error: Failed to load custom type 'nssdb' from '/etc/puppetlabs/code/environments/experimental/modules/certs/lib/puppet/type/nssdb.rb': uninitialized constant Puppet::Type::File
Did you mean? File
Error: Failed to load custom type 'private_key' from '/etc/puppetlabs/code/environments/experimental/modules/certs/lib/puppet/type/private_key.rb': uninitialized constant Puppet::Parameter::Boolean
Error: Failed to load custom type 'truststore' from '/etc/puppetlabs/code/environments/experimental/modules/certs/lib/puppet/type/truststore.rb': uninitialized constant Puppet::Type::File
Did you mean? File
@abotelho-cbn and @danoe : have you been able to fix this somehow? We are running into the same error here...
Regards, Christian
I think I had restored my foreman server from an earlier snapshot and after another puppet run the issues disappeared. Sorry, i couldn’t be of more help
Sometimes it helps to run puppet types generate
. The exact arguments depend on your environment, see its help page.
I've seen the same on my environment; running the following command on all relevant Puppetservers (we have multiple ones behind a LB) fixed the problem:
puppet generate types --force --environment <environment_name>
The --force
option seemed to be required; otherwise it would complain about uninitialized constant Puppet::Type::File
(as can be seen in https://github.com/theforeman/puppet-certs/issues/388#issuecomment-1071937985)
I am seeing this error as well. Has there been a solution found for the issue yet?
I was able to fix this issue. The problem was that I reinstalled Foreman/Katello without cleaning up the old installation completely before going live with this server, we ran into problems after the first installation. After finishing the FIRST installation the directory /opt/puppetlabs/puppet/cache/foreman_cache_data/ contains the Puppet cache files of all the SSL key passwords, which, in my case, were the passwords of the FIRST installation. I don't know exactly why the passwords didn't get updated during the SECOND installation, maybe because the files were already there and Puppet skipped to create/update them (ensure => present maybe). Running the foreman-installer update process for the first time after the SECOND installation caused the password files used by the Foreman/Katello services (most of them residing in /etc/pki/katello/) being updated with the passwords contained in the old cache files, therefore they were now wrong and caused the commands executed by the foreman-installer to fail!
Fortunately I have a working backup of my server and restored the password files containing the actual passwords. I then updated the Puppet cache files with the passwords of the restored files and ran the foreman-installer again. This time it went trough without a problem.
Here are the cache files and the corresponding actual password files:
/opt/puppetlabs/puppet/cache/foreman_cache_data/ca_key_password -> /etc/pki/katello/private/katello-default-ca.pwd /opt/puppetlabs/puppet/cache/foreman_cache_data/truststore_password-file -> /etc/pki/katello/truststore_password-file /opt/puppetlabs/puppet/cache/foreman_cache_data/keystore_password-file -> /etc/pki/katello/keystore_password-file
I hope this information helps some of you!
Best regards, Christian
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Could not autoload puppet/type/keystore: Could not autoload puppet/provider/keystore/keytool: no such file to load -- puppet_x/certs/provider/keystore (file: /etc/p uppetlabs/code/environments/testutil/modules/certs/manifests/candlepin.pp, line: 118, column: 5) on node testutil.example.com Warning: Not using cache on failed catalog Error: Could not retrieve catalog; skipping run
Hi all, trying to setup Foreman/Katello using the Puppet modules. I've included the foreman and katello classes on my server class, but no dice. The code seems fine. I have no idea why it can't find these files.
Here are the modules I was able to import:
mod 'theforeman-foreman', '19.1.0'
mod 'theforeman-dhcp', '8.0.0'
mod 'theforeman-dns', '9.1.0'
#mod 'theforeman/git', # can't import, collision with existing module
mod 'theforeman-puppetserver_foreman', '2.0.0'
mod 'theforeman-tftp', '7.0.0'
mod 'theforeman-pulpcore', '5.2.0'
mod 'thfeoreman-foreman_proxy', '20.1.0'
#mod 'theforeman/puppet', # can't import, collision with existing module
mod 'katello-katello', '21.2.0'
mod 'katello-foreman_proxy_content', '20.1.0'
mod 'katello-certs', '14.0.0'
mod 'katello-candlepin', '12.1.0'
mod 'katello-qpid', '9.1.0'
Any ideas?