Not sure if people are already aware of this, but it might save
someone some time in the future. I've been tracking down the following
error today, it's rather unhelpful in telling you where the problem is
in your manifests:

# puppetd --test
info: Retrieving plugin
err: Could not retrieve catalog from remote server: Could not intern
from pson: Could not convert from pson: Could not find relationship
target "Service[]"

The problem is the parser using an empty string as a resource name
which I arrived at by using a variable inside double quotes for a
resource declaration. I did this for style (or have been until now) -
I like to have user defined strings in quotes so it easily
distinguishes between them and puppet keywords, plus for syntax
highlighting, etc. Turns out this personal preference has shot me in
the foot as the difference between the error messages for an empty
string versus an undefined variable is rather big.

See this unhelpful message:

$service_name = "httpd"
service { "$servicename": ensure => running }
err: Could not retrieve catalog from remote server: Could not intern
from pson: Could not convert from pson: Could not find relationship
target "Service[]"

versus this:

$service_name = "httpd"
service { "$servicename": ensure => running }
err: /Stage[main]/Puppet_dashboard::Service/Service[undef]/ensure:
change from stopped to running failed: Could not start Service[undef]:
Execution of '/sbin/service undef start' returned 1:  at /etc/puppet/
environments/testing/modules/httpd/manifests/service.pp:26

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

Reply via email to