Crash when pinging OPSI hosts on Debian Stretch
Description
Crash with the error:
encountered object '1', but neither allow_blessed, convert_blessed nor allow_tags settings are enabled (or TO_JSON/FREEZE method missing) at /usr/share/perl5/POE/Component/Server/JSONR PC.pm line 221.
Distribution Name and Version
Debian Stretch
Argonaut Version
1.3
Origin of perl packages
Debian
Additional Information
The problem seems known https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=869641 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848041 https://rt.cpan.org/Public/Bug/Display.html?id=94784
The solution seems to be to switch from JSON::Any to JSON::MaybeXS
The Debian package libjson-any-perl that libpoe-component-server-jsonrpc-perl currently depends on says the following:
JSON::Any is deprecated. If you're producing new code it is recommended to
use JSON::MaybeXS which will optionally use Cpanel::JSON::XS for speed
purposes.
Note we have one occurence of JSON::XS::is_bool in OPSI.pm which we should probably remove for the switch to work.