Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2023-03-23 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-10775  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
 This is another case where binary data gets into the catalog and then the error presents itself much later when it's too late. We're going to add a warning to puppetserver when this happens (PUP-11787), add a setting so folks can prevent puppetserver from falling back and in Puppet 8 PSON will be going away. I'm going to close this as a dup of PUP-10928.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.20.11#820011-sha1:0629dd8)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.377304.1604596654000.93.1679614020030%40Atlassian.JIRA.


Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2020-11-09 Thread Josh Cooper (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Josh Cooper commented on  PUP-10775  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
 The case where msgpack is installed on the agent and preferred_serialization_format=msgpack, but you get:  
 
 
 
 
 Info: Unable to serialize catalog to json, retrying with pson
  
 
 
 
  means the agent successfully retrieved and deserialized the catalog as richdata+msgpack, but the agent couldn't save the cached catalog as json. This is configured by default in https://github.com/puppetlabs/puppet/blob/1af4a1ad62ec73a1c58cc5f3d073d23a7f889e65/lib/puppet/application/agent.rb#L15. Try running as puppet agent -t --preferred_serialization_format msgpack --catalog_cache_terminus msgpack. Also note msgpack support is experimental. Is there a particular reason why you need/want to use it?  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to 

Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2020-11-06 Thread Henrik Lindberg (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Henrik Lindberg commented on  PUP-10775  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
 A guess here is that binary files that cause it to fail contain sequences that result in invalid UTF-8 encoding. There is a function binary_file() that works like the file() function but it returns a Binary data type instead of a String. That function should be used instead of file() for binary content. This is supported since puppet 6 where the "rich data" catalog format is the default format (it can serialize all of the data types in the Puppet type system in two different encodings; JSON or Msgpack, where JSON is the default). In addition to handling instance of the Binary data type, it also does the right thing if it gets a string in ASCII-8bit encoding as it will be treated the same way as Binary. In a JSON encoding the binary content will be Base64 encoded text, and in Msgpack it will be a Msgpack binary. Hope that helps.  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.377304.1604596654000.73826.1604671620027%40Atlassian.JIRA.


Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2020-11-06 Thread Tim Meusel (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tim Meusel commented on  PUP-10775  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
 wopwop, some progress \o/ I created a testenv and checked it for all binary files:  
 
 
 
 
 ...  
 
 
 root@puppetserver ~ # shopt -s globstar  
 
 
 root@puppetserver ~ # file /etc/puppetlabs/code/environments/msgpack2/modules/*/files/**/* | grep ELF  
 
 
 /etc/puppetlabs/code/environments/msgpack2/modules/mcollective_agent_dockerinfo/files/mcollective/agent/dockerinfo: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), not stripped  
 
 
 /etc/puppetlabs/code/environments/msgpack2/modules/mcollective_agent_user/files/mcollective/agent/user: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, not stripped  
 
 
 ...  
 
 
 root@puppetserver ~ # 
  
 
 
 
  There were some more binary blobs. All not listed blobs are distributed like this:  
 
 
 
 
 file {'bla':  
 
 
   ensure => file,  
 
 
   source => '///..'  
 
 

Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2020-11-05 Thread Tim Meusel (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tim Meusel commented on  PUP-10775  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
 A short update here. After digging alot through the thousands of nodes, I discovered at least a few CentOS 6 derivates with the exact same behaviour as above:  
 
 
 
 
 root ~ # facter -p os  
 
 
 {  
 
 
   architecture => "x86_64",  
 
 
   family => "RedHat",  
 
 
   hardware => "x86_64",  
 
 
   name => "VirtuozzoLinux",  
 
 
   release => {  
 
 
 full => "6.8",  
 
 
 major => "6",  
 
 
 minor => "8"  
 
 
   },  
 
 
   selinux => {  
 
 
 enabled => false  
 
 
   }  
   

Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2020-11-05 Thread Tim Meusel (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tim Meusel commented on  PUP-10775  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
 heyho, please let me know if I should test more things or if you need a specific output  
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)  
 
 

 
   
 

  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-bugs/JIRA.377304.1604596654000.72975.1604596740079%40Atlassian.JIRA.


Jira (PUP-10775) Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`

2020-11-05 Thread Tim Meusel (Jira)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Tim Meusel created an issue  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
 Puppet /  PUP-10775  
 
 
  Puppet agent fails with `Failed to deserialize Puppet::Resource::Catalog`   
 

  
 
 
 
 

 
Issue Type: 
  Bug  
 
 
Assignee: 
 Unassigned  
 
 
Created: 
 2020/11/05 9:17 AM  
 
 
Priority: 
  Normal  
 
 
Reporter: 
 Tim Meusel  
 

  
 
 
 
 

 
 Hey Josh Cooper, I did further debugging for https://tickets.puppetlabs.com/browse/PUP-10772. while doing so I discovered that I've 5 Ubuntu 16.04 machines, all of them currently show the `Failed to deserialize Puppet::Resource::Catalog` error message that I show later  my client:  
 
 
 
 
 root~ # facter -p os  
 
 
 pup{  
 
 
   architecture => "amd64",  
 
 
   distro => {  
 
 
 codename => "xenial",  
 
 
 description => "Ubuntu 16.04.7 LTS",