Puppet error: returned 1 instead of one of [0]

18,120

Sounds like you're dealing with an exec resource, right?

By default, the output of the command is logged by puppet in cases (like this one) that the command has failed - see the logoutput setting of the exec resource type.

If you're not seeing any other error output, it's possible the command simply didn't provide any (completely silent in both stdout and stderr); you may need to look into setting the application you're running into a more verbose mode.

Some applications return a non-zero exit code on success (though your 1 is almost certainly a failure of some kind). To account for this, you can set returns to the set of exit codes that's expected on success; that's where the [0] in your error message comes from.

Setting this in your exec resource, for instance, would consider any of these three exit codes as a "successful" execution.

returns => [0, 2, 14]
Share:
18,120

Related videos on Youtube

Nyxynyx
Author by

Nyxynyx

Hello :) These days its web development: PHP, Codeigniter, node.js, Javascript, jQuery, MySQL, mongoDB, HTML/CSS

Updated on September 18, 2022

Comments

  • Nyxynyx
    Nyxynyx over 1 year

    When using Puppet, I get error messages like

    returned 1 instead of one of [0]

    Is there a way to output/get the actual error message?