Ask Your Question
0

Agent runs in POSIX locale in AWS

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

mosheb gravatar image

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

Hi,

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?

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

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

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

https://tickets.puppetlabs.com/browse...

[1]https://tickets.puppetlabs.com/browse/PUP-1055

edit flag offensive delete link more
0

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

mosheb gravatar image

My issue is resolved.

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

LANG=en_US.UTF-8
LANGUAGE=''
LC_ALL=''

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

Stats

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

Seen: 47 times

Last updated: Jun 14