Error with service: "invalid byte sequence in US-ASCII"

3,004 views
Skip to first unread message

Patrick

unread,
Feb 18, 2013, 2:54:48 PM2/18/13
to puppet...@googlegroups.com
I just built a new puppet master, and whenever I run puppet on it, it throws an error while processing a service resource:

# puppet agent -t
Info: Retrieving plugin
Info: Caching catalog for i-45dc2b1d
Info: Applying configuration version 'g 9ea47ad19bc706a754c00f00a024309948d3ea03'
Error: /Stage[main]/Ipa::Client::Basic/Service[sssd]: Could not evaluate: invalid byte sequence in US-ASCII
Notice: Finished catalog run in 15.37 seconds

The debug output:

Debug: Executing '/sbin/status sssd'
Debug: Executing '/sbin/initctl --version'
Error: /Stage[main]/Ipa::Client::Basic/Service[sssd]: Could not evaluate: invalid byte sequence in US-ASCII


This is what the manifest for that resource looks like:
service { 'sssd':
  ensure     => running,
  enable     => true,
  hasstatus  => true,
  hasrestart => true,
  require    => [ Package['sssd'], File['/etc/sssd/sssd.conf'], ],
}


This is with ubuntu 12.04 and puppet 3.1
Any ideas?

Patrick Hemmer

unread,
Feb 19, 2013, 12:02:05 AM2/19/13
to Conor, puppet...@googlegroups.com
No, but it's not related to the manifest. The manifest this resource is in actually hasn't changed in months. Also I can reboot the box and it goes away. Other boxes that aren't doing it will sometimes start doing it when they reboot. (at least that's the behaviour I've been observing, but I have only rebooted a few boxes since this started occurring).
So it seems like it's environmental, but I have no clue what.

-Patrick


On 02/18/2013 11:57 PM, Conor wrote:

Have you looked for non-printable characters?

`cat -v <filename>` is one of the easier ways to check.

-Conor

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users...@googlegroups.com.
To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

jcbollinger

unread,
Feb 19, 2013, 9:14:47 AM2/19/13
to puppet...@googlegroups.com


On Monday, February 18, 2013 11:02:05 PM UTC-6, Patrick wrote:
No, but it's not related to the manifest. The manifest this resource is in actually hasn't changed in months. Also I can reboot the box and it goes away. Other boxes that aren't doing it will sometimes start doing it when they reboot. (at least that's the behaviour I've been observing, but I have only rebooted a few boxes since this started occurring).
So it seems like it's environmental, but I have no clue what.

I concur.  The diagnostic messages appear to indicate that one of the system tools Puppet is using to manage the service (probably /sbin/initctl) fails with the given error message.  That could well mean that the underlying init script (if any) or the daemon binary itself is failing, and initctl is just passing on the result.

You said that the error occurs whenever you run Puppet, but you also said it goes away if you reboot.  I'm not sure how to reconcile those.  It may matter, because one of the potential problem areas involves whether the system tools return the correct response to the service's 'status' command.  If they don't, then Puppet could try to start it when it is already running, to which the service might object.

You could try to troubleshoot by running the service status, start, stop, and restart commands manually, and seeing what happens.  Make sure to use a shell with the minimum possible environment -- maybe just a minimal PATH -- because that's what the agent will do.  Capture not just the behavior and any messages, but also the status code returned by each command.


John

David Schmitt

unread,
May 21, 2013, 5:43:06 AM5/21/13
to puppet...@googlegroups.com
On 19.05.2013 14:18, Mateusz Fiołka wrote:
> I'm not sure if it is related to the services. It rather looks like
> puppet related to me.
> I'm having a similar problem on a newly created vps. When I do puppet
> apply first time I get the message:
>
> Error: Could not set 'present' on ensure: invalid byte sequence in
> US-ASCII at 3:/root/mf-prod.pp

I've seen this error when the puppet master process started by init
receives a different locale environment than when it is started from the
command line.

Check /proc/$pid/env of the running puppet master process for LANG/LC_*
and compare that to your shell env.


Regards, David

William Van Hevelingen

unread,
Sep 3, 2013, 2:42:36 AM9/3/13
to [Puppet-Users]
I get the same error when running puppet-lint.... puppet 3.1.x regression?

rake aborted!
invalid byte sequence in US-ASCII
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/lexer.rb:120:in `[]'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/lexer.rb:120:in `block in tokenise'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/lexer.rb:119:in `each'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/lexer.rb:119:in `tokenise'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/plugin.rb:40:in `load_data'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/plugin.rb:54:in `run'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint.rb:155:in `run'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/tasks/puppet-lint.rb:23:in `block (3 levels) in initialize'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/tasks/puppet-lint.rb:21:in `each'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/tasks/puppet-lint.rb:21:in `block (2 levels) in initialize'
/shadow/home/blkperl/.rvm/gems/ruby-1.9.3-p194/gems/puppet-lint-0.3.2/lib/puppet-lint/tasks/puppet-lint.rb:13:in `block in initialize'
Tasks: TOP => lint



--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.

To post to this group, send email to puppet...@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.





--
Thanks,
William

William Van Hevelingen

unread,
Sep 3, 2013, 2:47:07 AM9/3/13
to [Puppet-Users]
Found the bug that Jeff created

--
Thanks,
William

William Van Hevelingen

unread,
Sep 3, 2013, 2:50:32 AM9/3/13
to [Puppet-Users]
Actually the umbrella bug is now.

--
Thanks,
William

Nawaid Shamim

unread,
Dec 18, 2013, 5:53:43 AM12/18/13
to puppet...@googlegroups.com
Setting system locales worked 

Try running "dpkg-reconfigure locales"

Thanks,

Nawaid.
Reply all
Reply to author
Forward
0 new messages