Thank you so much man. Your post saved a lot of my time. 

On Wednesday, August 24, 2011 at 8:53:39 PM UTC+5:30, Luke Bigum wrote:
>
> 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 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/ef347c82-0b4a-48a9-9901-cb5396ed49fe%40googlegroups.com.

Reply via email to