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

Server error 500 after upgrade of Puppet Enterprise 2023.5 to 2023.7 #108

Open
xf7803 opened this issue Jul 22, 2024 · 0 comments
Open

Server error 500 after upgrade of Puppet Enterprise 2023.5 to 2023.7 #108

xf7803 opened this issue Jul 22, 2024 · 0 comments

Comments

@xf7803
Copy link

xf7803 commented Jul 22, 2024

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 8.6.0-1 (agent) 2023.7 (Puppet Enterprise)
  • Ruby: 1:3.0~exp1
  • Distribution: Ubuntu 22.04
  • Module version: 1.1.0

How to reproduce (e.g Puppet code you use)

Everything was working fine with PE 2023.5, but I not have the error after upgrading to PE 2023.7

What are you seeing

When I run puppet on a node, I get the following error
puppet agent -t
Info: Refreshing CA certificate
Info: CA certificate is unmodified, using existing CA certificate
Info: Refreshing CRL
Info: CRL is unmodified, using existing CRL
Info: Using environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Notice: Requesting catalog from xxxxxxxx
Notice: Catalog compiled by xxxxxxxx
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Error executing http request (file: /etc/puppetlabs/code/environments/production/modules/active_directory/manifests/init.pp, line: 16, column: 20) on node xxxxxxxx
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The error happens on the following code line:
$join_password = vault_lookup::lookup('xxxxxxxx', {
'vault_addr' => lookup('vault_lookup::vault_addr'),
'auth_method' => lookup('vault_lookup::auth_method'),
'approle_path_segment' => 'v1/auth/approle/',
'role_id' => lookup('vault_lookup::role_id'),
'secret_id' => lookup('vault_lookup::secret_id'),
'field' => $join_username,
}).unwrap

What behaviour did you expect instead

That the lookup works fine and the execution keep going.

Output log

In pupperserver.log:
2024-07-22T13:06:22.945-04:00 ERROR [qtp2024096493-50090] [puppetserver] Puppet Evaluation Error: Error while evaluating a Function Call, Error executing http request (file: /etc/puppetlabs/code/environments/production/modules/active_directory/manifests/init.pp, line: 16, column: 20) on node xxxxxxxx
2024-07-22T13:06:22.946-04:00 ERROR [qtp2024096493-50090] [puppetserver] Puppet Server Error: Evaluation Error: Error while evaluating a Function Call, Error executing http request (file: /etc/puppetlabs/code/environments/production/modules/active_directory/manifests/init.pp, line: 16, column: 20) on node xxxxxxxx
uri:classloader:/puppetserver-lib/puppet/server/http_client.rb:207:in client_post' uri:classloader:/puppetserver-lib/puppet/server/http_client.rb:79:in post'
/etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet_x/vault_lookup/lookup.rb:165:in get_token' /etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet_x/vault_lookup/lookup.rb:160:in get_approle_auth_token'
/etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet_x/vault_lookup/lookup.rb:70:in lookup' /etc/puppetlabs/code/environments/production/modules/vault_lookup/lib/puppet/functions/vault_lookup/lookup.rb:42:in lookup_opts_hash'

Any additional information you'd like to impart

I verified that the server communicates well on the port (no firewall blocking) and that the approle is working correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant