Jira (PUP-8419) Agent's node request fails if environment directory doesn't exist locally

20 views
Skip to first unread message

Josh Cooper (JIRA)

unread,
Feb 7, 2018, 5:44:03 PM2/7/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Puppet / Bug PUP-8419
Agent's node request fails if environment directory doesn't exist locally
Change By: Josh Cooper
Summary: Puppet-Run WARNING after upgrading to 5.3.4 Agent's node request fails if environment directory doesn't exist locally
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.5.1#75006-sha1:7df2574)
Atlassian logo

Josh Cooper (JIRA)

unread,
Feb 7, 2018, 11:05:04 PM2/7/18
to puppe...@googlegroups.com

Kenn Hussey (JIRA)

unread,
Feb 8, 2018, 1:15:07 PM2/8/18
to puppe...@googlegroups.com

Josh Cooper (JIRA)

unread,
Feb 8, 2018, 2:35:03 PM2/8/18
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8419
 
Re: Agent's node request fails if environment directory doesn't exist locally

If you're using server_list for HA, then puppet will think all of the servers are down, and will eventually try to connect to the server on port 0, see PUP-8037.

Jacob Helwig (JIRA)

unread,
Feb 9, 2018, 11:50:03 AM2/9/18
to puppe...@googlegroups.com
Jacob Helwig updated an issue
 
Change By: Jacob Helwig
Release Notes Summary: Puppet apply no longer attempt to enforce the server-side requirements around environment directories when retrieving its node information from the server. Previously, this check could cause multiple catalog retrievals for a single run.
Release Notes: Bug Fix

Eric Delaney (JIRA)

unread,
Feb 9, 2018, 2:41:04 PM2/9/18
to puppe...@googlegroups.com
Eric Delaney commented on Bug PUP-8419
 
Re: Agent's node request fails if environment directory doesn't exist locally

Tested:

Without ENC

We are happy, when the server has the enviroment, but we don't have one on the agent:

$ bundle exec puppet agent -t --environment var --server dr8ab7o97efo4ds.delivery.puppetlabs.net
Info: Using configured environment 'var'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Caching catalog for macbook-pro-2.local
Info: Applying configuration version '1518204454'
Notice: Applied catalog in 0.01 seconds
$

With ENC

SERVER:
[root@dr8ab7o97efo4ds environments]# tail -2 /etc/puppetlabs/puppet/puppet.conf
node_terminus = exec
external_nodes = /tmp/enc.sh
[root@dr8ab7o97efo4ds environments]# cat /tmp/enc.sh
#!/bin/bash
 
echo "---"
echo "environment: thing"
exit 0
[root@dr8ab7o97efo4ds environments]#

Here is the agent output, noticed that I changed the enc to a new environment 'crazy' for the second run.

AGENT:
✔ ~/work/my_repos/puppet [:327b03a9e ↑·32|⚑ 1]
11:36 $ bundle exec puppet agent -t  --environment thing --server dr8ab7o97efo4ds.delivery.puppetlabs.net
Info: Using configured environment 'thing'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Caching catalog for macbook-pro-2.local
Info: Applying configuration version '1518204993'
Notice: Applied catalog in 0.01 seconds
✔ ~/work/my_repos/puppet [:327b03a9e ↑·32|⚑ 1]
11:36 $ bundle exec puppet agent -t  --server dr8ab7o97efo4ds.delivery.puppetlabs.net
Notice: Local environment: 'production' doesn't match server specified node environment 'crazy', switching agent to 'crazy'.
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Retrieving locales
Info: Caching catalog for macbook-pro-2.local
Info: Applying configuration version '1518205038'
Notice: Applied catalog in 0.01 seconds
✔ ~/work/my_repos/puppet [:327b03a9e ↑·32|⚑ 1]

Eric Delaney (JIRA)

unread,
Feb 9, 2018, 2:42:06 PM2/9/18
to puppe...@googlegroups.com
Eric Delaney updated an issue
 
Change By: Eric Delaney
QA Risk Assessment: Needs Assessment Manual

Kenn Hussey (JIRA)

unread,
Feb 14, 2018, 1:02:04 PM2/14/18
to puppe...@googlegroups.com

David Alexander (JIRA)

unread,
Jul 11, 2018, 5:59:03 AM7/11/18
to puppe...@googlegroups.com
David Alexander commented on Bug PUP-8419
 
Re: Agent's node request fails if environment directory doesn't exist locally

 I have replicated this issue on Windows 2016, running Puppet Agent 5.5.2.

puppet.conf:

[main]
autoflush=true
manage_internal_file_permissions=false
[agent]
certname = da-stg-win-01.ternsoftware.local
server_list = puppet.ternsoftware.local:8140

Output from puppet agent -t and puppet --version:

PS C:\Users\puppet> puppet agent -t
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 :0 (The requested address is not valid in its context. - connect(2) for nil po
rt 0)
Info: Retrieving pluginfacts
Error: /File[C:/ProgramData/PuppetLabs/puppet/cache/facts.d]: Failed to generate additional resources using 'eval_genera
te': Failed to open TCP connection to :0 (The requested address is not valid in its context. - connect(2) for nil port 0
)
Error: /File[C:/ProgramData/PuppetLabs/puppet/cache/facts.d]: Could not evaluate: Could not retrieve file metadata for p
uppet:///pluginfacts: Failed to open TCP connection to :0 (The requested address is not valid in its context. - connect(
2) for nil port 0)
Info: Retrieving plugin
Error: /File[C:/ProgramData/PuppetLabs/puppet/cache/lib]: Failed to generate additional resources using 'eval_generate':
{{ Failed to open TCP connection to :0 (The requested address is not valid in its context. - connect(2) for nil port 0)}}
Error: /File[C:/ProgramData/PuppetLabs/puppet/cache/lib]: Could not evaluate: Could not retrieve file metadata for puppe
t:///plugins: Failed to open TCP connection to :0 (The requested address is not valid in its context. - connect(2) for n
il port 0)
Info: Loading facts
Error: Could not retrieve catalog from remote server: Failed to open TCP connection to :0 (The requested address is not
valid in its context. - 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: Failed to open TCP connection to :0 (The requested address is not valid in its context. -
connect(2) for nil port 0)
PS C:\Users\puppet> puppet --version
5.5.2
PS C:\Users\puppet>

This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Josh Cooper (JIRA)

unread,
Jul 11, 2018, 12:09:06 PM7/11/18
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8419

This bug had to do with the agent requiring a directory to exist locally based on its environment. The corresponding error message when this occurred was "Could not find a directory environment named 'foobar' anywhere in the path". This bug is fixed.

The "Failed to open TCP connection to :0" issue is PUP-8037. If the agent exhausts its server_list, then it will fallback to trying to connect on port 0, which obviously fails.

Breno Fernandes (JIRA)

unread,
Nov 28, 2019, 4:22:06 PM11/28/19
to puppe...@googlegroups.com

I can still replicate this issue on puppet 6 on el8.

Red Hat Enterprise Linux release 8.1 (Ootpa)

puppet --version
6.9.0

This is the puppet.conf file I am using:

[main]
http_compression = true
pluginsync = true
node_terminus = exec
external_nodes = /path-to-my/enc.sh
usecacheonfailure = false

 

If I "manually" create the directory of that dynamic environment locally (under its default location), it works.

So, I believe that this issue is not fully fixed.

 

Please, let me know if you need more information.

Austin Boyd (JIRA)

unread,
Dec 12, 2019, 8:32:05 AM12/12/19
to puppe...@googlegroups.com
Austin Boyd updated an issue
 
Change By: Austin Boyd
Zendesk Ticket IDs: 32809
Zendesk Ticket Count: 1

Austin Boyd (JIRA)

unread,
Dec 12, 2019, 8:32:06 AM12/12/19
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket IDs: 32809 ,34018
Zendesk Ticket Count: 1 2

Josh Cooper (Jira)

unread,
Mar 31, 2020, 11:55:03 PM3/31/20
to puppe...@googlegroups.com
Josh Cooper updated an issue
Change By: Josh Cooper
Team: Platform Core Coremunity
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Mar 31, 2020, 11:56:03 PM3/31/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-8419
 
Re: Agent's node request fails if environment directory doesn't exist locally

Closing this issue as we haven't received any update.

Reply all
Reply to author
Forward
0 new messages