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.

ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>

Bonjour,

Depuis la mise à jour de mon serveur OCS en version 2.2, j'ai un problème pour remonter l'inventaire. J'ai l'erreur "ERROR *** AGENT => Failed to send Inventory <HTTP Status Code #500>".

Mon agent est en version 2.0.5. J'ai essayé la dernière version de l'agent mais j'ai exactement la même erreur.

Pouvez-vous m'aider ? Merci beaucoup !

Log de l'agent : 

==============================================================================
Starting OCS Inventory NG Agent on Tuesday, March 29, 2016 11:48:47.
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 (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.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://ocsinventory-ng.****.com:80/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 <FRME16001-2016-03-25-19-05-43> and MACs <84:7B:EB:0F:A7:E2A4:34:D9:E5:64:8354:1D:29:8A:2A:0D> 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://ocsinventory-ng.****.com:80/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #200>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============
<?xml version='1.0' encoding='UTF-8'?>
<REPLY>
  <OPTION>
    <NAME>DOWNLOAD</NAME>
    <PARAM FRAG_LATENCY="1" PERIOD_LATENCY="1" ON="1" TYPE="CONF" CYCLE_LATENCY="1" TIMEOUT="30" PERIOD_LENGTH="10" EXECUTION_TIMEOUT="120" />
  </OPTION>
  <RESPONSE>SEND</RESPONSE>
  <PROLOG_FREQ>4</PROLOG_FREQ>
</REPLY>

================= TRACE STOP ===============
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
    AGENT => Prolog Frequency set to 4 hour(s)
AGENT => Inventory required
AGENT => Launching hardware and software checks
    INVENTORY => Loading Download history
...
    INVENTORY => XML Update Administrative Information(s)
    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://ocsinventory-ng.*****.com:80/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #500>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============

================= TRACE STOP ===============
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 and setup tool successfully started
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:09.

Et dans le fichier var/log/ocsinventory-server/activity.log j'ai :
Tue Mar 29 13:52:16 2016;758;100;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;prolog;accepted
Tue Mar 29 13:52:16 2016;758;311;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;session;started
Tue Mar 29 13:52:28 2016;2499;318;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;session;missing
Tue Mar 29 13:52:28 2016;2499;114;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;inventory;no_session
Tue Mar 29 13:52:28 2016;2499;104;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;inventory;incoming
Tue Mar 29 13:52:28 2016;2499;113;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;inventory;u:softwares
Tue Mar 29 13:52:28 2016;2499;515;DERN12046-2015-12-15-10-31-26;10.105.82.35;OCS-NG_WINDOWS_AGENT_v2.0.5.0;end;error

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

1 Answer

+1 vote

http://wiki.ocsinventory-ng.org/index.php/Documentation:Main#FAQ

  • Error 500 :

Solution: OCS engine can't comunicate with mysql server. Probably due to a wrong mysql account. You have to check z-ocsinventory-server.conf (ocsinventory-server.conf on Windows Server), exactly theses few lines

  # Master Database settings
  # Replace localhost by hostname or ip of MySQL server for WRITE
  PerlSetEnv OCS_DB_HOST localhost
  # Replace 3306 by port where running MySQL server, generally 3306
  PerlSetEnv OCS_DB_PORT 3306
  # Name of database
  PerlSetEnv OCS_DB_NAME ocsweb
  PerlSetEnv OCS_DB_LOCAL ocsweb
  # User allowed to connect to database
  PerlSetEnv OCS_DB_USER ocs
  # Password for user
  PerlSetVar OCS_DB_PWD ocs

Modify OCS_DB_USER and OCS_DB_PWD with your own account, restart apache, and finaly launch an inventory.

by (22k points)

Hello Kapouik,

Thank you for your answer but my file z-ocsinventory-server.conf is well configured, I search my problem on the website before create a question. Sending Prolog works but not sending inventory, if my database settings wasn't good, I couldn't receive prolog. Do you have another idea ? 

Bonjour,

Je deterre un peu le sujet mais il se trouve que mon serveur OCS a brutalement présenté les mêmes symptômes :

- Prolog successfully sent

- Failed to send Inventory <HTTP Status Code #500>

Après quelques bonnes heures de recherche nous avons trouvé que c'est l'auto-increment du champ ID de la table SOFTWARES qui avait atteint son maximum : 2147483647.

Pour gagner du temps en attendant de trouver une solution plus perenne, j'ai transformé le champ ID de la table SOFTWARES en INT signé. L'ID peut maintenant aller jusqu'à 4294967295 :-)

PI, aucun des fichiers logs du serveur OCS / MySQL ne remontait d'erreur permettant de comprendre l'origine du blocage... y compris en mode debug...

Logiquement on aurait du trouver une erreur du type "ERROR 1467 (HY000): Failed to read auto-increment value from storage engine".

En revanche, on trouvait un peu partout des traces de l'explosion de la table "prolog_conntrack" (table en mémoire) qui, elle, se remplissait à vue d'oeil suite au problème initial (Prolog OK, Inventory KO).

Bref, come je n'ai trouvé cette info sur aucun forum, je la remonte ici. On ne sait jamais :-)

Cdt,

Sylvie

 
Powered by Question2Answer
...