Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Error after upgrade linux agent to 2.8.0.

Hello

After upgrade ocsinventory-agent from 2.6.0 to 2.8.0 I have error when try to run it manually:

Unable to recognise encoding of this document at /usr/share/perl5/vendor_perl/XML/SAX/PurePerl/EncodingDetect.pm line 100.
Document requires an element [Ln: 1, Col: 0]

In log with --debug I see:

runWithTimeout(): unexpected error: Can't use string ("postfix") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/vendor_perl/Ocsinventory/Agent/Backend/OS/Generic/Users.pm line 52.

Agent was installed (and upgraded) from repo: baseurl=http://rpm.ocsinventory-ng.org/enterprise/7/$basearch/

System: CentOS Linux release 7.8.2003 (Core).

Strange thing is that I have many others CentOS servers and agent 2.8 working on them without problems.

SK

in OCS Inventory NG agent for Unix by (450 points)

5 Answers

0 votes

Full logs:

[Thu Oct 15 13:08:00 2020][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.8.0
[Thu Oct 15 13:08:00 2020][debug] Log system initialised (File)
[Thu Oct 15 13:08:00 2020][debug] --scan-homedirs missing. Don't scan user directories
[Thu Oct 15 13:08:00 2020][debug] Accountinfo file: /var/lib/ocsinventory-agent/http:__ocsinventory.pbw.org.pl_ocsinventory/ocsinv.adm
[Thu Oct 15 13:08:00 2020][debug] OCS Agent initialised
[Thu Oct 15 13:08:00 2020][debug] Turns hooks on for /etc/ocsinventory/modules.conf
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.8.0
[Thu Oct 15 13:08:00 2020][debug] Log system initialised (File)
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory unified agent for UNIX, Linux and MacOSX 2.8.0
[Thu Oct 15 13:08:00 2020][debug] Log system initialised (File)
[Thu Oct 15 13:08:00 2020][debug] Calling handlers : `start_handler'
[Thu Oct 15 13:08:00 2020][debug] [snmpscan] Calling snmp_start_handler
[Thu Oct 15 13:08:00 2020][debug]  - Net::SNMP loaded
[Thu Oct 15 13:08:00 2020][debug] [download] Calling download_start_handler
[Thu Oct 15 13:08:00 2020][debug]  - LWP loaded
[Thu Oct 15 13:08:00 2020][debug]  - LWP::Protocol::https loaded
[Thu Oct 15 13:08:00 2020][debug] Compress::Zlib is available.
[Thu Oct 15 13:08:00 2020][debug] Calling handlers : `prolog_writer'
[Thu Oct 15 13:08:00 2020][debug] sending XML
[Thu Oct 15 13:08:00 2020][debug] sending: <?xml version="1.0" encoding="UTF-8"?>
<REQUEST>
  <DEVICEID>montana-2020-09-07-14-01-02</DEVICEID>
  <QUERY>PROLOG</QUERY>
</REQUEST>
[Thu Oct 15 13:08:00 2020][debug] =BEGIN=SERVER RET======
[Thu Oct 15 13:08:00 2020][debug] $VAR1 = '<?xml version=\'1.0\' encoding=\'UTF-8\'?>
<REPLY>
  <OPTION>
    <NAME>DOWNLOAD</NAME>
    <PARAM FRAG_LATENCY="10" PERIOD_LATENCY="1" ON="0" TYPE="CONF" CYCLE_LATENCY="60" TIMEOUT="30" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" />
  </OPTION>
  <RESPONSE>SEND</RESPONSE>
  <INVENTORY_ON_STARTUP>1</INVENTORY_ON_STARTUP>
  <PROLOG_FREQ>4</PROLOG_FREQ>
</REPLY>
';
[Thu Oct 15 13:08:00 2020][debug] =END=SERVER RET======
[Thu Oct 15 13:08:00 2020][debug] PROLOG_FREQ has not changed since last process
[Thu Oct 15 13:08:00 2020][debug] Calling handlers : `prolog_reader'
[Thu Oct 15 13:08:00 2020][debug] [snmpscan] Calling snmp_prolog_reader
[Thu Oct 15 13:08:00 2020][debug] [download] Calling download_prolog_reader
[Thu Oct 15 13:08:00 2020][debug] [download] <?xml version='1.0' encoding='UTF-8'?>
<REPLY>
  <OPTION>
    <NAME>DOWNLOAD</NAME>
    <PARAM FRAG_LATENCY="10" PERIOD_LATENCY="1" ON="0" TYPE="CONF" CYCLE_LATENCY="60" TIMEOUT="30" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" />
  </OPTION>
  <RESPONSE>SEND</RESPONSE>
  <INVENTORY_ON_STARTUP>1</INVENTORY_ON_STARTUP>
  <PROLOG_FREQ>4</PROLOG_FREQ>
</REPLY>
[Thu Oct 15 13:08:00 2020][debug] [download] Writing config file.
[Thu Oct 15 13:08:00 2020][info] [download] Download is off.
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::IpDiscover::IpDiscover ignored
[Thu Oct 15 13:08:00 2020][debug]  - nmap found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::IpDiscover::Nmap ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::AIX ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::BSD ignored
[Thu Oct 15 13:08:00 2020][debug]  - dmidecode found
[Thu Oct 15 13:08:00 2020][debug]  - dmidecode found
[Thu Oct 15 13:08:00 2020][debug]  - Sys::Hostname loaded
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Ipmi ignored
[Thu Oct 15 13:08:00 2020][debug]  - lspci found
[Thu Oct 15 13:08:00 2020][debug]  - lspci found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Lsusb ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::AppImage ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::BSDpkg ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Deb ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Flatpak ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Gentoo ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Pacman ignored
[Thu Oct 15 13:08:00 2020][debug]  - rpm found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Packaging::Snap ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Printers::Cups ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Repository::BSD ignored
[Thu Oct 15 13:08:00 2020][debug]  - yum found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Repository::Debian ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Generic::Repository::Rhel ignored
[Thu Oct 15 13:08:00 2020][debug]  - /etc/passwd can be read
[Thu Oct 15 13:08:00 2020][debug]  - /etc/group can be read
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::HPUX ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::ARM ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::Alpha ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::MIPS ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::PowerPC ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::SPARC ignored
[Thu Oct 15 13:08:00 2020][debug]  - lscpu found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::m68k ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Archs::s390x ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::LSB ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::ArchLinux ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Debian ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Fedora ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Gentoo ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Knoppix ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Mandrake ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Mandriva ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Oracle ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Redhat ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Slackware ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::SuSE ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Trustix ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::Ubuntu ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::VmWare ignored
[Thu Oct 15 13:08:00 2020][debug]  - /etc/os-release can be read
[Thu Oct 15 13:08:00 2020][debug]  - hostname found
[Thu Oct 15 13:08:00 2020][debug]  - df found
[Thu Oct 15 13:08:00 2020][debug]  - pvs found
[Thu Oct 15 13:08:00 2020][debug]  - /proc/meminfo can be read
[Thu Oct 15 13:08:00 2020][debug]  - ip found
[Thu Oct 15 13:08:00 2020][debug]  - ip found
[Thu Oct 15 13:08:00 2020][debug]  - Net::IP qw(:PROC) loaded
[Thu Oct 15 13:08:00 2020][debug]  - lsscsi found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::3ware ignored
[Thu Oct 15 13:08:00 2020][debug]  - smartctl found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::Adaptec ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::FusionIO ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::HP ignored
[Thu Oct 15 13:08:00 2020][debug]  - smartctl found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::Lsilogic ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::Megacli ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Storages::ServeRaid ignored

by (450 points)
0 votes

logs continued...

[Thu Oct 15 13:08:00 2020][debug]  - mount found
[Thu Oct 15 13:08:00 2020][debug]  - /proc/uptime can be read
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Videos ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::MacOS ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Solaris ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Docker ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Jails ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Libvirt ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Lxc ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Parallels ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Qemu ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::SolarisLdoms ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::SolarisZones ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::VirtualBox ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::VmWareDesktop ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::VmWareESX ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::VmWareWorkstation ignored
[Thu Oct 15 13:08:00 2020][debug]  - dmidecode found
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Xen::XL ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Xen::XM ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::Virtualization::XenCitrixServer ignored
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB::CentOS disabled because of a 'runMeIfTheseChecksFailed' in 'Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB'
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB disabled because of a 'runMeIfTheseChecksFailed' in 'Ocsinventory::Agent::Backend::OS::Linux::Distro::NonLSB'
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::AccessLog
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::DeviceID
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::IpDiscover
[Thu Oct 15 13:08:00 2020][debug] Ocsinventory::Agent::Backend::IpDiscover has no run() function -> ignored
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::Batteries
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::Bios
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::Memory
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::Ports
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::Psu
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::Slots
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Dmidecode::UUID
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Hostname
[Thu Oct 15 13:08:00 2020][debug]  - Sys::Hostname loaded
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Lspci
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Lspci::Controllers
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Lspci::Modems
[Thu Oct 15 13:08:00 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Lspci::Sounds
[Thu Oct 15 13:08:01 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Lspci::Videos
[Thu Oct 15 13:08:01 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Packaging
[Thu Oct 15 13:08:01 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Packaging::ByHand
[Thu Oct 15 13:08:01 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Packaging::RPM
[Thu Oct 15 13:08:01 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Repository
[Thu Oct 15 13:08:01 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Repository::CentOS
[Thu Oct 15 13:08:02 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Screen
[Thu Oct 15 13:08:02 2020][debug]  - monitor-get-edid-using-vbe found
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Generic::Users
[Thu Oct 15 13:08:04 2020][debug] runWithTimeout(): unexpected error: Can't use string ("postfix") as an ARRAY ref while "strict refs" in use at /usr/share/perl5/vendor_perl/Ocsinventory/Agent/Backend/OS/Generic/Users.pm line 52.
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Archs::i386
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Archs::i386::CPU
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Distro::OSRelease
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Domains
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Drives
[Thu Oct 15 13:08:04 2020][debug]  - xfs_db found
[Thu Oct 15 13:08:04 2020][debug]  - xfs_db found
[Thu Oct 15 13:08:04 2020][debug]  - xfs_db found
[Thu Oct 15 13:08:04 2020][debug]  - xfs_db found
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Inputs
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::LVM
[Thu Oct 15 13:08:04 2020][debug]  - pvs found
[Thu Oct 15 13:08:04 2020][debug]  - vgs found
[Thu Oct 15 13:08:04 2020][debug]  - lvs found
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Mem
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Network::IP
[Thu Oct 15 13:08:04 2020][debug]  - ip found
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Network::Networks
[Thu Oct 15 13:08:04 2020][debug]  - ip found
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Storages
[Thu Oct 15 13:08:04 2020][debug]  - udevadm found
[Thu Oct 15 13:08:04 2020][debug]  - udevadm found
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Sys
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::OS::Linux::Uptime
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::Virtualization::Vmsystem
[Thu Oct 15 13:08:04 2020][debug] Running Ocsinventory::Agent::Backend::Virtualization::Xen
[Thu Oct 15 13:08:04 2020][debug] Ocsinventory::Agent::Backend::Virtualization::Xen has no run() function -> ignored
[Thu Oct 15 13:08:04 2020][debug] Calling handlers : `inventory_handler'
[Thu Oct 15 13:08:04 2020][debug] [download] Calling download_inventory_handler

by (450 points)
0 votes
Hi,

This is not a problem from ocs agent.

Is perl-XML-Sax module up to date ? Which differences with other centos ?

Regards

Frank
by (90.4k points)
0 votes

On every server pear-XML-SAX is updated:

Installed Packages
Name        : perl-XML-SAX
Arch        : noarch
Version     : 0.99
Release     : 9.el7
Size        : 125 k
Repo        : installed
From repo   : base
Summary     : SAX parser access API for Perl
URL         : http://search.cpan.org/dist/XML-SAX/

And every server is updated. Almost all are CentOS 7, one 8.

SK

by (450 points)
0 votes
Hi,

Apply this patch (https://github.com/OCSInventory-NG/UnixAgent/pull/315/files) and launch a new inventory.

Regards

Frank
by (90.4k points)
 
Powered by Question2Answer
...