Jira (PUP-10611) puppet daemon fails with undefined method `uri_unescape' for Puppet::Util:Module, CLI works

12 views
Skip to first unread message

Tim Meusel (Jira)

unread,
Aug 7, 2020, 3:08:03 AM8/7/20
to puppe...@googlegroups.com
Tim Meusel created an issue
 
Puppet / Bug PUP-10611
puppet daemon fails with undefined method `uri_unescape' for Puppet::Util:Module, CLI works
Issue Type: Bug Bug
Assignee: Unassigned
Created: 2020/08/07 12:07 AM
Priority: Normal Normal
Reporter: Tim Meusel

Puppet Version: 6.17.0
Puppet Server Version: 6.12.1
OS Name/Version: FreeBSD 12.1

I can run `puppet agent -t` without issues in the shell. However the daemon fails to run in the background. Foreman has the following error logs:

err	/File[/var/puppet/facts.d]	Failed to generate additional resources using 'eval_generate': undefined method `uri_unescape' for Puppet::Util:Module
err	/File[/var/puppet/facts.d]	Could not evaluate: Could not retrieve file metadata for puppet:///pluginfacts: undefined method `uri_unescape' for Puppet::Util:Module
err	/File[/var/puppet/lib]	Failed to generate additional resources using 'eval_generate': undefined method `uri_unescape' for Puppet::Util:Module
err	/File[/var/puppet/lib]	Could not evaluate: Could not retrieve file metadata for puppet:///plugins: undefined method `uri_unescape' for Puppet::Util:Module
err	/File[/var/puppet/locales]	Failed to generate additional resources using 'eval_generate': undefined method `uri_unescape' for Puppet::Util:Module
err	/File[/var/puppet/locales]	Could not evaluate: Could not retrieve file metadata for puppet:///locales: undefined method `uri_unescape' for Puppet::Util:Module
err	Puppet	Failed to apply catalog: no parameter named 'ensure'

Desired Behavior:

puppet CLI & daemon can do successfull agent runs

Actual Behavior:

daemon fails to run properly

some infos:

/usr/local/etc/puppet/puppet.conf

[main]
    certname = ***
    codedir = /usr/local/etc/puppet
    hostprivkey = $privatekeydir/$certname.pem { mode = 640 }
    logdir = /var/log/puppet
    pluginfactsource = puppet:///pluginfacts
    pluginsource = puppet:///plugins
    privatekeydir = $ssldir/private_keys { group = service }
    rundir = /var/run/puppet
    server = ***
    show_diff = true
    ssldir = /var/puppet/ssl
    vardir = /var/puppet
 
[agent]
    classfile = $statedir/classes.txt
    default_schedules = false
    environment = production
    localconfig = $vardir/localconfig
    masterport = 8140
    noop = false
    report = true
    runinterval = 7200
    splay = true
    splaylimit = 7200
    usecacheonfailure = true

`env` output:

SHELL=/bin/tcsh
HISTCONTROL=ignoreboth
no_proxy=127.0.0.1,***long list, contains the puppet server FQDN***
MACHTYPE=x86_64
HISTSIZE=99999999
LESS_TERMCAP_se=
LESS_TERMCAP_so=
HISTTIMEFORMAT=%Y%m%d %T%z 
EDITOR=vim
PWD=/root
LOGNAME=root
LS_OPTIONS=--color=auto -h
HOME=/root
LANG=en_US.UTF-8
OSTYPE=FreeBSD
https_proxy=http://***:3128
SSH_CONNECTION=*** 33178 *** 22
TERM=xterm-256color
LESS_TERMCAP_mb=
LESS_TERMCAP_me=
LESS_TERMCAP_md=
HOST=***
USER=root
LESS_TERMCAP_ue=
SHLVL=2
LESS_TERMCAP_us=
PAGER=less
http_proxy=http://***:3128
PS1=\[\033[01;31m\]\u\[\033[01;33m\]@\[\033[01;36m\]\h \[\033[01;33m\]\w \[\033[01;35m\]\$ \[\033[00m\]
SSH_CLIENT=*** 33178 22
VENDOR=amd
PATH=/root/.gem/ruby/2.6/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin:/root/bin
HISTIGNORE=reboot:shutdown
BLOCKSIZE=K
HISTFILESIZE=99999999
MAIL=/var/mail/root
SSH_TTY=/dev/pts/0
HOSTTYPE=FreeBSD
REMOTEHOST=***
_=/usr/bin/env

this worked in the past. Sadly I don't know which change caused the errors as I only have reports about the past 7 days. I'm wondering if the http proxy setup causes this. The proxy isn't configured anywhere within Puppe, but that worked fine for years.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo

Josh Cooper (Jira)

unread,
Aug 8, 2020, 12:36:03 PM8/8/20
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-10611
 
Re: puppet daemon fails with undefined method `uri_unescape' for Puppet::Util:Module, CLI works

Can you add --trace to whatever script is starting puppet? The Puppet::Util.uri_encode method has been present for a long time. Is there a possibility you have multiple puppet versions installed?

Tim Meusel (Jira)

unread,
Aug 11, 2020, 8:04:02 AM8/11/20
to puppe...@googlegroups.com
Tim Meusel commented on Bug PUP-10611

sorry, missed your comment
I added the trace option to the init script and restarted the service on 4 boxes. I will check foreman later if it recieved proper reports.

Tim Meusel (Jira)

unread,
Aug 17, 2020, 2:38:04 PM8/17/20
to puppe...@googlegroups.com
Tim Meusel commented on Bug PUP-10611

I'm now unable to reproduce this. I guess that the puppet agent wasn't properly restarted after the last upgrades. I will close the issue and reopen it if it happens again.

Reply all
Reply to author
Forward
0 new messages