Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-10121

Could not request certificate

    XMLWordPrintable

Details

    • Firefox
    • Monolithic
    • RHEL 7 (x86_64)
    • Coremunity
    • Platform Core KANBAN
    • Needs Assessment
    • Bug Fix
    • Hide
          Rather than create a new exception class when we catch connection
          errors, we should raise the original exception. Previously, this rescue
          block was modified to add additional contextual information to the
          exceptions we were catching to give the user more information around the
          context of failures. Rather than raising the original message, it would
          create a new exception with the additional information.

          This commit simply logs the error with Puppet with the additional
          information, and raises the original caught exception. This saves us
          from errors that stem from different error initializer expectations.
      Show
          Rather than create a new exception class when we catch connection     errors, we should raise the original exception. Previously, this rescue     block was modified to add additional contextual information to the     exceptions we were catching to give the user more information around the     context of failures. Rather than raising the original message, it would     create a new exception with the additional information.     This commit simply logs the error with Puppet with the additional     information, and raises the original caught exception. This saves us     from errors that stem from different error initializer expectations.
    • Needs Assessment

    Description

      Puppet Version: 5.5.17
      Puppet Server Version: 5.3.6
      OS Name/Version: RHEL 7.7

      I am migrating RHEL servers from RHS 5 to 6. Everything is working properly, except for requesting Puppet Certificate. After editing my puppet.conf on my client, and do a puppet agent -t for example, I have error "Error: Could not request certificate: wrong number of arguments (given 1, expected 2)".

      Desired Behavior: Get an actual certificate request

      Actual Behavior: Got the error "Error: Could not request certificate: wrong number of arguments (given 1, expected 2)".

       

      Debug: Selected server from the ca_server setting: [RHS URL]
      Debug: Selected port from the ca_port setting: 8140
      Debug: Creating new connection for [RHS URL]:8140
      Error: Could not request certificate: wrong number of arguments (given 1, expected 2)
      /opt/puppetlabs/puppet/lib/ruby/2.4.0/net/http/exceptions.rb:6:in `initialize'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:322:in `new'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:322:in `rescue in execute_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:306:in `execute_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:186:in `block (2 levels) in do_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:332:in `block in with_connection'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/nocache_pool.rb:15:in `with_connection'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:331:in `with_connection'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:183:in `block in do_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:180:in `upto'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:180:in `do_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/network/http/connection.rb:80:in `get'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:160:in `http_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:139:in `http_get'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:174:in `block in find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:263:in `block in do_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/request.rb:231:in `do_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:263:in `do_request'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/rest.rb:167:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/certificate/rest.rb:12:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/indirector/indirection.rb:198:in `find'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/ssl/host.rb:201:in `certificate'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/ssl/host.rb:329:in `wait_for_cert'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:483:in `wait_for_certificates'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/agent.rb:349:in `run_command'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `block in run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:667:in `exit_on_fail'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:375:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:139:in `run'
      /opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:77:in `execute'
      /opt/puppetlabs/puppet/bin/puppet:5:in `<main>'

       

      Attachments

        Activity

          People

            melissa Melissa Stone
            Hyrla Gauthier HEISS
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Zendesk Support