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

Use of server_list can cause misleading agent errors

    XMLWordPrintable

    Details

    • Template:
      PUP Bug Template
    • Acceptance Criteria:
      Hide

      Agent should be logging server connection failures, including which server as well as the returned error message.

      Show
      Agent should be logging server connection failures, including which server as well as the returned error message.
    • Team:
      Coremunity
    • Sprint:
      Platform Core KANBAN
    • Release Notes:
      Enhancement
    • Release Notes Summary:
      Hide
      When running in debug mode, puppet will print the exception that caused it to skip an entry in the "server_list" setting.
      Show
      When running in debug mode, puppet will print the exception that caused it to skip an entry in the "server_list" setting.

      Description

      The issue:

      the "server_urls" configuration setting can mask server-side issues by mistakingly pointing to a connectivity issue on port 0:

      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2) for nil port 0
      

      Replication:

      Configure an agent to connect to a master with the server_list setting:

      [agent]
      #server = pe-201724-master.puppetdebug.vlan
      server_list = pe-201724-master.puppetdebug.vlan:8140
      

      Revoke the agent's certificate on the master and observe the error on the next agent run:

      Actual result:

      Warning: Could not select a functional puppet master
      Warning: Unable to fetch my node definition, but the agent run will continue:
      Warning: Connection refused - connect(2) for nil port 0
      Info: Retrieving pluginfacts
      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2) for nil port 0
      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Connection refused - connect(2) for nil port 0
      Info: Retrieving plugin
      Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': Connection refused - connect(2) for nil port 0
      Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Connection refused - connect(2) for nil port 0
      Info: Loading facts
      Error: Could not retrieve catalog from remote server: Connection refused - connect(2) for nil port 0
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      Error: Could not send report: Connection refused - connect(2) for nil port 0
      

      Expected result:

      Change the agent's configuration to use the "server" setting and observe the difference. The error points more clearly to an SSL issue:

      Warning: Unable to fetch my node definition, but the agent run will continue:
      Warning: SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      Info: Retrieving pluginfacts
      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      Error: /File[/opt/puppetlabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      Info: Retrieving plugin
      Error: /File[/opt/puppetlabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      Error: /File[/opt/puppetlabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      Info: Loading facts
      Error: Could not retrieve catalog from remote server: SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      Warning: Not using cache on failed catalog
      Error: Could not retrieve catalog; skipping run
      Error: Could not send report: SSL_connect SYSCALL returned=5 errno=0 state=unknown state
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              melissa Melissa Stone
              Reporter:
              erik.hansen Erik Hansen
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support