Ask Your Question

Agent runs in POSIX locale in AWS

asked 2018-06-12 08:42:37 -0600

mosheb gravatar image

updated 2018-06-12 12:00:36 -0600


I set up a Puppet agent running on Ubuntu 16.04 deployed in AWS. The Puppet agent installation is done in the userdata. I then tried to use it to install some monitoring agent, and I get the following error message:

Could not evaluate: invalid byte sequence in US-ASCII

I made sure the default locale and the locale of the root user (that runs the agent) is en_US.utf8, both when logging in SSH and by adding logs to the puppet agent installation script running in the user data. I also added debug printout to the module that installs my monitoring agent, and it says current locale is POSIX.

When I try to run the agent not through the service (just "puppet agent -t" in SSH as root) - it works fine, and the logging I added shows the locale is en_US.utf8

How come the puppet agent runs under the POSIX locale and not under the en_US.utf8?


edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2018-06-14 06:58:19 -0600

b4ldr gravatar image

this is caused by a none ascci character in one of the files being managed, there is a puppet bug for this issue[1] and the following comments is specifically relevent


edit flag offensive delete link more

answered 2018-06-12 13:15:43 -0600

mosheb gravatar image

My issue is resolved.

Just needed to add the following to /etc/default/puppet:


BUT this doesn't work (at least to me) if you add it and just restart the service. Only worked when if the lines were there before the Puppet service is installed.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2018-06-12 08:42:37 -0600

Seen: 51 times

Last updated: Jun 14