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 <EXIT_CODE_1> not a success [closed]

Version ocsreports : 2.11.1

Version de l'agent 2.9.2

Bonjour,

Lorsque je veux déployer une installation via le télédéploiement d'Ocs, j'ai toujours l'erreur  suivante et l'application ne s'installe pas.

"ERROR *** DOWNLOAD => Will not register package <1670248197> in history: result <EXIT_CODE_1> not a success"

Avez-vous des informations pour résoudre ça ?

Je joins les 2 fichiers logs d'OcsAgent :

DOWNLOAD.LOG

==============================================================================
Starting OCS Inventory Package Download and Setup Tool on Monday, December 05, 2022 14:50:57.
DOWNLOAD => Running OCS Inventory Download Version 2.9.2.0
DOWNLOAD => Using OCS Inventory FrameWork Version 2.9.2.0
DOWNLOAD => Using network connection with Communication Server
DOWNLOAD => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.9.2.0>
DOWNLOAD => Starting new period of 10 cycles
DOWNLOAD => Parsing directory <C:\ProgramData\OCS Inventory NG\Agent\download> for packages
DOWNLOAD => Package <1670248197> verified and added to process queue
DOWNLOAD => Downloading package fragment <1670248197-1>
DOWNLOAD => Building package <1670248197>
DOWNLOAD => Executing action <LAUNCH> for package <1670248197>
ERROR *** DOWNLOAD => Will not register package <1670248197> in history: result <EXIT_CODE_1> not a success
DOWNLOAD => Sending result code <EXIT_CODE_1> for package <1670248197>
DOWNLOAD => Starting new period of 10 cycles
DOWNLOAD => Parsing directory <C:\ProgramData\OCS Inventory NG\Agent\download> for packages
DOWNLOAD => No package found, exiting
DOWNLOAD => Unloading communication provider
DOWNLOAD => Execution duration: 00:10:29.

ET OCSINVENTORY.LOG

==============================================================================
Starting OCS Inventory Agent on Monday, December 05, 2022 14:50:42.
AGENT => Running OCS Inventory Agent Version 2.9.2.0
AGENT => Using OCS Inventory FrameWork Version 2.9.2.0
AGENT => Loading plug-in(s)
AGENT => Using network connection with Communication Server
AGENT => Using Communication Provider <OCS Inventory cURL Communication Provider> Version <2.9.2.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 <1670248197> 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:14.

Merci d'avance pour votre aide

Cordialement,
closed with the note: Solution expliquée par l'utilisateur à la fin du post
in OCS Inventory NG agent for Windows by (1.4k points)
closed by

26 Answers

0 votes

Bonjour,

j'ai personnellement recensé plusieurs codes de retour constatés lors du télé-déploiement d'OCS...

Dans mon cas, EXIT_CODE_1 correspondait à :

 - Un fichier ZIP ne pouvant pas être décompressé à la destination (généré avec un soft trop récent / algorithme trop fort)

ou

- Le script (par ex. .ps1, .vbs, .bat) du paquet comportant une erreur lors de l'exécution

by (32.6k points)
0 votes
Bonjour et merci pour votre réponse,

Cependant je cherche à déployer un EXE et j'ai remarqué que le fichier ZIP correspondant au download demandé ce créer lorsque l'on observe le dossier "C:\ProgramData\OCS Inventory NG\Agent\Download".

Et effectivement on a pas l'impression que celui-ci se décompresse...

Dans ce cas peut-on régler se problème ?

Cordialement,
by (1.4k points)
0 votes
Bonjour,

Je fais un petit up parce que je ne trouve pas de solution ni sur le Net ni par moi-même....

Que ce soit un script, un EXE (ancien ou récent), ou un MSI le code erreur est toujours <EXIT_CODE_1>.

Merci de votre aide
by (1.4k points)
0 votes
Ok, petit rappel :

Le ZIP doit pouvoir être décompressé à la cible donc en le copiant manuellement dans le PC de destination et en double-cliquant dessus le contenu devrait pouvoir être accessible.

De même, dans le ZIP il faut ajouter un script qui sera chargé de copier ou d'exécuter le fichier EXE joint (selon le besoin).

Lors de la création du paquet, il faut fournir le nom du script à exécuter qui pointera sur l'EXE.
by (32.6k points)
0 votes
Effectivement si je copie le zip manuellement il se décompresse bien et j'ai mes 2 fichiers (EXE et BAT) à l'intérieur.
Dans le dossier décompressé, si j'exécute le fichier bat l'application s'installe correctement.

Lorsque je déploie cette même application via ocsinventory voici ce qu'il se passe sur le poste client:

- Création d'un dossier <numérique> dans "C:\ProgramData\OCS Inventory NG\Agent\Download"
- Création de 3 fichiers (info, since, task) dans le dossier "C:\ProgramData\OCS Inventory NG\Agent\Download\<numérique>"
- Création, après quelques minutes, d'un fichier <numérique>-1 dans "C:\ProgramData\OCS Inventory NG\Agent\Download\<numérique>"
- Apparition d'un fichier zip dans "C:\ProgramData\OCS Inventory NG\Agent\Download\<numérique> et en mème temps un dossier est créé "<numérique>.ocs" dans c:\windows\temp puis les 2 sont supprimé au bout de 2 secondes.

L'application n'est pas installée et j'ai l'erreur suivante dans le log "download.log"

ERROR *** DOWNLOAD => Will not register package <numérique> in history: result <EXIT_CODE_1> not a success

Voilà j'ai essayé d'être complet

Bonne journée
by (1.4k points)
0 votes

De façon à mieux cerner le problème, je génèrerais un journal lors de l'exécution du BAT.

Après chaque étape, je glisserais quelque chose comme :

Set LogOcs="%temp%"\ocs.log

Echo =====================================>> "%LogOcs%"

Echo ==== Le %date% a %time% ====>> %LogOcs%

Echo.>> %LogOcs%

:: commande 1

Echo Etape 1 : %errorlevel%>> %LogOcs%

:: commande 2

Echo Etape 2 : %errorlevel%>> %LogOcs%

:: etc

Exit

Ainsi, vous pourrez vérifier la bonne exécution du BAT ainsi que les commandes qui y sont exécutées

by (32.6k points)
0 votes

Bonjour et merci de votre réponse...

J'ai créé mon fichier bat avec les instructions données dans le précédent post.

FICHIER BAT

Set LogOcs="%temp%"\ocs.log
Echo =====================================>> "%LogOcs%"
Echo ==== Le %date% a %time% ====>> %LogOcs%
Echo.>> %LogOcs%
call "%~dp0FICHIER.exe" /s /v/qn
Echo Etape 1 : %errorlevel%>> %LogOcs%
exit

Lorsque je l'exécute manuellement j'ai bien le fichier log qui se crée dans le dossier temporaire, mais via le télédéploiement aucun fichier log...

Je ne vois vraiment pas où cela bloque...

by (1.4k points)
0 votes
Avez-vous déjà télé-déployé sans erreur avec ce même serveur / PC cible ?

Utilisez-vous bien un certificat (cacert.pem) ?

Est-ce que le fichier ZIP est généré depuis Windows ou depuis un soft tiers ?

Avez-vous aussi essayé de télé-déployer vers un autre PC ? Mêmes symptômes ?
by (32.6k points)
0 votes
Le serveur Ocsinventory est tout fraichement configuré.

Oui j'utilise bien le cacert.pem

Je compresse avec Windows

Et sur un autre pc avec le même SE (win7 pro) c'est la même chose
by (1.4k points)
0 votes

Et aux questions :

Avez-vous déjà télé-déployé un paquet sans erreur avec ce même serveur / PC cible ?

Avec un agent Windows d'une version antérieure ?

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