Luke Bigum
2011-Aug-24 15:23 UTC
[Puppet Users] handy tip against unhelpful "Could not intern from pson" error
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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Henrik Lindberg
2011-Aug-24 16:12 UTC
Re: [Puppet Users] handy tip against unhelpful "Could not intern from pson" error
I can''t see any difference between your two examples. Typo? - henrik On 8/24/11 5:23 PM, 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 post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Luke Bigum
2011-Aug-24 16:21 UTC
[Puppet Users] Re: handy tip against unhelpful "Could not intern from pson" error
Cheers, that''ll teach me to cut and paste ;) The second example''s resource name should be without quotes, so: $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 On Aug 24, 5:12 pm, Henrik Lindberg <henrik.lindb...@cloudsmith.com> wrote:> I can''t see any difference between your two examples. > Typo? > - henrik > On 8/24/11 5:23 PM, 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 post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Seemingly Similar Threads
- Puppet catalog transfer often gets truncated (Could not intern from pson: error)
- err: Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target "File[]"
- error: Could not intern from pson: source did not contain any PSON!
- strange pson error...
- Puppet Dashboard error.