Jira (PUP-1055) "invalid byte sequence" with service provider upstart

4 views
Skip to first unread message

Andre Keller (JIRA)

unread,
Dec 7, 2014, 6:54:28 PM12/7/14
to puppe...@googlegroups.com
Andre Keller commented on Bug PUP-1055
 
Re: "invalid byte sequence" with service provider upstart

Same with nsd, also on Ubuntu 14.04:

# nsd - Name Server Daemon
 
description "Name Server Daemon"
author "Ondřej Surý <ond...@debian.org>"
...

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.7#6337-sha1:2ed701e)
Atlassian logo

Erik Lattimore (JIRA)

unread,
Mar 11, 2015, 8:37:23 PM3/11/15
to puppe...@googlegroups.com

It seems that if you set the LANG=en_US.UTF-8 env variable of the puppet daemon (i.e. by modifying /etc/environment and restarting the daemon). Facter has issues (FACT-778) on OSX 10.10 relating to not setting the LANG env variable (which is typically set by our terminal and not by the OS) so maybe puppet needs to be initializing the environment correctly (I assume en_US.UTF-8 may not always be the right choice).

This message was sent by Atlassian JIRA (v6.3.10#6340-sha1:7ea293a)
Atlassian logo

Glenn Schmidt (JIRA)

unread,
Sep 2, 2015, 8:35:03 AM9/2/15
to puppe...@googlegroups.com
Glenn Schmidt commented on Bug PUP-1055

Same problem with php5-fpm, on Ubuntu 14.04

description "The PHP FastCGI Process Manager"
author "Ondřej Surý <ond...@debian.org>"

Has anyone found a workaround other than to manually doctor these init scripts? They are installed by Debian packages, they're not part of the puppet manifest. And the agent run fails completely when this error occurs.

Interestingly it only happens for me when the agent runs automatically, NOT when I run puppet agent --test manually from the shell. Just as this user describes.

I've tried setting Encoding.default_external = Encoding::UTF_8 on the Puppet master, and setting LANG=en_US.UTF-8 on the agent in /etc/environment and also in /etc/default/puppet but these measures haven't made a difference.

This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Simon Deziel (JIRA)

unread,
Sep 2, 2015, 8:50:02 AM9/2/15
to puppe...@googlegroups.com
Simon Deziel commented on Bug PUP-1055

My cron job wrapper includes this:

export LC_ALL="C.UTF-8"
...
puppet agent --onetime --no-daemonize --no-usecacheonfailure

HTH,
Simon

Alex Muntada (JIRA)

unread,
Dec 7, 2015, 9:59:04 AM12/7/15
to puppe...@googlegroups.com
Alex Muntada commented on Bug PUP-1055

An important thing to notice in Ubuntu 14.04 is that this problem only occurs when puppet is started by systemd during the boot, where LANG is still undefined. But the problem disappears when puppet is restarted from a shell, where LANG is already defined:

# cat /proc/$(pgrep -f 'puppet agent')/environ | tr '\0' '\n' | grep ^LANG=
# service puppet restart
# cat /proc/$(pgrep -f 'puppet agent')/environ | tr '\0' '\n' | grep ^LANG=
LANG=en_US.UTF-8

This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Ethan Brown (JIRA)

unread,
Sep 30, 2016, 5:32:05 PM9/30/16
to puppe...@googlegroups.com
Ethan Brown updated an issue
 
Puppet / Bug PUP-1055
Change By: Ethan Brown
Labels: i18n redmine  utf-8
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Ethan Brown (JIRA)

unread,
Sep 30, 2016, 5:32:06 PM9/30/16
to puppe...@googlegroups.com
Ethan Brown updated an issue
Change By: Ethan Brown
Team: Agent & Platform

John Duarte (JIRA)

unread,
May 15, 2017, 1:52:08 PM5/15/17
to puppe...@googlegroups.com
John Duarte updated an issue
Change By: John Duarte
Labels: i18n  needs_repro  redmine utf-8

Maggie Dreyer (JIRA)

unread,
May 15, 2017, 1:53:05 PM5/15/17
to puppe...@googlegroups.com
Maggie Dreyer commented on Bug PUP-1055
 
Re: "invalid byte sequence" with service provider upstart

Thank you for reporting this. We believe this issue has already been addressed in a later release of Puppet. If you experience this issue against the current version of Puppet, please add a comment to this ticket with your reproduction scenario.

For more info on getting the current version of Puppet Agent, see https://docs.puppet.com/puppet/latest/install_pre.html.

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:49:06 PM5/18/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
 
Change By: Moses Mendoza
Labels: i18n needs_repro redmine  triaged  utf-8

Martijn Heemels (JIRA)

unread,
Dec 7, 2017, 8:12:03 AM12/7/17
to puppe...@googlegroups.com
Martijn Heemels commented on Bug PUP-1055
 
Re: "invalid byte sequence" with service provider upstart

I'm reopening because this is still an issue with the current version of the PC1 collection package. As far as I can tell both the package and the OS versions are still supported.

  • Linux: Ubuntu 14.04.5 LTS
  • Puppet Agent 4.10.9, installed from official PC1 collection repo (http://apt.puppetlabs.com trusty PC1)
  • System locale: LANG="en_US.UTF-8"
  • packages:
  • - puppetlabs-release-pc1: 1.1.0-4trusty
  • - puppet-agent: 1.10.9-1trusty

The behaviour exactly matches the symptoms described in this ticket: `Could not evaluate: invalid byte sequence in US-ASCII` on the PHP-FPM Service's init-script, due to UTF-8 characters being present.

The agent's environment on bootup:

UPSTART_INSTANCE=
runlevel=2
UPSTART_JOB=rc
TERM=linux
PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNLEVEL=2
PREVLEVEL=N
UPSTART_EVENTS=runlevel
PWD=/
previous=N

On service puppet restart:

TERM=linux
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/puppetlabs/bin
LANG=en_US.UTF-8
PWD=/

When LANG=en_US.UTF-8 is set, either by restarting from a login session or via /etc/default/puppet the run succeeds. On node bootup the puppet run gives the error, despite the global LANG being set to "en_US.UTF-8".

This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Josh Cooper (JIRA)

unread,
Aug 14, 2018, 2:09:04 AM8/14/18
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Agent Platform OS
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Scott McClellan (JIRA)

unread,
Aug 21, 2018, 5:28:06 PM8/21/18
to puppe...@googlegroups.com
Scott McClellan updated an issue
Change By: Scott McClellan
Labels: i18n needs_repro redmine service type_and_provider ubuntu upstart utf-8

Josh Cooper (Jira)

unread,
Jan 26, 2021, 4:22:03 PM1/26/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-1055
 
Re: "invalid byte sequence" with service provider upstart

Per http://upstart.ubuntu.com/, upstart is in maintenance mode only and public support will end April 2021 for 16.04. Support has already ended for 14.04.

Given the workaround above (seeing LC_ALL/LANG in the script that launches puppet as a service) I'm going to close this.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages