Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Upgrade - Downloader still 2.9.1.0 #260

Open
LMS235 opened this issue Oct 27, 2022 · 7 comments
Open

[BUG] Upgrade - Downloader still 2.9.1.0 #260

LMS235 opened this issue Oct 27, 2022 · 7 comments

Comments

@LMS235
Copy link

LMS235 commented Oct 27, 2022

General information

Operating system : WIN10 64, WIN11 64

OCS Inventory information

Windows agent version : 2.10.0.0 (Upgrade vom 2.9.2.0)

Problem's description

After the update (according to the instructions here) the agent is on version 2.10.0.0, but the download service remains on 2.9.1.0 (it was not touched with 2.9.2.0).

Here is the script I use for the upgrade package:

%~dp0\OCS-Windows-Agent-Setup-x64.exe /S /server=https://SERVERNAME/ocsinventory /ssl=1 /debug=0 /NO_SYSTRAY /NOW /CaBundle=cacert.pem /ca=cacert.pem
timeout /T 30 /NOBREAK
sc config "OCS Inventory Service" start=delayed-auto
sc failure "OCS Inventory Service" reset= 30 actions= restart/30000/restart/30000//1000
exit 0

So Agent ist OK:
image

Downloader NOT:
image

Here we finally need a reliable solution on how to deal with the problem. There is currently no clean, 100% working solution to update the OCS agent cleanly via OCS.

In the last versions there was at least the command line option "/upgrade", but this is no longer available.

@ajavor
Copy link

ajavor commented Oct 30, 2022

I think it is not ok.
After updating the agent to version 2.10.0.0, all my stations stopped being inventoried.

obraz

Windows EventLog:

Faulting application name: OCSInventory.exe, version: 2.10.0.0, time stamp: 0x634cffd7
Faulting module name: SysInfo.dll, version: 2.9.1.0, time stamp: 0x62135247
Exception code: 0xc0000005
Error offset: 0x000000000000cd75
Faulting process id: 0x3fd4
Faulting application start time: 0x01d8eca7fcc0274d
Faulting application path: C: \ Program Files \ OCS Inventory Agent \ OCSInventory.exe
Faulting module path: C: \ Program Files \ OCS Inventory Agent \ SysInfo.dll
Report ID: e49a9e3d-0096-4c40-84ed-1ead9b0dbcd4
Faulting package full name:
Application ID relative to the error package:

However, if I update with the same command (!!) via the command line (eg via psexec) everything updates fine. What is additionally doing OCS now that updating via the OCS package (deployment package) is now impossible?

@LMS235
Copy link
Author

LMS235 commented Nov 2, 2022

I'm doing the upgrade now with a workaround. Not pretty, but works.
It can't replace "Download.exe" because it runs itself, so I kill the process first.

if exist %SystemRoot%\TEMP\OCS_21000 (
    rem OCS Update gelaufen
	exit 0
) else (
    rem OCS Update
	sc stop "OCS Inventory Service"
	taskkill /F /IM Download.exe
	%~dp0\OCS-Windows-Agent-Setup-x64.exe /S /server=SERVERNAME/ocsinventory /ssl=1 /debug=0 /NO_SYSTRAY /NOW /CaBundle=cacert.pem /ca=cacert.pem
	timeout /T 30 /NOBREAK
	sc config "OCS Inventory Service" start=delayed-auto
	sc failure "OCS Inventory Service" reset= 30 actions= restart/30000/restart/30000//1000
	copy /y NUL %SystemRoot%\TEMP\OCS_21000 >NUL
	exit 0
)

But here it needs a real solution! In the past there was also the parameter /upgrade, why is this no longer available?

@thomasgg23
Copy link

Having the same Problem with version > 2.9

Also having the problem, that the client isn't launching automatically according to the PROLOG_FREQ settings.
You encountered something similiar?

@laragio
Copy link

laragio commented Dec 22, 2022

Hi, how can i upgrade the agent version on only few PC to test? There is a wiki to follow to update the agent?
I deployed the agent with a GPO and the packager. I don't want the inventory stop for all my PC if i upgrade.

@LMS235
Copy link
Author

LMS235 commented Feb 2, 2023

Is there anything new on this topic? I also distributed the upgrade to 2.10.1 via workaround (see above).

Surely there should be a clean solution here?

@laragio
Copy link

laragio commented Mar 23, 2023

Hi, can you provide a howto to complete without problem an upgrade of the agent?

@LMS235
Copy link
Author

LMS235 commented Mar 24, 2023

Hi, can you provide a howto to complete without problem an upgrade of the agent?

Hi,

I have built a batch file as already written above (#260 (comment)) with which I perform the upgrade.
Then when the upgrade runs it kills the OCS processes and also kills the download.exe process. Once the setup is done I create a file in the TMP folder and start OCS again.
Since OCS then has not noticed the successful update, the installer would run again and again, I then check this with the created file (if file exists = OK, Exit 0).

It's not pretty, but it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants