2

I have a puppet server running inside a docker container with port 8140 being passed to 32779. Leaving me with a puppet server running on localhost:32779.

I then edit my /etc/puppetlabs/puppet/puppet.conf and add the following:

[agent]
server = localhost:32779

Then I run puppet agent --test which returns:

Error: Could not request certificate: Failed to open TCP connection to puppet:8140 (getaddrinfo: Name or service not known)

Since I specified port 32779 I'm confused as to why puppet is looking to connect on 8140?

Is it not possible to specify the port?

Note: I'm trying to connect to the container from my main system which is running Docker. But when I run this docker container , which is an agent, it seems to connect. Yet I can't connect directly.


Edit:

Running puppet agent --test --server_list localhost:32779 results in:

WARN: Unresolved specs during Gem::Specification.reset:
      hiera (< 4, >= 2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Warning: Could not select a functional puppet master
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Info: Retrieving pluginfacts
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Info: Retrieving plugin
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Error: Could not retrieve catalog from remote server: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Error: Could not send report: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)

Edit #2:

Full output from command puppet agent --test --server_list localhost:32779 --verbose --debug:

WARN: Unresolved specs during Gem::Specification.reset:
      hiera (< 4, >= 2.0)
WARN: Clearing out unresolved specs.
Please report a bug if this causes problems.
Debug: Applying settings catalog for sections main, agent, ssl
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Failed to load library 'selinux' for feature 'selinux'
Debug: Using settings: adding file resource 'confdir': 'File[/home/philip/.puppetlabs/etc/puppet]{:path=>"/home/philip/.puppetlabs/etc/puppet", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'codedir': 'File[/home/philip/.puppetlabs/etc/code]{:path=>"/home/philip/.puppetlabs/etc/code", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'vardir': 'File[/home/philip/.puppetlabs/opt/puppet/cache]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[/home/philip/.puppetlabs/var/log]{:path=>"/home/philip/.puppetlabs/var/log", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statedir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/state]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/state", :mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'rundir': 'File[/home/philip/.puppetlabs/var/run]{:path=>"/home/philip/.puppetlabs/var/run", :mode=>"755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'libdir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/lib]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/lib", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'preview_outputdir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/preview]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/preview", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/certs]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/certs", :mode=>"755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[/home/philip/.puppetlabs/etc/puppet/ssl]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl", :mode=>"771", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'publickeydir': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/public_keys]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/public_keys", :mode=>"755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/certificate_requests]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/certificate_requests", :mode=>"755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/private_keys]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/private_keys", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/private]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/private", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostcert': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/certs/admin2klic-hp-elitebook-8560p.2klic.pem]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/certs/admin2klic-hp-elitebook-8560p.2klic.pem", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostprivkey': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/private_keys/admin2klic-hp-elitebook-8560p.2klic.pem]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/private_keys/admin2klic-hp-elitebook-8560p.2klic.pem", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostpubkey': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/public_keys/admin2klic-hp-elitebook-8560p.2klic.pem]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/public_keys/admin2klic-hp-elitebook-8560p.2klic.pem", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'localcacert': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/certs/ca.pem]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/certs/ca.pem", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostcrl': 'File[/home/philip/.puppetlabs/etc/puppet/ssl/crl.pem]{:path=>"/home/philip/.puppetlabs/etc/puppet/ssl/crl.pem", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'statefile': 'File[/home/philip/.puppetlabs/opt/puppet/cache/state/state.yaml]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/state/state.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'transactionstorefile': 'File[/home/philip/.puppetlabs/opt/puppet/cache/state/transactionstore.yaml]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/state/transactionstore.yaml", :mode=>"660", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/client_yaml]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'client_datadir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/client_data]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/clientbucket]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunfile': 'File[/home/philip/.puppetlabs/opt/puppet/cache/state/last_run_summary.yaml]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/state/last_run_summary.yaml", :mode=>"644", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'lastrunreport': 'File[/home/philip/.puppetlabs/opt/puppet/cache/state/last_run_report.yaml]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/state/last_run_report.yaml", :mode=>"640", :ensure=>:file, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'graphdir': 'File[/home/philip/.puppetlabs/opt/puppet/cache/state/graphs]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/state/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'pluginfactdest': 'File[/home/philip/.puppetlabs/opt/puppet/cache/facts.d]{:path=>"/home/philip/.puppetlabs/opt/puppet/cache/facts.d", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Failed to load library 'shadow' for feature 'libshadow'
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Failed to load library 'cfpropertylist' for feature 'cfpropertylist'
Debug: Failed to load library 'shadow' for feature 'libshadow'
Debug: Failed to load library 'cfpropertylist' for feature 'cfpropertylist'
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/state]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/lib]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/preview]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/certs]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/public_keys]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/certificate_requests]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/private_keys]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/private]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/certs/admin2klic-hp-elitebook-8560p.2klic.pem]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl/certs]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/private_keys/admin2klic-hp-elitebook-8560p.2klic.pem]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl/private_keys]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/public_keys/admin2klic-hp-elitebook-8560p.2klic.pem]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl/public_keys]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/certs/ca.pem]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl/certs]
Debug: /File[/home/philip/.puppetlabs/etc/puppet/ssl/crl.pem]: Adding autorequire relationship with File[/home/philip/.puppetlabs/etc/puppet/ssl]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/state/state.yaml]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache/state]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/state/transactionstore.yaml]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache/state]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/client_yaml]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/client_data]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/clientbucket]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/state/last_run_summary.yaml]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache/state]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/state/last_run_report.yaml]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache/state]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/state/graphs]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache/state]
Debug: /File[/home/philip/.puppetlabs/opt/puppet/cache/facts.d]: Adding autorequire relationship with File[/home/philip/.puppetlabs/opt/puppet/cache]
Debug: Finishing transaction 24399340
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Runtime environment: puppet_version=4.10.0, ruby_version=2.3.1, run_mode=agent, default_encoding=UTF-8
Debug: Using cached certificate for ca
Debug: Using cached certificate for admin2klic-hp-elitebook-8560p.2klic
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Loaded state in 0.00 seconds
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: node supports formats: pson yaml binary
Debug: Using cached certificate for ca
Debug: Using cached certificate for admin2klic-hp-elitebook-8560p.2klic
Debug: Creating new connection for https://localhost:32779
Debug: Using cached certificate_revocation_list for ca
Debug: Starting connection for https://localhost:32779
Warning: Could not select a functional puppet master
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: node supports formats: pson yaml binary
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Info: Retrieving pluginfacts
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: file_metadata supports formats: pson yaml binary
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: file_metadata supports formats: pson yaml binary
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Debug: Finishing transaction 35878660
Info: Retrieving plugin
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: file_metadata supports formats: pson yaml binary
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate': Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: file_metadata supports formats: pson yaml binary
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Error: /File[/home/philip/.puppetlabs/opt/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppet:///plugins: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Debug: Finishing transaction 36864320
Debug: Evicting cache entry for environment 'production'
Debug: Caching environment 'production' (ttl = 0 sec)
Debug: Loading external facts from /home/philip/.puppetlabs/opt/puppet/cache/facts.d
Debug: Facter: Found no suitable resolves of 1 for ec2_metadata
Debug: Facter: value for ec2_metadata is still nil
Debug: Facter: value for agent_specified_environment is still nil
Debug: Facter: value for lsbrelease is still nil
Debug: Facter: Found no suitable resolves of 1 for ec2_metadata
Debug: Facter: value for ec2_metadata is still nil
Debug: Facter: Found no suitable resolves of 1 for ec2_userdata
Debug: Facter: value for ec2_userdata is still nil
Debug: Facter: Found no suitable resolves of 1 for processor
Debug: Facter: value for processor is still nil
Debug: Facter: value for cfkey is still nil
Debug: Facter: value for ipaddress6_br_2f267500abbb is still nil
Debug: Facter: value for ipaddress6_br_f91b6c0af8c5 is still nil
Debug: Facter: value for ipaddress6_docker0 is still nil
Debug: Facter: value for ipaddress6_enp0s25 is still nil
Debug: Facter: value for ipaddress6_lo is still nil
Debug: Facter: value for macaddress_lo is still nil
Debug: Facter: value for ipaddress_veth9119469 is still nil
Debug: Facter: value for ipaddress6_veth9119469 is still nil
Debug: Facter: value for netmask_veth9119469 is still nil
Debug: Facter: value for ipaddress_veth7239ec2 is still nil
Debug: Facter: value for ipaddress6_veth7239ec2 is still nil
Debug: Facter: value for netmask_veth7239ec2 is still nil
Debug: Facter: value for ipaddress_veth7249d6f is still nil
Debug: Facter: value for ipaddress6_veth7249d6f is still nil
Debug: Facter: value for netmask_veth7249d6f is still nil
Debug: Facter: value for ipaddress_veth738d899 is still nil
Debug: Facter: value for ipaddress6_veth738d899 is still nil
Debug: Facter: value for netmask_veth738d899 is still nil
Debug: Facter: value for ipaddress_vethca47805 is still nil
Debug: Facter: value for ipaddress6_vethca47805 is still nil
Debug: Facter: value for netmask_vethca47805 is still nil
Debug: Facter: value for ipaddress_vethcbb2c83 is still nil
Debug: Facter: value for ipaddress6_vethcbb2c83 is still nil
Debug: Facter: value for netmask_vethcbb2c83 is still nil
Debug: Facter: value for ipaddress_wlo1 is still nil
Debug: Facter: value for ipaddress6_wlo1 is still nil
Debug: Facter: value for netmask_wlo1 is still nil
Debug: Facter: value for sshdsakey is still nil
Debug: Facter: value for sshdsakey is still nil
Debug: Facter: value for sshfp_dsa is still nil
Debug: Facter: value for sshrsakey is still nil
Debug: Facter: value for sshrsakey is still nil
Debug: Facter: value for sshfp_rsa is still nil
Debug: Facter: value for sshecdsakey is still nil
Debug: Facter: value for sshecdsakey is still nil
Debug: Facter: value for sshfp_ecdsa is still nil
Debug: Facter: value for sshed25519key is still nil
Debug: Facter: value for sshed25519key is still nil
Debug: Facter: value for sshfp_ed25519 is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_enforced
Debug: Facter: value for selinux_enforced is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_policyversion
Debug: Facter: value for selinux_policyversion is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_current_mode
Debug: Facter: value for selinux_current_mode is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_config_mode
Debug: Facter: value for selinux_config_mode is still nil
Debug: Facter: Found no suitable resolves of 1 for selinux_config_policy
Debug: Facter: value for selinux_config_policy is still nil
Debug: Facter: Found no suitable resolves of 2 for swapencrypted
Debug: Facter: value for swapencrypted is still nil
Debug: Facter: Found no suitable resolves of 1 for xendomains
Debug: Facter: value for xendomains is still nil
Debug: Facter: Found no suitable resolves of 1 for gce
Debug: Facter: value for gce is still nil
Debug: Facter: value for network_veth9119469 is still nil
Debug: Facter: value for network_veth7239ec2 is still nil
Debug: Facter: value for network_veth7249d6f is still nil
Debug: Facter: value for network_veth738d899 is still nil
Debug: Facter: value for network_vethca47805 is still nil
Debug: Facter: value for network_vethcbb2c83 is still nil
Debug: Facter: value for network_wlo1 is still nil
Debug: Facter: Found no suitable resolves of 2 for iphostnumber
Debug: Facter: value for iphostnumber is still nil
Debug: Facter: value for vlans is still nil
Debug: Facter: Found no suitable resolves of 1 for zonename
Debug: Facter: value for zonename is still nil
Debug: Facter: value for zpool_version is still nil
Debug: Facter: ruby-augeas not available
Debug: Facter: value for augeasversion is still nil
Debug: Facter: value for is_rsc is still nil
Debug: Facter: value for is_rsc is still nil
Debug: Facter: Found no suitable resolves of 1 for rsc_region
Debug: Facter: value for rsc_region is still nil
Debug: Facter: value for is_rsc is still nil
Debug: Facter: Found no suitable resolves of 1 for rsc_instance_id
Debug: Facter: value for rsc_instance_id is still nil
Debug: Facter: value for lsbminordistrelease is still nil
Debug: Facter: value for zfs_version is still nil
Debug: Facter: Found no suitable resolves of 1 for system32
Debug: Facter: value for system32 is still nil
Debug: Facter: value for ipaddress6 is still nil
Debug: Failed to load library 'msgpack' for feature 'msgpack'
Debug: Puppet::Network::Format[msgpack]: feature msgpack is missing
Debug: catalog supports formats: pson yaml dot binary
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Error: Could not retrieve catalog from remote server: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Debug: Creating new connection for https://puppet:0
Debug: Starting connection for https://puppet:0
Error: Could not send report: Failed to open TCP connection to puppet:0 (getaddrinfo: Name or service not known)
Philip Kirkbride
  • 249
  • 2
  • 10
  • 30
  • Somewhat related. https://serverfault.com/questions/708256/puppet-masterport Not really as much of a dup as I first though. – Zoredache Apr 24 '17 at 18:40
  • What happens if you run `puppet agent --test --server_list localhost:32779`? – Shane Madden Apr 24 '17 at 19:51
  • 1
    Are you sure it is resolving the hostname? getaddrinfo is a DNS error. – Aaron Copley Apr 24 '17 at 19:53
  • @ShaneMadden I updated my question with the output from --test --server_list – Philip Kirkbride Apr 24 '17 at 19:58
  • @PhilipKirkbride Something's happening before the `Warning: Could not select a functional puppet master` line where it's deciding the master is invalid for some reason (try `curl -k https://localhost:32779` to verify network connectivity through docker) - adding `--verbose` or `--debug` to your command should produce some more details. – Shane Madden Apr 24 '17 at 20:09
  • @ShaneMadden I see the port is open with `nmap` but when I use `curl -k https://localhost:32779` I get back a 404. I guess the problem is with my docker container? – Philip Kirkbride Apr 24 '17 at 20:14
  • @PhilipKirkbride No, a 404 is good (that's not a valid API path) - so that means the puppet master's reachable, and doesn't explain the "could not select a functional master" error - so, try `puppet agent --test --server_list localhost:32779 --verbose --debug` which will spew a ton of output, look for anything mentioning localhost:32779. – Shane Madden Apr 24 '17 at 20:17
  • @ShaneMadden update with full output from `puppet agent --test --server_list localhost:32779 --verbose --debug` – Philip Kirkbride Apr 24 '17 at 20:38
  • 1
    @PhilipKirkbride I expected something after `Debug: Starting connection for https://localhost:32779` but there's nothing there to tell us why the connection failed. One thing that I didn't expect and may be a hint, is that it's loading a cached certificate (which it shouldn't have if it's never connected to this master) - has this client connected to a different master? Does emptying the `$ssldir` (probably /etc/puppetlabs/puppet/ssl) after backing it up give us different connection behavior? – Shane Madden Apr 24 '17 at 21:56
  • Have you tried setting masterport, yet? Works fine for me. `sudo puppet agent -t --server localhost --masterport 32779` attempts correctly and fails (because I have no service listening.) – Aaron Copley Apr 25 '17 at 07:18

1 Answers1

3

https://docs.puppet.com/puppet/latest/configuration.html#masterport

masterport

The port for puppet master traffic. For puppet master, this is the port to listen on; for puppet agent, this is the port to make requests on. Both applications use this setting to get the port.

So try setting the master port under your agent section with a value of 32779.

Zoredache
  • 128,755
  • 40
  • 271
  • 413