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

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

Failed to send Inventory <HTTP Status Code #500>

Hi,

As many others, I'm faced with the issue that I get the following error when clients try to send the inventory to the server:
ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>

My server runs version 2.6 at the moment. I've tried all the solutions I could find but to no avail. So, I've checked the credentials for the database in both z-ocsinventory-server.conf  and zz-ocsinventory-restapi.conf, and confirmed manually using the MySQL command line client that these allow me to connect to the database.

I've also read that you cannot use a client higher than your server version, so I tried downgrading the client from 2.6 to 2.4 and even 2.0.5, which is the lowest version I could find.

In the client log I get:
Starting OCS Inventory NG Agent on Friday, September 25, 2020 13:51:34.
AGENT => Running OCS Inventory NG Agent Version 2.0.5.0
AGENT => Using OCS Inventory NG FrameWork Version 2.0.5.0
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) succesfully 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 <2.0.5.0>
    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 => Disabling cURL SSL server validation support
    COM SERVER => Sending fileGet request to URL <http://145.xxx.xxx.xxx/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 <WIN-MBL-A14896-2020-09-25-13-22-05> and MACs <60:F2:62:8E:11:3D02:05:85:7F:EB:8100:50:56:C0:00:0800:50:56:C0:00:01E8:D8:D1:E7:C2:FF60:F2:62:8E:11:3E60:F2:62:8E:11:41> 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 <http://145.xxx.xxx.xxx/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #200>
    COM SERVER => Cleaning cURL library
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
    AGENT => Prolog Frequency set to 6 hour(s)
AGENT => Inventory required
...
    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 <http://145.xxx.xxx.xxx/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #500>
    COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>
AGENT =>  Communication Server ask for Package Download
    DOWNLOAD => Package history file successfully cleaned for duplicate IDs
    DOWNLOAD => Download disabled by server
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:07.

And in the Apache2 access_log I get:
145.xxx.xxx.xxx - - [25/Sep/2020:13:52:46 +0200] "GET /ocsinventory/deploy/label HTTP/1.1" 400 900 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"
145.xxx.xxx.xxx - - [25/Sep/2020:13:52:46 +0200] "GET /ocsinventory/deploy/label HTTP/1.1" 400 900 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"
145.xxx.xxx.xxx - - [25/Sep/2020:13:52:47 +0200] "POST /ocsinventory HTTP/1.1" 200 235 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"
145.xxx.xxx.xxx - - [25/Sep/2020:13:52:47 +0200] "POST /ocsinventory HTTP/1.1" 200 235 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"
145.xxx.xxx.xxx - - [25/Sep/2020:13:52:52 +0200] "POST /ocsinventory HTTP/1.1" 500 990 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"
145.xxx.xxx.xxx - - [25/Sep/2020:13:52:52 +0200] "POST /ocsinventory HTTP/1.1" 500 990 "-" "OCS-NG_WINDOWS_AGENT_v2.0.5.0"

I have no clue as what to try next. So any help will be greatly appreciated.

Kind regards,
Louis

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

Please log in or register to answer this question.

 
Powered by Question2Answer
...