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.

Configuration qui était ok ne marche plus

Bonjour,

J'ai utilisé il y a à peu près 6 mois Ocs Inventory, le télé déploiement fonctionnait sans problème.

Depuis lors je n'ai pas eu recours au logiciel mis à part pour installer la nouvelle version.

Je réalise depuis quelques jours que désormais ma configuration ne marche plus.

J'ai visité la page https://wiki.ocsinventory-ng.org/09.Extras/Common-errors/ dont j'ai respecté les informations à transmettre, j'ai aussi rajouté la config de /etc/php/8.1/apache2/php.ini.

Du coup trouveriez-vous au travers de toutes ces informations quelque chose à réaliser ?

Il n'y a sinon à priori aucune raison que z-ocsinventory-server.conf zz-ocsinventory-restapi.conf ou encore la page Deployement dans General Configuration soient en cause puisque c'était ok jusqu'alors.

Je vous remercie d'avance pour toute aide, je suis effectivement débutant dans le domaine et j'avoue être à cours d'idées afin que cela refonctionne à par peut-être reprendre la configuration depuis zéro ...

OS

Ubuntu 22.04.2 LTS

Server information

PHP Version : 8.1.2

Web Server : Apache/2.4.52 (Ubuntu)

Database Server : Ubuntu 22.04 version 10.6.12-MariaDB-0ubuntu0.22.04.1

Version OCSReports : 2.11.1

Version de l’agent

OCS-Windows-Agent-2.10.1.0_x64

OCSInventory.log client

Starting OCS Inventory Agent on Tuesday, August 22, 2023 11:09:19.

AGENT => Running OCS Inventory Agent Version 2.10.1.0

AGENT => Using OCS Inventory FrameWork Version 2.10.1.0

AGENT => Loading plug-in(s)

AGENT => Using network connection with Communication Server

AGENT => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.10.1.0>

AGENT => Sending Prolog

AGENT => Prolog successfully sent

AGENT => Inventory required

AGENT => Launching hardware and software checks

AGENT => Sending Inventory

INVENTORY => Inventory changed since last run

AGENT => Inventory successfully sent

AGENT =>  Communication Server asked for Package Download

DOWNLOAD => Package <1692349947> added to download queue

DOWNLOAD => Download and setup tool successfully started

AGENT => Unloading communication provider

AGENT => Unloading plug-in(s)

AGENT => Execution duration: 00:00:09.

 

ocsinventory.ini

[OCS Inventory Agent]

ComProvider=ComHTTP.dll

Debug=0

Local=

NoSoftware=0

HKCU=0

NoTAG=0

IpDisc=

WMI_FLAG_MODE=COMPLETE

DEFAULT_USER_DOMAIN=

[HTTP]

Server=https://xxx.xxx.xxx/ocsinventory

SSL=1

CaBundle=C:\Cacert\cacert.pem

AuthRequired=0

User=

Pwd=

ProxyType=0

Proxy=

ProxyPort=0

ProxyAuthRequired=0

ProxyUser=

ProxyPwd=

[OCS Inventory Service]

PROLOG_FREQ=1

INVENTORY_ON_STARTUP=1

OLD_PROLOG_FREQ=1

TTO_WAIT=1980

Apache error.log

 

[Wed Aug 23 15:36:11.441707 2023] [php:warn] [pid 1669] [client x.x.x.x:xx] PHP Warning:  Trying to access array offset on value of type null in /usr/share/ocsinventory-reports/ocsreports/require/config/include.php on line 133, referer: https://xxx.xxx.xxx/ocsreports/index.php?function=computer&head=1&systemid=217&cat=teledeploy

[Wed Aug 23 15:36:11.441746 2023] [php:warn] [pid 1669] [client x.x.x.x:xx] PHP Warning:  Trying to access array offset on value of type null in /usr/share/ocsinventory-reports/ocsreports/require/config/include.php on line 133, referer: https://xxx.xxx.xxx/ocsreports/index.php?function=computer&head=1&systemid=217&cat=teledeploy

OCS inventory log serveur

 

Dans /var/log/ocsinventory -server il n’y a qu’un activity.log

 

Php.ini version 8.2

 

short_open_tag = On

max_execution_time = 360

memory_limit = 256M

post_max_size = 1001M

file_uploads = On

upload_max_filesize = 1000M

date.timezone = Europe/Paris

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

4 Answers

0 votes

Je rajouterais que le OCSInventory.log coté client ne se met pas tout le temps à jour alors que pourtant côté serveur dans la liste des ordinateurs en inventaire la colonne Last inventory est ok.

by (280 points)
edited by
0 votes
L'install d'une nouvelle version d'OCS recrée les fichiers de conf d'Apache, qui sont à ajuster en particulier pour les identifiants MySQL (MariaDB). peut-être vérifier les certificats pour HTTPS (nécessaires pour le télé-déploiement).

Au niveau serveur, il faut regarder 'access.log' (Apache) et 'activity.log' (OCS), en particulier vérifier le code 200.

Au niveau client, sous Windows, le log est 'bref' et on regarde ET 'ocsinventory.log' (Package added) et 'download.log' (Succes ou pas). (Je préconise de ne pas mettre à jour le client immédiatement mais laisser du temps !). NB : Un download dure AU MOINS 10', patienter plutôt que relancer un inventaire par OCS_Systray ...
by (19.3k points)
0 votes
Rien à signaler dans le access.log de Apache et le activity.log de Ocs.

Par contre j'ai effectivement une erreur dans le download.log coté client :

Starting OCS Inventory Package Download and Setup Tool on Tuesday, August 22, 2023 11:09:28.

DOWNLOAD => Running OCS Inventory Download Version 2.10.1.0

DOWNLOAD => Using OCS Inventory FrameWork Version 2.10.1.0

DOWNLOAD => Using network connection with Communication Server

DOWNLOAD => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.10.1.0>

DOWNLOAD => Starting new period of 10 cycles

DOWNLOAD => Parsing directory <C:\ProgramData\OCS Inventory NG\Agent\download> for packages

DOWNLOAD => Package <1692349947> verified and added to process queue

DOWNLOAD => Downloading package fragment <1692349947-1>

DOWNLOAD => Building package <1692349947>

DOWNLOAD => Executing action <LAUNCH> for package <1692349947>

ERROR *** DOWNLOAD => Will not register package <1692349947> in history: result <ERR_EXECUTE_TIMEOUT> not a success

DOWNLOAD => Sending result code <ERR_EXECUTE_TIMEOUT> for package <1692349947>

ERROR *** DOWNLOAD => Cannot  lock directory <C:\ProgramData\OCS Inventory NG\Agent\download>

DOWNLOAD => Unloading communication provider

DOWNLOAD => Execution duration: 02:02:36.
by (280 points)
0 votes
(Je mentionne 'access.log' parce que c'est le log que je regarde en premier, avec code 200 ou pas ...)

Donc c'est le paquet qui fonctionne mal, et pas le serveur OCS ou une mauvaise config.

Perso, je ne fais que des paquets à l'ancienne : un dossier, le pgm d'installation, un script .cmd qui lance le pgm d'install avec les bons paramètres, le tout zippé ... et ça fonctionne bien.

A noter 'Will not register' : un package sans erreur d'install est enregistré, et avec erreur n'est pas enregistré : si vous tentez de déployer un package (déjà) enregistré, il ne sera pas réinstallé (sauf option). (NB : comme le package est erroné, il faut le supprimer et en créer un nouveau ... qui n'aura pas le même identifiant = timestamp !)
by (19.3k points)
edited by
 
Powered by Question2Answer
...