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
Error: Could not set 'present' on ensure: invalid byte sequence in US-ASCII 
at 3:/root/mf-prod.pp
Wrapped exception:
invalid byte sequence in US-ASCII
Error: /Stage[main]//Package[nginx]/ensure: change from purged to present 
failed: Could not set 'present' on ensure: invalid byte sequence in 
US-ASCII at 3:/root/mf-prod.pp

The mentioned file looks like this:
package { "nginx":
        ensure => "installed"
}

service { "nginx":
        enable => "true",
        ensure => "running"
}

Hexdump:

00000000  70 61 63 6b 61 67 65 20  7b 20 22 6e 67 69 6e 78  |package { 
"nginx|
00000010  22 3a 0a 20 20 20 20 20  20 20 20 65 6e 73 75 72  |":.        
ensur|
00000020  65 20 3d 3e 20 22 69 6e  73 74 61 6c 6c 65 64 22  |e => 
"installed"|
00000030  0a 7d 0a 0a 73 65 72 76  69 63 65 20 7b 20 22 6e  |.}..service { 
"n|
00000040  67 69 6e 78 22 3a 0a 09  65 6e 61 62 6c 65 20 3d  |ginx":..enable 
=|
00000050  3e 20 22 74 72 75 65 22  2c 0a 09 65 6e 73 75 72  |> 
"true",..ensur|
00000060  65 20 3d 3e 20 22 72 75  6e 6e 69 6e 67 22 0a 7d  |e => 
"running".}|
00000070  0a                                                |.|
00000071

puppet version: 3.2.1-rc1
ruby version: 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
os: arch linux with systemd service provider


On Tuesday, February 19, 2013 3:14:47 PM UTC+1, jcbollinger wrote:
>
>
>
> 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
>
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to puppet-users@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.


Reply via email to