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.

AGENT => Failed to send Prolog

Bonjour,

je suis en train de finir l'installation de mon serveur OCS d'intégration. Il n'accepte pas de remontée d'inventaire....

Serveur : Ubuntu 12.04, Apache 2.2.29, Perl 5.14.2, Php 5.5.29, MySQL 5.5.43, OCs Inventory NG 2.1.2
site web d'administration fonctionnel (mais mon serveur est vide d'inventaire)
SSL OK sur interface site web d'administration 

Client : windows 7 32b, Ocs Agent OCS 2.1.1
Cet agent fonctionne sur un autre serveur OCS.


Hello,

I try to finish the installation of OCS on my QA server. But the server don't accept inventory from client.

Server : Ubuntu 12.04, Apache 2.2.29, Perl 5.14.2, Php 5.5.29, MySQL 5.5.43, OCs Inventory NG 2.1.2
Admin website : OK
SSL OK on Admin website

Client : windows 7 32b, Ocs Agent OCS 2.1.1
This agent work fine on another  OCS.server.


Extrait du z-ocsinventory-server.conf / part of z-ocsinventory-server.conf

  # 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 mypassword


  # If you need to specify a mysql socket that the client's built-in
  PerlSetEnv OCS_OPT_DBI_MYSQL_SOCKET "/moteurs/mysql/product/mysql-5.5.43-linux2.6-x86_64/mysql.sock"
  # DBI verbosity
  PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 1


dbconfig.inc.php :

<?php
define("DB_NAME", "ocsweb");
define("SERVER_READ","localhost");
define("SERVER_WRITE","localhost");
define("COMPTE_BASE","ocs");
define("PSWD_BASE","mypassword");
?>


Le fichier ocsinventory.ini sur la machine inventoriée / ocsinventory.ini from the client :

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


OCSInventory.log sur la machine inventoriée / from the client OCSInventory.log :

==============================================================================
Starting OCS Inventory NG Agent on Tuesday, October 06, 2015 16:35:09.
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\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.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 <cacert.pem>
    COM SERVER => Sending fileGet request to URL <https://xxxxxxx.xxxxxxxxxx/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 <P64L03BIAST-2015-10-06-10-54-27> and MACs <00:26:B9:A0:E4:F390:4C:E5:AB:A6:290A:00:27:00:00:00> 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 <cacert.pem>
    COM SERVER => Sending HTTP Post request to URL <https://xxxxxxxxxxxxxxxxxx.xxxxxxxxxx/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 Prolog <HTTP Status Code #500>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:01.

 

Error Log Apache

[Tue Oct 06 16:27:45 2015] [notice] Apache/2.2.29 (Unix) mod_ssl/2.2.29 OpenSSL/1.0.1 PHP/5.5.29 mod_perl/2.0.9 Perl/v5.14.2 configured -- resuming normal operations
[Tue Oct 06 16:27:51 2015] [error] [client 10.148.194.196] mpxs_Apache2__RequestRec_print: $r->print can't be called before the response phase at /usr/local/share/perl/5.14.2/Apache/Ocsinventory/Server/Communication.pm line 170.\n

 

Qu'ai je manqué ? J'ai lu à plusieurs reprise que l'erreur 500 était liée à un soucis de mot de passe MySQL, et j'ai pourtant vérifié ce point...


Did I miss something ? I read several times that Error 500 is due to problem with MySQL password but I've checked that...

in OCS Inventory NG server for Unix by (3.7k points)
edited by

3 Answers

0 votes
Bonjour,

En désactivant SSL, as-tu les mêmes erreurs?

Cordialement

Frank
by (90.4k points)

Bonsoir,

Helas oui :

==============================================================================
Starting OCS Inventory NG Agent on Tuesday, October 06, 2015 19:22:13.
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\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.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 => Disabling cURL SSL server validation support
    COM SERVER => Sending fileGet request to URL <http://xxxxxxxxxxxx/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 <P64L03BIAST-2015-10-06-10-54-27> and MACs <00:26:B9:A0:E4:F390:4C:E5:AB:A6:290A:00:27:00:00:00> 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://xxxxxxxxxxxxxxxxx/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 Prolog <HTTP Status Code #500>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:10.

 

0 votes

Bonjour,
Petit update de mon problème. Après une revue méticuleuse de mes fichiers de conf et autres php.ini... , j'ai tenté les manipulations suivante, hélas infructueuse (remontée d'erreur identique):

  1. Remplacer l'utilisateur MySQL par le root MySQL
  2. Enlever le SSL.

De plus, j'ai aussi vérifié que :

  1. mettre un mauvais user MySQL ou un mauvais nom de server MySQL changeait la séquence d'erreur.
  2. mod_perl était bien chargé (confimé par phpinfo() et par la manip décrite ici : http://ask.ocsinventory-ng.org/1280/agent-cant-comunicate-with-server-404?show=1280#q1280 )
  3. Faire un import local abouti à une erreur 400 : Error HTTP/1.1 400 Bad Request

Si vous avez un début d'idée ou de piste à suivre, ne vous gêner pas de me les suggérer.

Cordialement,
Bexounet


Hello,

small update of my problem. After a control of my conf files and php.ini... I have tested these operations, but with failure (same error sequence)

  1. replace MySQL user with the "root" MySQL account
  2. disable SSL.

And, I also checked that :

  1. use a bad MySQL credential or a bad MySQL server name change the error sequence
  2. mod_perl is loaded (confimed with phpinfo() and with the operation describe here: http://ask.ocsinventory-ng.org/1280/agent-cant-comunicate-with-server-404?show=1280#q1280 )
  3. A local import end with a error 400 : Error HTTP/1.1 400 Bad Request

If have an idea or just the beginning of idea about this problem, don't hesitate to say it.

Regards,
Bexounet

by (3.7k points)
edited by
0 votes

Bonjour,
2eme petit update de mon problème.

Pour simplifier la configuration, j'ai maintenant :

  1. Remplacer l'utilisateur MySQL par le root MySQL
  2. Enlever le SSL.

La séquence d'erreur est la même.

Par contre, faire un import local importe bien l'inventaire mais termine sur une erreur 500 : Error HTTP/1.1 500 Internal Server Error

Je n'arrive pas me souvenir comment j'ai eu cette erreur 400 lors de l'import local.

Cordialement,
Bexounet


Hello,

second small update of my problem.

To simplify my configuration, I have :

  1. replace MySQL user with the "root" MySQL account
  2. disable SSL.

The error sequence is still the same.
But, a local import successfully import the inventory but end with a error 500 : Error HTTP/1.1 500 Internal Server Error
I don't remember how I have got the previous error 400 on local import.


Regards,
Bexounet

by (3.7k points)

I have the same error "$r->print can't be called before the response phase at /usr/local/share/perl/5.14.2/Apache/Ocsinventory/Server/Communication.pm line 170.\n"

 

Did you find any resolution to this?

For me, downgrading to mod_perl 2.0.8 instead of 2.0.9 fixed this.
Thank you very much for this information. I still have the problem.
I will check that solution.

Regards,
Bexounet.
 
Powered by Question2Answer
...