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.

Problème de remontée d'inventaire

Bonjour,

J'ai réussi à installer un OCS Server sous Ubuntu 15.10 (Version 2.2.1)

Pour mes machines Windows, je déploie l'agent OCS Inventory via une GPO qui marche super bien.

Le problème c'est qui'il n'y a pas de remontée d'inventaire vers mon serveur OCS Inventory. (Aucune machine n'apparaît dans mon interface ocsreports.

Quand je lance "Afficher les informations d'inventaire" (clic droit sur l'icone de l'agent OCS installé sur ma machine), j'ai le message d'erreur suivant : PJ

Merci de bien vouloir m'orienter vers une bonne piste 

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

1 Answer

0 votes
Bonjour,

Pourriez-vous fournir les logs de l'agent ?  C:\ProgramData\OCS Inventory NG\Agent\OCSInventory.log

Merci
by (6.9k points)
Désolée pour ce retard!!

En réalité j'ai recommencé la quasi totalité du travail...j'avais réinstallé l'Ocsinventory NG version 2.1.2; pourtant j'ai gardé la même GPO d'installation de l'agent OCS pour mes machines Windows.

Malheureusement, l'inventaire se fait localement mais ne s'affiche pas sur l'interface ocsreports!!

z-ocsinventory-server.conf :

IfModule mod_perl.c>
 
  # Which version of mod_perl we are using
  # For mod_perl <= 1.999_21, replace 2 by 1
  # For mod_perl > 1.999_21, replace 2 by 2
  PerlSetEnv OCS_MODPERL_VERSION 2

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

  # Slave Database settings
  # Replace localhost by hostname or ip of MySQL server for READ
  # Useful if you handle mysql slave databases
  # PerlSetEnv OCS_DB_SL_HOST localhost
  # Replace 3306 by port where running MySQL server, generally 3306
  # PerlSetEnv OCS_DB_SL_PORT_SLAVE 3306
  # User allowed to connect to database
  # PerlSetEnv OCS_DB_SL_USER ocs
  # Name of the database
  # PerlSetEnv OCS_DB_SL_NAME ocsweb
  # Password for user
  # PerlSetVar OCS_DB_SL_PWD ocs

dbconfig.inc.php :

<?php
define("DB_NAME", "ocsweb");
define("SERVER_READ","localhost");
define("SERVER_WRITE","localhost");
define("COMPTE_BASE","ocs");
define("PSWD_BASE","XXXXX");
?>
Voici le script de déploiement de l'agent OCS par GPO :

REM **** This is the fully qualified domain name of your OCS Inventory ng server.
set OCSSERVER=http://X.X.X.X/ocsinventory

REM **** Network port used by apache
REM **** If different change it. Ex. 8080
set PORT=80

REM **** You must put here the address of your file server where OCS-NG-Windows-Agent-Setup.exe is.
REM **** For exemple :
REM **** If OCS-NG-Windows-Agent-Setup.exe is on \\filesserver\public\ocs\OCS-NG-Windows-Agent-Setup.exe
REM **** you must put : fileserver\public\ocs
set INSTALLSERVER=Mon_serveur_AD\ocs_agent

REM **** Set to ON if you want install the SSL certificat and activate deployement feature
REM **** before enable it : put the file cacert.pem on the sames directory as OCS-NG-Windows-Agent-Setup.exe
set DEPLOYE=ON

IF %PROCESSOR_ARCHITECTURE%==x86 SET INSTALLDIR=%ProgramFiles%
IF %PROCESSOR_ARCHITECTURE%==AMD64 SET INSTALLDIR=%ProgramFiles(x86)%

IF EXIST "%INSTALLDIR%\OCS Inventory agent\OCSInventory.exe" goto upgrade

:install
\\%INSTALLSERVER%\OCS-NG-Windows-Agent-Setup /S /SERVER=%OCSSERVER%:%PORT%/ocsinventory /NOSPLASH /DEBUG /NOW
cd "%INSTALLDIR%\OCS Inventory agent\"
echo pwouet > %VERSION%.txt
goto end

:upgrade
IF EXIST "%INSTALLDIR%\OCS Inventory agent\%VERSION%.txt" goto end
\\%INSTALLSERVER%\OCS-NG-Windows-Agent-Setup /S /SERVER=%OCSSERVER%:%PORT%/ocsinventory /NOSPLASH /DEBUG /NOW
cd "%INSTALLDIR%\OCS Inventory agent\"
echo pwouet > %VERSION%.txt

:end
IF NOT %DEPLOYE%==ON goto endend
IF EXIST "%INSTALLDIR%\OCS Inventory NG\Agent\cacert.pem" goto endend
xcopy \\%INSTALLSERVER%\cacert.pem "%ALLUSERSPROFILE%\OCS Inventory agent\" /Y

:endend

*******************************

Le problème c'est que je n'est pas "cacert.pem" dans le répertoire Mon_serveur_AD\ocs_agent (emplacement de l'agent à installer)
Normalement, même sans certificat les ordinateurs devraient être remontés. Le certificat est utilise uniquement en cas déploiemet. Pourriez-vous m'envoyer les logs d'execution de l'agent ?
ocsinventory.log.bak :

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, August 24, 2016 09:40:25.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.3
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.3
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.3>
AGENT => Writing configuration to file <C:\ProgramData\OCS Inventory NG\Agent\ocsinventory.ini>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:02.

==============================================================================
Starting OCS Inventory NG Agent on Wednesday, August 24, 2016 09:40:29.
AGENT => Running OCS Inventory NG Agent Version 2.1.1.3
AGENT => Using OCS Inventory NG FrameWork Version 2.1.1.3
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.1.1.3>
AGENT => Sending Prolog
ERROR *** AGENT => Failed to send Prolog <HTTP Status Code #404>
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:01.

Localement, l'inventaire s'affiche bien : 

 
Powered by Question2Answer
...