I *think* that "Empty response" is the issue here... your script appears to be sending back YAML with just an (empty) classes hash and an (empty) parameters hash. Try putting something in parameters (at least). Also make sure that it's actually writing to STDOUT, not STDERR.
Assuming neither of those are the problem... - Are you running the script as the same user that Puppet runs as? With the same path? - Does puppet.conf have the absolute path to the script? - Are you *sure* you're calling it the same way puppet is? If you run your puppetmaster in --debug mode, when a node checks in for its catalog, you should see a log entry with the full path and arguments to the command that's being run, like: Debug: Executing '/etc/puppet/my_terminus.sh node_hostname.example.com' - Are the permissions right (the script needs to be executable)? Generally when I've had problems like this, they've been either permissions-related, or path-related (i.e. your script is #!/usr/bin/env node, which assumes that node is actually in puppet's path). I'd recommend doing a "sudo su - username" to the user that Puppet runs as, confirming your env and path, and then trying the script. -Jason On 01/03/2014 09:16 AM, Jordan Cabral wrote: > Hi, > Im writing a simple ENC in Nodejs. > When I run the script manually with some hostname it returns a valid > YAML (tested on http://yaml-online-parser.appspot.com/) > But when I run it from puppet I gen an error "Could not find node > 'xxx'; cannot compile" in the client > and "Empty response for hosname from exec terminus" when debugging the > master > > > I tested with a simple bash scipt with empty class and work ok: > ######################################################## > #!/bin/sh > > echo '--- > parameters: > ' > > exit 0 > > ######################################################## > > > > > *_Nodejs script example:_* > ######################################################## > #!/usr/bin/env node > > var yaml = require('js-yaml'); > > //Initialize ENC classes > var nodeParameters = {}; > var nodeClasses = {}; > > /* > Fill parameters and classes objects > */ > > var nodeConfig = {classes: nodeClasses, parameters: nodeParameters}; > console.log(yaml.safeDump(nodeConfig)); > process.exit(0); > ######################################################## > > > Some idea about what i'm doing wrong, or how can debug this error? > > Thanks! > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/7976eb3c-1f20-4d2c-98f4-3e19b33a8eca%40googlegroups.com. > For more options, visit https://groups.google.com/groups/opt_out. -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/52C80E0B.2020005%40jasonantman.com. For more options, visit https://groups.google.com/groups/opt_out.