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.

Erreur de déploiement de paquet (pas de "SUCCESS")

Bonjour,

Je voulais savoir pourquoi lorsque je déploye un paquet, il est seulement "NOTIFIÉ" et pas de "SUCCESS". De plus, le but était de stocker un fichier dans C:\MyFolder d'une machine distante. Le fichier ne s'est pas déployé...

Pourquoi le fichier ne se déploie-t-il pas ??

Merci

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

11 Answers

0 votes
Bonjour , il faudrait regarder dans les logs du serveur et du client.

Est ce que l'agent a bien les droits dans le repertoire ? Quelle version de l'os et de l'agent.

Merci.

FX.
by (140 points)
0 votes
Bonjour,

Surtout savoir si le certificat a bien été déposé sur la machine. Quelle est la période d'inventaire?
by (88.5k points)
0 votes

Bonjour,

Je n'utilise pas de certificat sur mon serveur, je ne fais pas de HTTPS.

La version du serveur est un centOS 2.1.2

L'agent est en version 2.0.5.0

Voici mes logs d'erreur d'Apache. Rien d'anormal :

[stg06@ httpd]$ sudo tail -n 15 logs/error_log
[Mon Jun 01 15:19:10 2015] [notice] Digest: done
PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
[Mon Jun 01 15:19:10 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_auth_kerb/5.4 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon Jun 01 16:08:10 2015] [notice] caught SIGTERM, shutting down
[Mon Jun 01 16:08:11 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 01 16:08:12 2015] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 01 16:08:12 2015] [notice] Digest: done
PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
[Mon Jun 01 16:08:12 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_auth_kerb/5.4 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations
[Mon Jun 01 16:38:06 2015] [notice] caught SIGTERM, shutting down
[Mon Jun 01 16:38:07 2015] [notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
[Mon Jun 01 16:38:08 2015] [notice] Digest: generating secret for digest authentication ...
[Mon Jun 01 16:38:08 2015] [notice] Digest: done
PHP Warning:  Module 'ldap' already loaded in Unknown on line 0
[Mon Jun 01 16:38:08 2015] [notice] Apache/2.2.15 (Unix) DAV/2 mod_auth_kerb/5.4 PHP/5.3.3 mod_ssl/2.2.15 OpenSSL/1.0.1e-fips mod_perl/2.0.4 Perl/v5.10.1 configured -- resuming normal operations

Mon log client est plus interressant :

Starting OCS Inventory NG Agent on Monday, June 01, 2015 14:27:47.
AGENT => Running OCS Inventory NG Agent Version 2.0.5.0
AGENT => Using OCS Inventory NG FrameWork Version 2.0.5.0
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.0.5.0>
AGENT => Sending Prolog
AGENT => Prolog successfully sent
SUPPORT => No support detected, Registration key : N/A
AGENT => Inventory required
AGENT => Launching hardware and software checks
AGENT =>  Communication Server ask for Registry Query
AGENT => Sending Inventory
INVENTORY => Inventory changed since last run
ADMIN INFOS => Couple ( TAG <=> NA ) added to configuration file
AGENT => Inventory successfully sent
AGENT =>  Communication Server ask for Package Download
ERROR *** DOWNLOAD => Failed to download Metadata file <https://ocs/download/1433160778/info> to <C:\ProgramData\OCS Inventory NG\Agent\download\1433160778\info>
ERROR *** DOWNLOAD => Failed to download Metadata file <https://ocs/download/1344593665/info> to <C:\ProgramData\OCS Inventory NG\Agent\download\1344593665\info>
ERROR *** DOWNLOAD => Failed to download Metadata file <https://ocs/download/1401890799/info> to <C:\ProgramData\OCS Inventory NG\Agent\download\1401890799\info>
DOWNLOAD => Download and setup tool successfully started
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:11.

Voici mon mode opératoire lorsque je créé mon paquet à déployer :

Voici les droits sur le répertoire "download" :

[stg06@v01hap16 ocsinventory-reports]$ ls -l
total 20
drwxrwxr-x. 12 root apache 4096  1 juin  16:47 download
drwxrwxr-x.  2 root apache 4096 28 mai   11:35 ipd
drwxrwx--x   2 root apache 4096  7 mai   10:38 logs
drwxrwx--x   2 root apache 4096  7 mai   10:37 scripts
drwxrwxr-x   2 root apache 4096 15 avril 15:27 snmp

L'agent a donc seulement un droit de lecture sur le répertoire.

Concernant la période d'inventaire de l'agent, voici ocsinventory.ini :

PROLOG_FREQ=1
OLD_PROLOG_FREQ=1
TTO_WAIT=1740

Avez-vous une idée de mon problème au vu de mon log client ?

by (2k points)
edited by
0 votes

Bonjour,

Le certificat est obligatoire pour le télédéploiement. Regarde les erreurs dans le fichier download.log => ERROR *** DOWNLOAD => Failed to download Metadata file <https://ocs/download/1401890799/info> to <C:\ProgramData\OCS Inventory NG\Agent\download\1401890799\info>

L'agent télécharge le fichier info en https. Il te faut donc générer ce certificat. Le certificat sert aussi pour l'inventaire mais tu n'es pas obligé de faire ton inventaire en https (ssl=0 dans le fichier ocsinventory.ini de l'agent).

Cordialement

Frank

by (88.5k points)
0 votes

Mais le déploiement se fait obligatoirement en HTTPS ??
Parce que j'ai installer mes agents par GPO sur le domaine avec /SSL=0..

Donc je vais devais désinstaller tout les agents et les réinstaller par  GPO avec le paramètre /SSL=1 ??

EDIT : effectivement le certificat est périmé.

by (2k points)
edited by
0 votes
Bonjour,

Le télédéploiement se fait en https. Tu as déployé ton agent avec l'option /ssl=0, ce qui veut dire : inventaire en http. Donc tu n'as pas besoin de réinstaller tes agents avec l'option SSL=1, sauf si tu veux inventorier tes postes en ssl.

Cordialement

Frank
by (88.5k points)
0 votes

Non je ne souhaite pas inventorier en SSL.

Venons en à la situation :

-j'ai sur mon serveur OCS le certificat nouvellement créé qui se nomme "ocs.ssl.crt".

-je le copie sur mon poste en le renommant et en modifiant l'extension "cacaert.pem" que j'ai placé dans C:\ProgramData\OCS Inventory NG\Agent.

-j'ai modifié dans modifier /etc/apache2/sites-available/default-ssl pour autoriser l'accès aux répertoires en https:

 Alias /download /var/lib/ocsinventory-reports/download
    <Directory /var/lib/ocsinventory-reports/download>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride None
        Order allow,deny
        allow from all
    </Directory>
Voici la nouvelle erreur que j'obtiens en voulant me connecter à https://@serveur.domain/download/ :

Comment faire que le navigateur fasse confiance au certificat que j'ai créé ?!

Merci

EDIT : j'ai une interrogation, le fichier cacert.pem doit se trouver sur le serveur ou sur le disque local de la machine ?

Là du coup, à quoi correspond le chemin absolue du "cacert.pem" que j'ai renseigné dans "CA Certificate path" ?

EDIT2: j'ai aussi modifié mon fichier /etc/httpd/conf.d/ssl.conf sur mon serveur OCS comme ceci :


#SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateFile /etc/pki/tls/certs/ocs.ssl.crt

#SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
SSLCertificateKeyFile /etc/pki/tls/private/ocs.ssl.key

Ai-je bien fait ?

Voici la partie interressante de mon log de C:\ProgramData\OCS Inventory NG\Agent\OCSInventory.txt :

    INVENTORY => XML Update Administrative Information(s)
    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://ocs.lorient.rcval.fr/ocsinventory>

    COM SERVER => HTTP Post response received <HTTP Status Code #200>
    COM SERVER => Cleaning cURL library
ADMIN INFOS => Couple ( TAG <=> NA ) added to configuration file
AGENT => Inventory successfully sent
    INVENTORY => Writing new inventory state
AGENT =>  Communication Server ask for Package Download
    DOWNLOAD => Package history file cleaning not required
    DOWNLOAD => Metadata file <info> for package <1433236026> is located at <https://10.1.100.66/download/1433236026/info>
    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://10.1.100.66/download/1433236026/info>
    WARNING *** COM SERVER => Failed to send HTTP Get request <Peer certificate cannot be authenticated with known CA certificates>
    COM SERVER => Cleaning cURL library

ERROR *** DOWNLOAD => Failed to download Metadata file <https://@IP_serveur/download/1433236026/info> to <C:\ProgramData\OCS Inventory NG\Agent\download\1433236026\info>
DOWNLOAD => Download and setup tool successfully started
AGENT => Unloading communication provider
AGENT => Unloading plug-in(s)
AGENT => Execution duration: 00:00:12.

Merci

by (2k points)
edited by
0 votes
Quelle est la valeur de CN dans le certificat? Quelle est la valeur de server dans le fichier de conf de l'agent?

CN=@ip implique server=http://@ip/ocsinventory dans le fichier ocsinventory.ini ou ocsinventory-agent.cfg de l'agent

CN=fqdn implique server=http://fqdn/ocsinventory dans le fichier ocsinventory.ini ou ocsinventory-agent.cfg de l'agent
by (88.5k points)
0 votes

J'ai fait une requête https :

[stg06@serveurOCS ocsinventory-reports]$ wget 'https://serveurOCS.paris.rcval.fr/download'

--2015-06-03 09:32:33--  https://serveurOCS.paris.rcval.fr/download

Résolution de serveurOCS.paris.rcval.fr... 192.168.254.1

Connexion vers serveurOCS.paris.rcval.fr|192.168.254.1|:443...connecté.

ERREUR : impossible de vérifier l'attribut serveurOCS.paris.rcval.fr du certificat, émis par «/C=FR/ST=IleDeFrance/L=PARIS/O=Ville de Paris/OU=OCS-Cert-CA/CN=OCS-Cert-CA/emailAddress=postmaster@mairie-paris.fr» :

  Impossible de vérifier localement le certificat autorité de l'émetteur.

Pour établir une connexion à serveurOCS.paris.rcval.fr non sécurisée, utiliser `--no-check-certificate'.

Voici mon fichier ocsinventory.ini :

[OCS Inventory Agent]
ComProvider=ComHTTP.dll
Debug=1
Local=
NoSoftware=0
HKCU=0
NoTAG=0
IpDisc=
[HTTP]
Server=http://serveurOCS.paris.rcval.fr/ocsinventory

SSL=1
CaBundle=cacert.pem
AuthRequired=0
User=
Pwd=
ProxyType=0
Proxy=
ProxyPort=0
ProxyAuthRequired=0
ProxyUser=
ProxyPwd=
[OCS Inventory Service]
PROLOG_FREQ=1
OLD_PROLOG_FREQ=1
TTO_WAIT=3420

Du coup les deux FQDN se correspondent bien ??

EDIT :

dans mon httpd.conf j'ai juste :

servername serveurOCS

Faut-il mettre le FQDN complet ?

EDIT 2: Mon fichier cacert.pem est juste le certificat du server ocs.ssl.crt renommé en cacert.pem ?

Car ici https://www.digicert.com/ssl-support/pem-ssl-creation.htm , ce site pls manière de créer le fichier cacert.pem ..

As-tu la solution ?

 

 

by (2k points)
edited by
0 votes
Bonjour,

Le problème était dans la conf du serveur centOS. En effet il y avait un pb car le nom du fichier dans ssl.conf n'était pas le FQDN, seulement son nom sans le reste du domaine.

Cordialement,
by (2k points)
 
Powered by Question2Answer
...