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.11.1 available

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

HTTP 400 although agent ist no higher than server [closed]


I have recently updated my OCS Inventory Server to version 2.11.1 on a CentOS 7 server. My Linux agents still can upload their inventory data. But my windows agents get error HTTP 400. I know that HTTP 400 is normally thrown when the agent version is higher than the server version. But my server version is 2.11.1:

 grep GUI_VER_SHOW /usr/share/ocsinventory-reports/ocsreports/var.php

define('GUI_VER_SHOW', '2.11.1');

And my Windows agents are on 2.6.1. Here is the log:


Starting OCS Inventory NG Agent on Friday, December 30, 2022 12:08:38.

AGENT => Running OCS Inventory NG Agent Version

AGENT => Using OCS Inventory NG FrameWork Version

AGENT => Loading plug-in(s)

DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files\OCS Inventory Agent\plugins>

DLL PLUGIN => 0 DLL Plug-in(s) successfully loaded on 0 DLL(s) found

AGENT => Using network connection with Communication Server

COM PROVIDER => Loading Communication Provider <C:\Program Files\OCS Inventory Agent\ComHTTP.dll>

AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <>

AGENT => Sending Prolog

DID_CHECK => Read DeviceID <ATVIEN0632-2021-06-21-08-12-59> and MACs <14:F6:D8:7C:B8:88BC:E9:2F:B3:46:C602:50:41:00:00:01BC:E9:2F:B3:46:C8> in file <ocsinventory.dat>

COM SERVER => Initializing cURL library for sendRequest

COM SERVER => Using cURL without server authentication

COM SERVER => Disabling cURL proxy support

COM SERVER => Disabling cURL SSL server validation support

COM SERVER => Sending HTTP Post request to URL <https://servername/ocsinventory>

COM SERVER => HTTP Post response received <HTTP Status Code #400>

COM SERVER => Cleaning cURL library

================= TRACE START ===============

================= TRACE STOP ===============

ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #400>

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:00.

Any idea why this is happening?

Thank you!

closed with the note: problem solved
in OCS Inventory NG agent for Windows by (240 points)
closed by

3 Answers

0 votes

Just found out that I have the same issue as reported in https://github.com/OCSInventory-NG/OCSInventory-ocsreports/issues/1045

find /usr/ -name Ocsinventory.pm



The problem is that I don't know how to solve it. Any suggestions?

by (240 points)
0 votes
grep -i "::version" `locate Ocsinventory.pm` to verify the value of $Apache::Ocsinventory::VERSION variable.
by (88.5k points)
0 votes

 grep -i "::version" /usr/local/share/perl5/Apache/Ocsinventory.pm

$Apache::Ocsinventory::VERSION = '2.8';

grep -i "::version" /usr/share/perl5/vendor_perl/Apache/Ocsinventory.pm

$Apache::Ocsinventory::VERSION = '2.11.1';

Solved it be renaming the old one, overwriting the new one by one of a fresh installed and restarted Apache. Still not sure what the issue was exactly but happy that it's working again.
by (240 points)
Powered by Question2Answer