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 400 226 Pb de com avec l'agent

Bonjour,

J'ai un problème que je n'arrive pas à résoudre. J'ai un vieil OCS agent 2.0.0 sous windows que je souhaite mettre à jour.

Pour cela, j'ai d'abord mis à jour le serveur selon la procédure du WIKI (de 2.3.1 de mèmoire à la dernière 2.5),  j'ai récupéré mes fichiers de conf et cela semble ok.

La ou cela pose problème c'est quand j'essaye d'utiliser le dernier agent 2.4.0.0, impossible de le faire communiquer avec le serveur. J'ai a peu près changer tous les paramétres , mais impossible, j'ai une erreur 400 dans les logs de l'agent :

    COM SERVER => Sending HTTP Post request to URL <http://172.16.255.206/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #400>

J'ai désinstallé et réinstallé le client.

J'ai réduis le fichier ocsinventory.ini à a sa plus simple expression :

[OCS Inventory Agent]

ComProvider=ComHTTP.dll

Debug=1

Local=

NoSoftware=0

HKCU=0

NoTAG=1

IpDisc=

[HTTP]

Server=http://172.16.255.206/ocsinventory

SSL=0

CaBundle=cacert.pem

AuthRequired=0

User=

Pwd=

ProxyType=0

Proxy=

ProxyPort=0

ProxyAuthRequired=0

ProxyUser=

ProxyPwd=

[OCS Inventory Service]

TTO_WAIT=60

INVENTORY_ON_STARTUP=1

Voici le résultat de mon fichier de log :

coté client :

tarting OCS Inventory NG Agent on Friday, August 17, 2018 14:12:44.
AGENT => Running OCS Inventory NG Agent Version 2.4.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.4.0.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) successfully 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.4.0.0>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <V17-7201-2018-08-17-13-54-42> and MACs <00:15:5D:F7:3C:1A> 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://172.16.255.206/ocsinventory>
    COM SERVER => HTTP Post response received <HTTP Status Code #400>
    COM SERVER => Cleaning cURL library
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.

Coté serveur :

fichier activity.log

Fri Aug 17 14:06:49 2018;315;100;P17-0583-2018-08-14-07-49-24;192.168.7.60;OCS-NG_WINDOWS_AGENT_v2.0.0.24;prolog;accepted
Fri Aug 17 14:06:49 2018;315;311;P17-0583-2018-08-14-07-49-24;192.168.7.60;OCS-NG_WINDOWS_AGENT_v2.0.0.24;session;started
Fri Aug 17 14:06:53 2018;65506;322;P17-0583-2018-08-14-07-49-24;192.168.7.60;OCS-NG_WINDOWS_AGENT_v2.0.0.24;notify;IP
Fri Aug 17 14:07:12 2018;65394;400;V17-7201-2018-08-17-13-54-42;172.16.255.201;OCS-NG_WINDOWS_AGENT_v2.4.0.0;useragent;Bad agent or agent version too recent for server !!
Fri Aug 17 14:07:12 2018;65394;106;V17-7201-2018-08-17-13-54-42;172.16.255.201;OCS-NG_WINDOWS_AGENT_v2.4.0.0;prolog;stopped by module
Fri Aug 17 14:07:12 2018;65394;515;V17-7201-2018-08-17-13-54-42;172.16.255.201;OCS-NG_WINDOWS_AGENT_v2.4.0.0;end;bad_request

On notera que les clients 2.0 continue à fonctionner 

coté error.log

j'ai cela au démarrage du demaon apache

[Fri Aug 17 13:04:59.219527 2018] [mpm_prefork:notice] [pid 64946] AH00170: caught SIGWINCH, shutting down gracefully
[Fri Aug 17 13:05:00.510928 2018] [core:notice] [pid 65104] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Fri Aug 17 13:05:00.512086 2018] [suexec:notice] [pid 65104] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Fri Aug 17 13:05:00.513624 2018] [ssl:warn] [pid 65104] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
ocsinventory-server: Can't load SOAP::Transport::HTTP* - Web service will be unavailable
[Fri Aug 17 13:05:00.700253 2018] [auth_digest:notice] [pid 65104] AH01757: generating secret for digest authentication ...
[Fri Aug 17 13:05:00.701168 2018] [lbmethod_heartbeat:notice] [pid 65104] AH02282: No slotmem from mod_heartmonitor
[Fri Aug 17 13:05:00.702748 2018] [ssl:warn] [pid 65104] AH02292: Init: Name-based SSL virtual hosts only work for clients with TLS server name indication support (RFC 4366)
[Fri Aug 17 13:05:00.774496 2018] [mpm_prefork:notice] [pid 65104] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.0.28 mod_perl/2.0.10 Perl/v5.16.3 configured -- resuming normal operations
[Fri Aug 17 13:05:00.774526 2018] [core:notice] [pid 65104] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

au niveau access.log

172.16.255.201 - - [17/Aug/2018:14:04:07 +0200] "POST /ocsinventory HTTP/1.1" 400 226 "-" "OCS-NG_WINDOWS_AGENT_v2.4.0.0"

Bref je suis un peu à court d'idée

Peut être est-ce lié à mes fichiers de conf qui sont vieux que j'ai depuis une vieille version 2 ?

Merci par avance !

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

2 Answers

0 votes
Juste pour info,

j'ai tenté l'installation avec l'avant dernier version de l'agent 2.3.1.1 et ça marche.

A mon avis il y a un bug, lors de la comparaison des versions du serveurs et  du client.

J'ai jeté un oeil sur le code, mais je ne suis pas compétent en perl, pour en être sur à 100% ou pour proposer un correctif.
by (160 points)
0 votes
Bonjour,

J'ai le même problème et les mêmes symptômes. Avez-vous trouvé une solution pour utiliser l'agent en v2.4 sur un OCS Server en v2.5 ?

Merci
by (140 points)
 
Powered by Question2Answer
...