Weird encoding error: "0xF3" to UTF-8 in conversion from ASCII...

1,280 views
Skip to first unread message

Álvaro Acción - CiTIUS

unread,
Jul 1, 2013, 7:06:20 AM7/1/13
to puppet...@googlegroups.com
Hello,

My name is Álvaro Acción and I'm currently an student trainee at CiTIUS. My task is to adapt and integrate the current configuration management software (CMS from now on), which is completely based on puppet (only a few minor one-liners are used for smoe specific tasks) to Window 7 based systems.

Introduction aside, the problem I'm facing is:

> I had a puppetmaster, version 3.2.2, running in a Ubuntu 12.04 LTS machine serving some manifests for testing purposes - this one working correctly as per the tests conducted with some linux clients. Certs and all the access stuff configured. All of it was painstakingly tested.

So the puppetmaster is up to date and works, that's a no brainer

> I've deployed the puppet windows clients. They are also using version 3.2.2, directly taken from open source puppet installation providers. After getting dns resolution working and tested, I fired the puppet agent in order to check if the client was detected by the master, and vice-versa. My surprise cames when, after logging something along the lines of "Generating a new certificate for client", the console spits an error: Could not prepare for execution: "0xF3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF16-LE". From what i've seen, the first part is an standard error message that cames from puppet. From my undestanding, the second part is a ruby exception related to enconding (painfully and obviously related to encoding).

Some facts:
    - The error is the same with puppetmasters in versions 3.2.2 and 2.7.X
    - My best guess is that is some sort of comunication problem, since there is no cert sent for signing to the puppetmaster
        * It could also be some error when sending the cert, i can not be sure

    - I test the config with "puppet agent --server=pupbuntu.inv.usc.es --no-daemonize --verbose" It's an internal network, no access from outside, running locally (with the domain name tweaked to simulate the actual network). This is just to show the command, no actual interest int the network whatsoever.

As I've not found any useful information regarding the error in any puppet related site, forum or list, I've decided to open this thread to see if someone can throw some insight in this matter.

Thanks

 

David Schmitt

unread,
Jul 1, 2013, 11:02:40 AM7/1/13
to puppet...@googlegroups.com
0xfe is OACUTE in latin-1. Seems like ruby doesn't like your name.
Recent rubies strictified their behavior around character encodings.
This message is a common fallout from that.

As a short-time workaround, try to avoid giving the puppet agent
non-ascii characters. Usual implicit sources are the current working
directory, the username, the computer name and other environmental sources.

As a mid-term solution, check out the puppetlabs bugtracker whether
someone has already hit and reported that problem. If not, report it
yourself, so you'll be in the loop when a fix is available.


Regards, David

#include <rubyrant>

Josh Cooper

unread,
Jul 1, 2013, 7:07:42 PM7/1/13
to puppet...@googlegroups.com



On Mon, Jul 1, 2013 at 8:02 AM, David Schmitt <da...@dasz.at> wrote:
It sounds like puppet is using C:\Users\Acción\.puppet to store its data, and due to https://projects.puppetlabs.com/issues/17010 is failing.

Are you running cmd.exe with elevated privileges (Run as Administrator) as described here: http://docs.puppetlabs.com/windows/running.html#security-context


As a short-time workaround, try to avoid giving the puppet agent non-ascii characters. Usual implicit sources are the current working directory, the username, the computer name and other environmental sources.

As a mid-term solution, check out the puppetlabs bugtracker whether someone has already hit and reported that problem. If not, report it yourself, so you'll be in the loop when a fix is available.

Can you run the agent with --trace --debug, and include the resulting output to this thread?

Josh

--
Josh Cooper
Developer, Puppet Labs

Join us at PuppetConf 2013, August 22-23 in San Francisco - http://bit.ly/pupconf13
Register now and take advantage of the Early Bird discount - save 25%!

Álvaro Acción - CiTIUS

unread,
Jul 2, 2013, 3:52:48 AM7/2/13
to puppet...@googlegroups.com
The output I get is this one:

C:\Program Files (x86)\Puppet Labs\Puppet\bin>puppet.bat agent --server=pupbuntu
.inv.usc.es --no-daemonize --verbose --debug --trace
Could not retrieve domain: undefined method `gsub' for nil:NilClass
Could not retrieve domain: undefined method `gsub' for nil:NilClass
Could not retrieve domain: undefined method `gsub' for nil:NilClass
Debug: Failed to load library 'syslog' for feature 'syslog'
Debug: Failed to load library 'selinux' for feature 'selinux'
Debug: Using settings: adding file resource 'confdir': 'File[C:/ProgramData/Pupp
etLabs/puppet/etc]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc", :ensure=>:dire
ctory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'vardir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var]{:path=>"C:/ProgramData/PuppetLabs/puppet/var", :ensure=>:direc
tory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var/log]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/log", :mode=>
"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'

Debug: Using settings: adding file resource 'statedir': 'File[C:/ProgramData/Pup
petLabs/puppet/var/state]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/state", :
mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>
false}'
Debug: Using settings: adding file resource 'rundir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var/run]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/run", :mode=>
"1777", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}
'
Debug: Using settings: adding file resource 'libdir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var/lib]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/lib", :ensure
=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[C:/ProgramData/Pupp
etLabs/puppet/etc/ssl/certs]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc/ssl/ce
rts", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[C:/ProgramData/Puppe
tLabs/puppet/etc/ssl]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc/ssl", :mode=>
"771", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'

Debug: Using settings: adding file resource 'publickeydir': 'File[C:/ProgramData
/PuppetLabs/puppet/etc/ssl/public_keys]{:path=>"C:/ProgramData/PuppetLabs/puppet
/etc/ssl/public_keys", :ensure=>:directory, :loglevel=>:debug, :links=>:follow,
:backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[C:/ProgramData/P
uppetLabs/puppet/etc/ssl/certificate_requests]{:path=>"C:/ProgramData/PuppetLabs
/puppet/etc/ssl/certificate_requests", :ensure=>:directory, :loglevel=>:debug, :
links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[C:/ProgramDat
a/PuppetLabs/puppet/etc/ssl/private_keys]{:path=>"C:/ProgramData/PuppetLabs/pupp
et/etc/ssl/private_keys", :mode=>"750", :ensure=>:directory, :loglevel=>:debug,
:links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[C:/ProgramData/P
uppetLabs/puppet/etc/ssl/private]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc/s
sl/private", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:foll
ow, :backup=>false}'
Debug: Using settings: adding file resource 'hostprivkey': 'File[C:/ProgramData/
PuppetLabs/puppet/etc/ssl/private_keys/ctdesk0222.pem]{:path=>"C:/ProgramData/Pu
ppetLabs/puppet/etc/ssl/private_keys/ctdesk0222.pem", :mode=>"600", :ensure=>:fi
le, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostpubkey': 'File[C:/ProgramData/P
uppetLabs/puppet/etc/ssl/public_keys/ctdesk0222.pem]{:path=>"C:/ProgramData/Pupp
etLabs/puppet/etc/ssl/public_keys/ctdesk0222.pem", :mode=>"644", :ensure=>:file,
 :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientyamldir': 'File[C:/ProgramDat
a/PuppetLabs/puppet/var/client_yaml]{:path=>"C:/ProgramData/PuppetLabs/puppet/va
r/client_yaml", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:f
ollow, :backup=>false}'
Debug: Using settings: adding file resource 'client_datadir': 'File[C:/ProgramDa
ta/PuppetLabs/puppet/var/client_data]{:path=>"C:/ProgramData/PuppetLabs/puppet/v
ar/client_data", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:
follow, :backup=>false}'
Debug: Using settings: adding file resource 'clientbucketdir': 'File[C:/ProgramD
ata/PuppetLabs/puppet/var/clientbucket]{:path=>"C:/ProgramData/PuppetLabs/puppet
/var/clientbucket", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links
=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'graphdir': 'File[C:/ProgramData/Pup
petLabs/puppet/var/state/graphs]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/st
ate/graphs", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>f
alse}'
Debug: Puppet::Type::File::ProviderPosix: feature posix is missing
Debug: Failed to load library 'shadow' for feature 'libshadow'
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/log]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state]: Autorequiring File[C:/
ProgramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/run]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/lib]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs]: Autorequiring File
[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/etc]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys]: Autorequirin
g File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests]: Aut
orequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]: Autorequiri
ng File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private]: Autorequiring Fi
le[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/ctdesk0222.pe
m]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys/ctdesk0222.pem
]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/client_yaml]: Autorequiring Fi
le[C:/ProgramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/client_data]: Autorequiring Fi
le[C:/ProgramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/clientbucket]: Autorequiring F
ile[C:/ProgramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state/graphs]: Autorequiring F
ile[C:/ProgramData/PuppetLabs/puppet/var/state]
Debug: Finishing transaction 34603848
Debug: Using settings: adding file resource 'confdir': 'File[C:/ProgramData/Pupp
etLabs/puppet/etc]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc", :ensure=>:dire
ctory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'vardir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var]{:path=>"C:/ProgramData/PuppetLabs/puppet/var", :ensure=>:direc
tory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'logdir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var/log]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/log", :mode=>
"750", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'

Debug: Using settings: adding file resource 'statedir': 'File[C:/ProgramData/Pup
petLabs/puppet/var/state]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/state", :
mode=>"1755", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>
false}'
Debug: Using settings: adding file resource 'rundir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var/run]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/run", :mode=>
"1777", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}
'
Debug: Using settings: adding file resource 'libdir': 'File[C:/ProgramData/Puppe
tLabs/puppet/var/lib]{:path=>"C:/ProgramData/PuppetLabs/puppet/var/lib", :ensure
=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'certdir': 'File[C:/ProgramData/Pupp
etLabs/puppet/etc/ssl/certs]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc/ssl/ce
rts", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'ssldir': 'File[C:/ProgramData/Puppe
tLabs/puppet/etc/ssl]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc/ssl", :mode=>
"771", :ensure=>:directory, :loglevel=>:debug, :links=>:follow, :backup=>false}'

Debug: Using settings: adding file resource 'publickeydir': 'File[C:/ProgramData
/PuppetLabs/puppet/etc/ssl/public_keys]{:path=>"C:/ProgramData/PuppetLabs/puppet
/etc/ssl/public_keys", :ensure=>:directory, :loglevel=>:debug, :links=>:follow,
:backup=>false}'
Debug: Using settings: adding file resource 'requestdir': 'File[C:/ProgramData/P
uppetLabs/puppet/etc/ssl/certificate_requests]{:path=>"C:/ProgramData/PuppetLabs
/puppet/etc/ssl/certificate_requests", :ensure=>:directory, :loglevel=>:debug, :
links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatekeydir': 'File[C:/ProgramDat
a/PuppetLabs/puppet/etc/ssl/private_keys]{:path=>"C:/ProgramData/PuppetLabs/pupp
et/etc/ssl/private_keys", :mode=>"750", :ensure=>:directory, :loglevel=>:debug,
:links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'privatedir': 'File[C:/ProgramData/P
uppetLabs/puppet/etc/ssl/private]{:path=>"C:/ProgramData/PuppetLabs/puppet/etc/s
sl/private", :mode=>"750", :ensure=>:directory, :loglevel=>:debug, :links=>:foll
ow, :backup=>false}'
Debug: Using settings: adding file resource 'hostprivkey': 'File[C:/ProgramData/
PuppetLabs/puppet/etc/ssl/private_keys/ctdesk0222.pem]{:path=>"C:/ProgramData/Pu
ppetLabs/puppet/etc/ssl/private_keys/ctdesk0222.pem", :mode=>"600", :ensure=>:fi
le, :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: Using settings: adding file resource 'hostpubkey': 'File[C:/ProgramData/P
uppetLabs/puppet/etc/ssl/public_keys/ctdesk0222.pem]{:path=>"C:/ProgramData/Pupp
etLabs/puppet/etc/ssl/public_keys/ctdesk0222.pem", :mode=>"644", :ensure=>:file,
 :loglevel=>:debug, :links=>:follow, :backup=>false}'
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/log]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/state]: Autorequiring File[C:/
ProgramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/run]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/var/lib]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/var]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certs]: Autorequiring File
[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]: Autorequiring File[C:/Pr
ogramData/PuppetLabs/puppet/etc]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys]: Autorequirin
g File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/certificate_requests]: Aut
orequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]: Autorequiri
ng File[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private]: Autorequiring Fi
le[C:/ProgramData/PuppetLabs/puppet/etc/ssl]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys/ctdesk0222.pe
m]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/private_keys]
Debug: /File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys/ctdesk0222.pem
]: Autorequiring File[C:/ProgramData/PuppetLabs/puppet/etc/ssl/public_keys]
Debug: Finishing transaction 35053716
Error: Could not prepare for execution: "\xF3" to UTF-8 in conversion from ASCII
-8BIT to UTF-8 to UTF-16LE
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/colors.rb:116:i
n `encode'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/colors.rb:116:i
n `string_encode'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/colors.rb:110:i
n `Write'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/gems/win3
2console-1.3.2-x86-mingw32/lib/Win32/Console/ANSI.rb:164:in `_PrintString'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/gems/win3
2console-1.3.2-x86-mingw32/lib/Win32/Console/ANSI.rb:146:in `block in write'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/gems/win3
2console-1.3.2-x86-mingw32/lib/Win32/Console/ANSI.rb:146:in `each'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/gems/1.9.1/gems/win3
2console-1.3.2-x86-mingw32/lib/Win32/Console/ANSI.rb:146:in `write'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log/destination
s.rb:125:in `puts'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log/destination
s.rb:125:in `handle'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:156:in `
block (2 levels) in newmessage'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:322:in `bloc
k in threadlock'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:72:in `block
 in synchronize_on'
C:/Program Files (x86)/Puppet Labs/Puppet/sys/ruby/lib/ruby/1.9.1/sync.rb:227:in
 `sync_synchronize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:72:in `synch
ronize_on'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:322:in `thre
adlock'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:155:in `
block in newmessage'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:154:in `
each'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:154:in `
newmessage'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:248:in `
initialize'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:82:in `n
ew'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/log.rb:82:in `c
reate'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/logging.rb:8:in
 `send_log'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/logging.rb:15:i
n `block (2 levels) in <module:Logging>'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/logging.rb:27:i
n `log_exception'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/ssl/host.rb:319:in `
rescue in wait_for_cert'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/ssl/host.rb:312:in `
wait_for_cert'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb
:413:in `setup_host'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb
:431:in `setup_agent'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application/agent.rb
:485:in `setup'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:362:i
n `block (2 levels) in run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:456:i
n `plugin_hook'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:362:i
n `block in run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util.rb:504:in `exit
_on_fail'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/application.rb:362:i
n `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb
:132:in `run'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/lib/puppet/util/command_line.rb
:86:in `execute'
C:/Program Files (x86)/Puppet Labs/Puppet/puppet/bin/puppet:4:in `<main>'

Álvaro Acción - CiTIUS

unread,
Jul 2, 2013, 12:16:43 PM7/2/13
to puppet...@googlegroups.com
A little update. I don't know the real reason behind the problem, but it seems that after changing the network address of the server the problem has suddenly dissapeared. The trace I pasted is the only clue I've got.

Now I get a error when calling fork(), but it's a known bug and has already a temporal solution.
And after that one, a SSL error. I'm not at work no so I'll try to update tomorrow with more info.

Thanks!

Álvaro Acción - CiTIUS

unread,
Jul 3, 2013, 12:05:37 PM7/3/13
to puppet...@googlegroups.com
I've confirmed it's not the time/date sync. It's not a firewall. It's not the software version, it does not work in 3.0, 3.2.2 or even 3.2.3-rc1.

Can it be the domain in which machines are? The windows one has no domain asociated. I don't see how can this relate to the error but...

The error is this one: "SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A"

This happens once the client cert is signed in the puppetmaster.

Álvaro Acción - CiTIUS

unread,
Jul 4, 2013, 4:08:51 AM7/4/13
to puppet...@googlegroups.com
And again, the issue dissapeared by itself. This is completely ridiculous. I just powered the pcs and virtual machines on, fired the agent and everything ran correctly. I don't know if anyone has experience with puppet in windows and would like to share his opinion, but so far, if there isn't a REALLY good reason, I would not deploy it in something that's the slightest bit important.

Josh Cooper

unread,
Jul 18, 2013, 1:11:48 AM7/18/13
to puppet...@googlegroups.com
This shows that the agent tried to make an SSL connection to the master and failed. Puppet then tries to log the exception to the console[1]. In the process, puppet attempts to encode the string in UTF-16LE (windows' native wide character encoding), but obviously fails.

I can reproduce the exception just in ruby. Given a file encoding.rb:

# -*- coding: utf-8 -*-
detail = 'Acción'.force_encoding('ASCII-8BIT')
puts detail.encode('UTF-16LE')

Using ruby 1.9.3:

C:\work\puppet>ruby encoding.rb
encoding.rb:3:in `encode': "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to UTF-16LE (Encoding::UndefinedConversionError)
        from encoding.rb:3:in `<main>'

The problem appears to be that ruby (or ruby's openssl bindings) are constructing an exception whose message is an ASCII-8BIT encoded string, instead of the encoding currently in use.

Does the agent or master hostname, or any part of the master's certificate, e.g. common name, locale, state, etc, contain any non US-ASCII characters?

Josh

--
Josh Cooper
Developer, Puppet Labs

Join us at PuppetConf 2013August 22-23 in San Francisco - 
http://bit.ly/pupconf13
Register now and take advantage of the Final Countdown discount - save 15%!

Reply all
Reply to author
Forward
0 new messages