OPSI Client Agent Update verhindert WAN Client caching

Antworten
AlexB
Beiträge: 84
Registriert: 07 Mär 2017, 17:41

OPSI Client Agent Update verhindert WAN Client caching

Beitrag von AlexB »

Hi,

Versionen:
Server: 4.3.45.8
OCA: 4.3.15.4-1 / 4.3.17.1-1
opsi-script: 4.12.18.8-7

Hardware:
Linux Server
Windows Clients 23H2 - 25H2

Titel ist ein bisschen komisch formuliert, aber das Problem ist bei uns aktuell, dass sobald ich den aktuellen OCA (oder den aus dem testing) auf setup setze und die Clients anfangen zu cachen, sie immer versuchen ein zusätzlich leeres Objekt zu cachen. Das führt zu einem Fehler und es wird nichts mehr installiert:

Code: Alles auswählen

 [config cache service] sync_products_with_actions_only=True, filterProductIds=['7zip', 'opsi-client-agent', 'winmerge', '', 'opsi-script']  

Code: Alles auswählen

[5] [2026-01-20 11:46:38.685] [product cache service                   ] Product 'winmerge' (2.16.48.2-1) cached   (CacheService.py:1495)
[6] [2026-01-20 11:46:38.687] [product cache service                   ] JSON-RPC request to https://opsi.xxxx.local:4447: id='6f5c697d-feb1-4b22-a3b1-5d696dceeda1', method=productOnClient_updateObjects, Content-Type=application/msgpack, Content-Encoding=lz4, timeout=300.0   (opsiservice.py:1663)
[6] [2026-01-20 11:46:38.723] [product cache service                   ] Got response status=200, id='6f5c697d-feb1-4b22-a3b1-5d696dceeda1', method=productOnClient_updateObjects, Content-Type=application/msgpack, Content-Encoding=, duration=0.036s   (opsiservice.py:1687)
[5] [2026-01-20 11:46:38.730] [product cache service                   ] Caching product '' (max bandwidth: 0, dynamic bandwidth: True)   (CacheService.py:1352)
[6] [2026-01-20 11:46:38.730] [product cache service                   ] Failed to cache product '': Bad object id: ''   (CacheService.py:1208)
[3] [2026-01-20 11:46:38.731] [product cache service                   ] Bad object id: ''   (CacheService.py:1213)
Traceback (most recent call last):
File "opsiclientd\nonfree\CacheService.py", line 1203, in _cacheProducts
File "opsiclientd\nonfree\CacheService.py", line 1355, in _cacheProduct
File "opsiclientd\nonfree\CacheService.py", line 1275, in _setProductCacheState
File "opsicommon\objects.py", line 1977, in __init__
File "opsicommon\objects.py", line 2015, in setProductId
File "opsicommon\types.py", line 487, in forceProductId
File "opsicommon\types.py", line 666, in forceObjectId
ValueError: Bad object id: ''

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "opsiclientd\nonfree\CacheService.py", line 1211, in _cacheProducts
File "opsiclientd\nonfree\CacheService.py", line 1275, in _setProductCacheState
File "opsicommon\objects.py", line 1977, in __init__
File "opsicommon\objects.py", line 2015, in setProductId
File "opsicommon\types.py", line 487, in forceProductId
File "opsicommon\types.py", line 666, in forceObjectId
ValueError: Bad object id: ''
[5] [2026-01-20 11:46:38.733] [product cache service                   ] Caching product 'opsi-script' (max bandwidth: 0, dynamic bandwidth: True)   (CacheService.py:1352)

Wenn ich den OCA rausnehme, werden alle Produkte normal gecached:

Code: Alles auswählen

[config cache service] sync_products_with_actions_only=True, filterProductIds=['7zip', 'winmerge', 'opsi-script']
In der states.json sieht es dann so aus (nach dem Cache, mit OCA):

Code: Alles auswählen

C:\Windows\System32\config\systemprofile>type c:\opsi.org\opsiclientd\state.json
{
	"shutdown_cancel_counter": 0,
	"config_cache_service": {
		"config_cached": true,
		"server_version": "4.3.45.8"
	},
	"product_cache_service": {
		"products_cached": false,
		"products": {
			"7zip": {
				"started": 1768903257.3064609,
				"completed": 1768903258.2981628,
				"failure": null,
				"productVersion": "25.01",
				"packageVersion": "1",
				"name": "7-Zip"
			},
			"opsi-client-agent": {
				"started": 1768903258.3356014,
				"completed": 1768903276.1907545,
				"failure": null,
				"productVersion": "4.3.15.4",
				"packageVersion": "1",
				"name": "opsi.org client agent"
			},
			"winmerge": {
				"started": 1768903276.315284,
				"completed": 1768903277.2784572,
				"failure": null,
				"productVersion": "2.16.48.2",
				"packageVersion": "1",
				"name": "WinMerge"
			},
			"": {
				"started": 1768903277.3241294,
				"failure": "Bad object id: ''"
			},
			"opsi-script": {
				"started": 1768903277.3266268,
				"completed": 1768903283.0464769,
				"failure": null,
				"productVersion": "4.12.18.8",
				"packageVersion": "7",
				"name": "script"
			}
		}
	},
	"pending_product_ids": []
}
Cach dem Cache und ohne OCA:

Code: Alles auswählen

CC:\Windows\System32\config\systemprofile>type c:\opsi.org\opsiclientd\state.json
{
	"shutdown_cancel_counter": 0,
	"config_cache_service": {
		"config_cached": true,
		"server_version": "4.3.45.8"
	},
	"product_cache_service": {
		"products_cached": true,
		"products": {
			"7zip": {
				"started": 1768903208.0122593,
				"completed": 1768903214.0606209,
				"failure": null,
				"productVersion": "25.01",
				"packageVersion": "1",
				"name": "7-Zip"
			},
			"winmerge": {
				"started": 1768903214.099679,
				"completed": 1768903216.152927,
				"failure": null,
				"productVersion": "2.16.48.2",
				"packageVersion": "1",
				"name": "WinMerge"
			},
			"opsi-script": {
				"started": 1768903216.1971215,
				"completed": 1768903225.3364542,
				"failure": null,
				"productVersion": "4.12.18.8",
				"packageVersion": "7",
				"name": "script"
			}
		}
	},
	"pending_product_ids": []
}
Das komische daran ist, ein Drittel unserer Clients hat das Update normal installiert. Wobei wenn ich das Paket jetzt nochmal zur Installation setze, tritt das Problem auf und die Clients hängen auch in der Schleife.

Ich kann nicht sagen wo das Problem auftritt, ob der Client die falsche Produktliste erhält, irgendein Windowsupdate Probleme bereitet oder halt irgendwas ganz anderes. Aber meine Frage wäre auch warum so leere Strings überhaupt abgefragt werden und in die Liste geraten und nicht vorher schon aussortiert werden.

Grüße
Antworten