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.

demande d'aide - probleme de remonté des inventaires sur le serveur

Bonjour,

Je viens de procéder a l'installation des serveurs OCSinventory et GLPI avec plugin OCSinventory ng sur un Ubuntu serveur sur sa dernière version stable 16.04.2 LTS virtuel. J'ai choisi un serveur viryuel dans un premier temps de temps de tester et surtout en attendant de pouvoir récupérer un serveur physique dédier.

J'ai installé l'agent windows sur le même pc "physique" tournant sous windows 10 pro 64Bit.

Lorsque j'exécute l'agent je n'ai "visiblement" pas d'erreur, cependant rien ne remonte coté serveur (OCS).

Je précise que j'ai installer manuellement l'agent sur le poste dans le seul but de vérifier la communication agent/serveur. Lorsque cela fonctionnera je compte générer un agent pré-configuré avec les bon paramètres et le déployer par GPO sur l'ensemble de mes postes clients (tous sous windows).

Voici le contenu de mon fichier ocsinventory.ini :

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=1
IpDisc=1
[HTTP]
Server=http://192.168.1.XXX/ocsreports
SSL=1
CaBundle=cacert.pem
AuthRequired=1
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0


ProxyUser=
ProxyPwd=
[OCS Inventory Service]
TTO_WAIT=0
PROLOG_FREQ=10
OLD_PROLOG_FREQ=10
INVENTORY_ON_STARTUP=1

Et voici le contenu de mon fichier OCSinventory.log :

==============================================================================
Starting OCS Inventory NG Agent on Tuesday, May 02, 2017 16:53:44.
AGENT => Running OCS Inventory NG Agent Version 2.3.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.3.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.3.0.0>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <XXX-XXX-2017-04-26-09-57-50> and MACs <XX:XX:XX:XX:XX:XXXX:XX:XX:XX:XX:XX> 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 <http://192.168.1.XXX/ocsreports>
    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 10 hour(s)
    AGENT => Inventory on startup option set to  
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.

Merci d'avance pour votre aide.

Sebastien

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

8 Answers

0 votes

authrequired est mis à o 1, as tu renseigné un user/password correct pour que l'agent se connecte au serveur ?
sinon met le à 0

met Debug=1 to Debug=2 ca devrait donner plus d'infos
(il faut arreter ocsservice pour editer le fichier .ini puis redemarrer après) 
quelques tips :
- run ocsinventory.exe /local="cheminVersDossierDeTonChoix" /XML="cheminVersDossierDeTonChoix
  tu peux regarder dans le xml genéré si ya un problème (peu probable)
- sur le serveur regarde activity.log Le log OCS : activity.log
"Pour utiliser ce dernier, il faut activer la fonction de log depuis l'interface d'administration (LOGLEVEL), et modifier le fichier de configuration z-ocsinventory-server.conf pour passer l'option OCS_OPT_DBI_PRINT_ERROR à 1. Pensez à redémarrer apache pour prendre en compte cette modification."
Tu devrai y voir des infos de connexion de l'agent (genre envoi de l'inventaire, erreurs, etc)

by (640 points)
0 votes
Bonjour et merci pour ta réponse.

en faite, j'ai deja fait ces modif depuis le précédent post, mais rien n'y fait.

En fait je me rend compte que l'inventaire en local fonctionne mais lorsque je souhaite le faire communiquer avec le serveur, l'inventaire ne se fait tout simplement pas.
by (280 points)
0 votes
==============================================================================
Starting OCS Inventory NG Agent on Wednesday, May 03, 2017 10:56:02.
AGENT => Running OCS Inventory NG Agent Version 2.3.0.0
AGENT => Using OCS Inventory NG FrameWork Version 2.3.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.3.0.0>
AGENT => Sending Prolog
    DID_CHECK => Read DeviceID <XXXX-XXX-2017-04-26-09-57-50> and MACs <XX:XX:XX:XX:XX:XXXX:XX:XX:XX:XX:XX> 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://192.168.1.XXX/ocsreports>
    COM SERVER => HTTP Post response received <HTTP Status Code #200>
    COM SERVER => Cleaning cURL library
================= TRACE START ===============

================= TRACE STOP ===============
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
    AGENT => Prolog Frequency set to 10 hour(s)
    AGENT => Inventory on startup option set to  
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:00.
by (280 points)
edited by
0 votes
Server=http://192.168.1.202/ocsreports
essaie avec "https" ?
Ce serait bien d'avoir OcsInventory.log avec debug=2, et l'activity.log
by (640 points)
0 votes
Le dernier ocsinventory.log posté est en debug 2.

Même résultat en https.

Où se trouve le fichier activity.log?
by (280 points)
0 votes
C'est bizarre, ton log me semble incomplet. Lorsque que j'effectue un inventaire sur mon agent avec debug=2, j'ai de mon côté bien plus d'informations :

AGENT => Inventory required
AGENT => Launching hardware and software checks
    INVENTORY => Loading Download history (plein d'infos inventaire, ~20 lignes)    
AGENT => Communication Server ask for IpDiscover
    IPDISCOVER => (partie ipdiscover ~ 5 lignes)
    EXECUTABLE PLUGIN => Searching for VBS script(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
    EXECUTABLE PLUGIN => Searching for executable(s) in folder <C:\Program Files (x86)\OCS Inventory Agent\plugins>
AGENT => Sending Inventory
    INVENTORY => Checking last inventory state
    INVENTORY => Logical drives inventory state changed
    INVENTORY => Network adapters inventory state changed
    INVENTORY => Software inventory state changed
INVENTORY => Inventory changed since last run
    INVENTORY => Generating XML document with Device properties
    INVENTORY => XML Update BIOS
    INVENTORY => XML Update 1 CPU(s)
    INVENTORY => XML Update 2 Memory Slot(s)
    INVENTORY => XML Update 3 Input Device(s)
    INVENTORY => XML Update 0 System Port(s)
    INVENTORY => XML Update 4 System Controler(s)
    INVENTORY => XML Update 1 System Slot(s)
    INVENTORY => XML Update 2 Sound Device(s)
    INVENTORY => XML Update 2 Storage Peripheral(s)
    INVENTORY => XML Update 2 Logical Drive(s)
    INVENTORY => XML Update 1 Modem(s)
    INVENTORY => XML Update 5 Network Adapter(s)
    INVENTORY => XML Update 1 Video Adapter(s)
    INVENTORY => XML Update 2 Monitor(s)
    INVENTORY => XML Update 4 Printer(s)
    INVENTORY => XML Update 288 Software
    INVENTORY => XML Update 0 Registry Value(s)
    INVENTORY => XML Update Administrative Information(s)
    INVENTORY => XML Update common Device properties
    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.60.131/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>
  <RESPONSE>NO_ACCOUNT_UPDATE</RESPONSE>
</REPLY>

================= TRACE STOP ===============
AGENT => Inventory successfully sent
    INVENTORY => Writing new inventory state
AGENT =>  Communication Server ask for Package Download
    DOWNLOAD => Package history file cleaning not required
    DOWNLOAD => Download disabled by server
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:45.

On remarque bien qu'il manque toute la partie inventaire, ton agent a d'ailleurs un temps d'éxecution rapide.
peut être une résintallation de l'agent s'impose ? (bien vider programdata/ocsinventory après la désinstallation !)
Il faut que l'agent soit de version égale ou inférieure au serveur d'ailleurs.

/var/log/ocsinventory-server/activity.log
by (640 points)
0 votes
non aucun changement apres désinstallation/réinstallation.

Par ailleurs je n'ai pas de log dans /var/log/ocsinventory-server/ pourtant je les ai bien activés
by (280 points)
+1 vote

Bonjour

L'url http://192.168.1.xxx/ocsreports n'est pas bonne; il faut mettre http://192.168.1.xxx/ocsinventory 

Cordialement

Frank

by (88.5k points)
 
Powered by Question2Answer
...