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.

Deploy Build update agent ERR_EXECUTE_NO_EXIT_CODE [closed]

I'm trying to update the ocs agents using Deployment --> Build I already created the installer using "OCS Packager", I activated the package and bound it to the host.

The machine downloads the package but reports the error:

ERR_EXECUTE_NO_EXIT_CODE

and in the download log there is:

==========================================

Starting OCS Inventory Package Download and Setup Tool on Saturday, May 07, 2022 11:34:56.

DOWNLOAD => Running OCS Inventory Download Version 2.9.0.0

DOWNLOAD => Using OCS Inventory FrameWork Version 2.9.0.0

DOWNLOAD => Using network connection with Communication Server

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

DOWNLOAD => Starting new period of 10 cycles

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

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

DOWNLOAD => Downloading package fragment <1651932962-1>

DOWNLOAD => Downloading package fragment <1651932962-2>

DOWNLOAD => Starting new period of 10 cycles

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

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

DOWNLOAD => Downloading package fragment <1651932962-3>

DOWNLOAD => Downloading package fragment <1651932962-4>

DOWNLOAD => Starting new period of 10 cycles

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

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

DOWNLOAD => Downloading package fragment <1651932962-5>

DOWNLOAD => Downloading package fragment <1651932962-6>

DOWNLOAD => Starting new period of 10 cycles

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

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

DOWNLOAD => Building package <1651932962>

DOWNLOAD => Executing action <EXECUTE> for package <1651932962>

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

DOWNLOAD => Sending result code <ERR_EXECUTE_NO_EXIT_CODE> for package <1651932962>

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:54.

============================

Does anyone have an idea how to solve it?

Server: ocs 2.92

Agent: 2.9.0

Package deploy update: 2.9.2 ***command line on creation packager: /NP /NOSPLASH /TAG=SOL /NO_SYSTRAY /NOW /SERVER=https://myocs.solution.com.br/ocsinventory /USER=sol /PWD=c@m@ /SSL=1 /CA=cacert.pem /INSTALL /FORCE
closed with the note: no additional information
in OCS Inventory NG agent for Windows by (260 points)
closed by

4 Answers

0 votes

Read the documentation : OCS Packager is NOT appropriate for upgrade agent !
cf https://wiki.ocsinventory-ng.org/03.Basic-documentation/Setting-up-the-Windows-Agent-2.x-on-client-computers/

Note: Please, don't use OCSPackager to upgrade OCS Inventory Windows Agent. Create deployement package with "OCS-NG-Windows-Agent-Setup.exe" on zip file and launch with command example : OCS-NG-Windows-Agent-Setup.exe /S /SERVER=ocs_server_address

(There is a lot of similar questions ... Please first search in the forum !)

IMHO the best is to use a small cmd script : file ocs-setup.exe + script 'install.cmd', and in the script a single line 'ocs-setup.exe /S /SERVER=... /SSL= /UPGRADE'

by (18.9k points)
edited by
0 votes
Thank you for the tips.

I searched for this error here in the forum and I didn't find it so I asked the question.
The problem was the protocol, I accidentally selected HTTP when I created the Deploy, changed it to HTTPS and the problem was solved.

Problem 1.2:
I tested with package + cmd and Download.exe doesn't update so the service doesn't start.

I had the idea and needed to bat with the following lines:

taskkil /F /im download.exe ***remove the in-use utility that downloads and runs the deploy

ocspackager.exe /S **custom package only requires /S and runs in silent mode

del programdata\ocs...\agent\download ***As the download.exe is closed, the folder is NOT cleaned and the OCS is in a loop and does not send the Exit result to the server successfully.

Extra step: remove Deploy from Host in OCS Web Panel.

Any better solution for the case where OCS doesn't update download.exe? **when using Server Deployment

**translate using google
by (260 points)
0 votes
First, (file created with) OCS Packager is NOT appropriate for upgrade agent.

Second, for file OCS...-Setup.exe there is lot of 'options' see https://wiki.ocsinventory-ng.org/03.Basic-documentation/Setting-up-the-Windows-Agent-2.x-on-client-computers/ section 'OCS Inventory Agent for Windows Setup command line options'

Third, upgrade of a running service is not obvious : this is the reason of option '/UPGRADE', and so, as I writed previously, this is the way recommended.

When you want upgrade a running service, you need to kill all child process (Download.exe), then install new program and dll, and restart the service ... and also finish the execution task of package started with previous version of the service !! Really not obvious

(I never use Packager, allways I install agent using OCS...-Setup.exe and small script : for installing without /UPGRADE, for upgrade with /UPGRADE. It's very simple and easy.)
by (18.9k points)
edited by
0 votes
I agree with you and thanks for the tips.

I will then continue with my bat even if it requires a few extra steps, until the Deployment works as expected.

thank you so much.
by (260 points)
 
Powered by Question2Answer
...