Ask Your Question
0

invalid byte sequence in US-ASCII again !

asked 2016-04-04 04:13:16 -0500

FranzCC gravatar image

Hi,
after reading several posts, i didn't manage to get things working again.

Problem:
After upgrading from PE 2015.3.2 to 2015.3.3 the error occured.
I use the module debconf_package to preseed the arno firewall.
Nevertheless, when compiling the catalog on the server and applying it on the node, no problem occurs. Also, both server and and node are configured to use the same locale UTF-8
I also diffed the classes and used iconv but w/o any changes !

Output of puppet agent -t:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Resource Statement, invalid byte sequence in US-ASCII at /etc/puppetlabs/code/environments/production/modules/arnosiptables/manifests/init.pp:88:1 on node 311.local

Code Snippet:

$arno_default_template = @(END)
arno-iptables-firewall  arno-iptables-firewall/icmp-echo boolean true
arno-iptables-firewall  arno-iptables-firewall/config-int-if string eth0 eth1
arno-iptables-firewall  arno-iptables-firewall/restart boolean true
arno-iptables-firewall  arno-iptables-firewall/nat boolean true
arno-iptables-firewall  arno-iptables-firewall/config-int-if string eth0 eth2 gretap
arno-iptables-firewall  arno-iptables-firewall/config-int-net string <%= $nat_internal_net %>
arno-iptables-firewall  arno-iptables-firewall/config-int-nat-net string <%= $nat_internal_net %>
arno-iptables-firewall  arno-iptables-firewall/config-ext-if string eth1
arno-iptables-firewall  arno-iptables-firewall/dynamic-ip boolean false
arno-iptables-firewall  arno-iptables-firewall/services-tcp string <%= $tcp_services  %>
arno-iptables-firewall  arno-iptables-firewall/services-udp string <%= $udp_services  %>
arno-iptables-firewall  arno-iptables-firewall/debconf-wanted boolean true
END

$nat_internal_net = hiera('arnoiptables::intnet', {})
$tcp_services = hiera('arnoiptables::services::tcp', {})
$udp_services = hiera('arnoiptables::services::udp', {})

debconf_package { arno-iptables-firewall:
  ensure => present,
  content => inline_epp($arno_default_template, { 'nat_internal_net' => $nat_internal_net, 'tcp_services' => $tcp_services, 'udp_services' => $udp_services })
 }

Puppet apply via compiled catalog on the master host:

Notice: /Stage[main]/Debconf_package::Setup/File[/opt/puppetlabs/puppet/cache/debconf]/ensure: created
Notice: /Stage[main]/Arnosiptables/Debconf_package[arno-iptables-firewall]/File[/opt/puppetlabs/puppet/cache/debconf/arno-iptables-firewall.debconf]/ensure: defined content as '{md5}a590e14bb6b8669d668a25f1e7cbfd3e'
Notice: /Stage[main]/Arnosiptables/Debconf_package[arno-iptables-firewall]/Exec[debconf-set-selections arno-iptables-firewall]: Triggered 'refresh' from 1 events
Notice: /Stage[main]/Arnosiptables/Debconf_package[arno-iptables-firewall]/Exec[dpkg-reconfigure arno-iptables-firewall]: Triggered 'refresh' from 1 events
Notice: Applied catalog in 2.51 seconds

So i think, i have no encoding problem but a BUG in PE 2015.3.3. It worked w/o any troubles with 2015.3.2.
Did a reboot trigger some changed on the puppetmaster ?
I'm stuck now, i also issued a prio 1 support ticket !

Regards Franz

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-04-04 07:18:43 -0500

FranzCC gravatar image

My solution,

It seems that the last update did some changes in the locale settings and JAVA, obviously don't use the system locales. Debian does, so again Ubuntu is not enterprise ready and puppet should really consider an enterprise ready distribution for pe-* like DEBIAN !!!

strings /proc/[procid]/environ clearly stated to use the default locale "C" which is completely wrong. It should consider the local system locales as default value. This works for debian but not for half-baked Ubuntu.

Changes i made: (/etc/default/pe-*) at the beginning !!!

/etc/default/pe-console-services:export LANG="en_US.UTF-8"
/etc/default/pe-console-services:export LANGUAGE="en_US:en"
/etc/default/pe-console-services:export LC_ALL="en_US.UTF-8"

/etc/default/pe-orchestration-services:export LANG="en_US.UTF-8"
/etc/default/pe-orchestration-services:export LANGUAGE="en_US:en"
/etc/default/pe-orchestration-services:export LC_ALL="en_US.UTF-8"

/etc/default/pe-puppetdb:export LANG="en_US.UTF-8"
/etc/default/pe-puppetdb:export LANGUAGE="en_US:en"
/etc/default/pe-puppetdb:export LC_ALL="en_US.UTF-8"

/etc/default/pe-puppetserver:export LANG="en_US.UTF-8"
/etc/default/pe-puppetserver:export LANGUAGE="en_US:en"
/etc/default/pe-puppetserver:export LC_ALL="en_US.UTF-8"

I then restarted the host.

Works now

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: 2016-04-04 04:13:16 -0500

Seen: 1,480 times

Last updated: Apr 04 '16