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

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

My agent did not back information to the OCS Server HTTP Post response received <HTTP Status Code #400>

Hello,

My agent does not make inventory. I have a connection to the http://ipserveur/ocsreports but the inventory doesn't work. I try to see wikis and forum but i can't find the solution. If you find it.
This is the log of the agent:

==============================================================================
Starting OCS Inventory NG Agent on Thursday, February 25, 2016 15:44:04.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.1
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.1
AGENT => Loading plug-in(s)
    DLL PLUGIN => Searching for Plug-in DLL(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
    DLL PLUGIN => 0 DLL Plug-in(s) succesfully loaded on 0 DLL(s) found
AGENT => Using network connection with Communication Server
    COM PROVIDER => Loading Communication Provider <C:\Program Files (x86)\OCS Inventory Agent\ComHTTP.dll>
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.1>
    AGENT => Sending getLabel request
    COM SERVER => Initializing cURL library for getFile
    COM SERVER => Using cURL without server authentication
    COM SERVER => Disabling cURL proxy support
    COM SERVER => Enabling cURL SSL server validation support using CA Bundle <C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
    COM SERVER => Sending fileGet request to URL <http://192.168.2.212/ocsinventory/deploy/label>
    COM SERVER => fileGet response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
    AGENT => Failed to retrieve Label <HTTP Status Code #400>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <DESKTOP-NR1C03H-2016-01-25-10-24-51> and MACs <34:02:86:35:3F:5F74:2B:62:ED:0B:2034:02:86:35:3F:5E> 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 => Enabling cURL SSL server validation support using CA Bundle <C:\ProgramData\OCS Inventory NG\Agent\cacert.pem>
    COM SERVER => Sending HTTP Post request to URL <http://192.168.2.212/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:01.

 

This is the configuration of the ocsinventory.ini file:

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=2
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://192.168.2.212/ocsinventory
SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=60
PROLOG_FREQ=10

Cordially.

in OCS Inventory NG agent for Windows by (140 points)

1 Answer

0 votes
Hi,

This means your agent is too recent than the server. Use same version for agent and server.

Regards

Frank
by (78.6k points)
Hello,

I checked agent version and i have OCS Inventory NG Agents 2.1.2 and OCS Inventory NG

Management server 2.2. And when i go on http://www.ocsinventory-ng.org/en/download/download-server.html

OCS It is say "Inventory NG server are compatible only with current major version of the OCS Inventory NG agents"or older versions."

However, I have noticed that i have a version of server that  is newer version than agent.

I checked my apache log and i have:

192.168.2.166 - - [26/Feb/2016:08:44:27 +0100] "GET /ocsinventory/deploy/label HTTP/1.1" 404 463 "-" "OCS-NG_WINDOWS_AGENT_v2.1.1.1"
192.168.2.166 - - [26/Feb/2016:08:44:27 +0100] "POST /ocsinventory HTTP/1.1" 404 450 "-" "OCS-NG_WINDOWS_AGENT_v2.1.1.1"

Do you know how my agent can update the inventory ?

Cordially.
So i have found a solution to my problem. I had to install a perl module on the server with the command:
apt-get install perl -MCPAN -e 'install XML::Entities'
apt-get install perl -MCPAN -e 'install SOAP::Lite'

It worked for me, i hope it will be the same think for you.
 
Powered by Question2Answer
...