[gelöst] hwaudit will nicht mehr

Antworten
Dirk.Assmann
Beiträge: 10
Registriert: 01 Dez 2021, 13:09

[gelöst] hwaudit will nicht mehr

Beitrag von Dirk.Assmann »

Moin liebe Kolleginnen und Kollegen.
Ich bin am verzweifeln… Seit geraumer Zeit funktioniert bei uns das „hwaudit“ nicht mehr. Das Logfile gibt am Ende das aus:

Code: Alles auswählen

[6] [2023-04-18 11:57:31.194] [               ] Obsoleting old hardware audit data   (hwaudit_windows.py:533)
[6] [2023-04-18 11:57:31.195] [               ] JSONRPC request to https://192.168.22.31:4447/rpc: ip_version=4, id=3, method=auditHardwareOnHost_setObsolete, Content-Type=application/msgpack, Content-Encoding=, timeout=(10, 300)   (jsonrpc.py:449)
[7] [2023-04-18 11:57:31.198] [               ] Resetting dropped connection: 192.168.22.31   (connectionpool.py:273)
[7] [2023-04-18 11:57:31.200] [               ] Using ip version 4   (jsonrpc.py:92)
[7] [2023-04-18 11:57:31.259] [               ] https://192.168.22.31:4447 "POST /rpc HTTP/1.1" 200 25   (connectionpool.py:456)
[6] [2023-04-18 11:57:31.263] [               ] Got response status=200, Content-Type=application/msgpack, Content-Encoding=, duration=0.068s   (jsonrpc.py:474)
[5] [2023-04-18 11:57:31.265] [               ] Sending hardware information to service   (hwaudit_windows.py:535)
[6] [2023-04-18 11:57:31.271] [               ] JSONRPC request to https://192.168.22.31:4447/rpc: ip_version=4, id=4, method=auditHardwareOnHost_updateObjects, Content-Type=application/msgpack, Content-Encoding=, timeout=(10, 300)   (jsonrpc.py:449)
[7] [2023-04-18 11:57:31.280] [               ] https://192.168.22.31:4447 "POST /rpc HTTP/1.1" 200 534   (connectionpool.py:456)
[6] [2023-04-18 11:57:31.282] [               ] Got response status=200, Content-Type=application/msgpack, Content-Encoding=, duration=0.010s   (jsonrpc.py:474)
[7] [2023-04-18 11:57:31.283] [               ] JSONRPC-response contains error   (jsonrpc.py:517)
[6] [2023-04-18 11:57:31.284] [               ] JSONRPC request to https://192.168.22.31:4447/rpc: ip_version=4, id=5, method=backend_exit, Content-Type=application/msgpack, Content-Encoding=, timeout=(10, 300)   (jsonrpc.py:449)
[7] [2023-04-18 11:57:31.291] [               ] https://192.168.22.31:4447 "POST /rpc HTTP/1.1" 200 25   (connectionpool.py:456)
[6] [2023-04-18 11:57:31.292] [               ] Got response status=200, Content-Type=application/msgpack, Content-Encoding=, duration=0.008s   (jsonrpc.py:474)
Interessant dürfte der Zeitstempel: „2023-04-18 11:57:31.283“ sein…


sudo apt update && sudo apt upgrade
sudo apt dist-upgrade
sudo do-release-upgrade
opsi-package-updater -v update

Habe ich alles durch…
Ubuntu ich jetzt auf Stand: „22.04.2 LTS“
Laut OPSI ist das hwaudit auf Version 4.2.0.2
Auf meiner Testmaschine sieht die EXE so aus: "c:\Program Files\opsi.org\hwaudit\opsi-hwaudit.exe 17.323.400 Byte vom 27.09.2022 15:35"

Da wir viel gebrauch machen vom HW-Audit, wäre es schön, wenn das wieder funktionieren würde.
Für sachdienliche Hinweise wäre ich (wir) sehr dankbar. 8-)

Mit freundlichen Grüßen, Best regards
Dirk Assmann
Zuletzt geändert von Dirk.Assmann am 04 Mai 2023, 17:12, insgesamt 1-mal geändert.
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: hwaudit will nicht mehr

Beitrag von n.doerrer »

Was heißt denn funktioniert nicht mehr?

Schlägt das setup des Pakets fehl (sieht man ein failed im configed)?
Dann wäre das opsi-script.log davon interessant

Kommen einfach keine neuen Daten im backend an?
opsi-cli jsonrpc execute auditHardwareOnHost_getObjects [] '{"hostId": "<host id eines betroffenen clients>"}'

Sieht man auf serverseite im log Fehler? (/var/log/opsi/opsiconfd/opsiconfd.log und /var/log/opsi/opsiconfd/<ip_des_clients>.log)
Was ist denn die opsiconfd version? (dpkg -l | grep opsiconfd)
Dirk.Assmann
Beiträge: 10
Registriert: 01 Dez 2021, 13:09

Re: hwaudit will nicht mehr

Beitrag von Dirk.Assmann »

Moin Herr Doerrer,
das OPSI Script schlägt mit meinem "failed (Setup)" fehl. Es kommen auch keine Daten im Backend (config ED) an.

Im /var/log/opsi/opsiconfd/opsiconfd.log ist der einzige Fehler den ich sehe

Code: Alles auswählen

[3] [2023-05-01 02:00:42.584] [               ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)
[3] [2023-05-01 02:00:44.217] [               ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)
[3] [2023-05-01 02:00:44.483] [               ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)
[3] [2023-05-01 02:00:45.215] [               ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)
[1] [2023-05-01 02:00:46.159] [               ] Switching to user opsiconfd   (main.py:166)
[1] [2023-05-01 02:00:46.160] [               ] opsiconfd is starting   (main.py:182)
[1] [2023-05-01 02:00:46.199] [               ] Register zeroconf service   (zeroconf.py:45)
[3] [2023-05-01 02:00:47.588] [               ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)


In der /var/log/opsi/opsiconfd/<ip_des_clients>.log) steht nach dem durchlauf für hwaudit:

Code: Alles auswählen

[3] [2023-05-02 09:45:47.347] [192.168.45.28  ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)
[3] [2023-05-02 09:46:04.663] [192.168.45.28  ] dictionary changed size during iteration   (__init__.py:143)
Traceback (most recent call last):
  File "opsicommon/utils/__init__.py", line 141, in deserialize
  File "opsicommon/objects.py", line 3594, in fromHash
  File "opsicommon/objects.py", line 3441, in __init__
RuntimeError: dictionary changed size during iteration
[3] [2023-05-02 09:46:04.664] [192.168.45.28  ] Failed to create object from dict {'firstseen': None, 'lastseen': None, 'state': None, 'hostId': 'edv005.mae-de.local', 'hardwareClass': 'COMPUTER_SYSTEM', 'name': 'EDV005', 'description': 'AT/AT COMPATIBLE', 'vendor': 'FUJITSU', 'model': 'CELSIUS_W550power', 'systemType': 'x64-based PC', 'totalPhysicalMemory': '34165592064', 'sku': 'S26361-Kxxx-Vyyy', 'type': 'AuditHardwareOnHost', 'ident': 'COMPUTER_SYSTEM;edv005.mae-de.local'}: dictionary changed size during iteration   (jsonrpc.py:480)
Traceback (most recent call last):
  File "opsicommon/utils/__init__.py", line 141, in deserialize
  File "opsicommon/objects.py", line 3594, in fromHash
  File "opsicommon/objects.py", line 3441, in __init__
RuntimeError: dictionary changed size during iteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "opsiconfd/application/jsonrpc.py", line 444, in process_rpc
  File "opsicommon/utils/__init__.py", line 124, in deserialize
  File "opsicommon/utils/__init__.py", line 124, in <listcomp>
  File "opsicommon/utils/__init__.py", line 124, in deserialize
  File "opsicommon/utils/__init__.py", line 124, in <listcomp>
  File "opsicommon/utils/__init__.py", line 144, in deserialize
ValueError: Failed to create object from dict {'firstseen': None, 'lastseen': None, 'state': None, 'hostId': 'edv005.mae-de.local', 'hardwareClass': 'COMPUTER_SYSTEM', 'name': 'EDV005', 'description': 'AT/AT COMPATIBLE', 'vendor': 'FUJITSU', 'model': 'CELSIUS_W550power', 'systemType': 'x64-based PC', 'totalPhysicalMemory': '34165592064', 'sku': 'S26361-Kxxx-Vyyy', 'type': 'AuditHardwareOnHost', 'ident': 'COMPUTER_SYSTEM;edv005.mae-de.local'}: dictionary changed size during iteration

opsiconfd ist auf Version: 4.2.0.204-1

Das Logfile vom Script (c:\opsi.org\log\opsi-script-part-qo3VMd30P4.log) habe ich als Dateianhang beigefügt.

Wenn ich noch weitere Daten liefern kann oder soll, bitte anfragen. Währe sehr schön wenn wir das wieder ans laufen bekommen...
...und danke das Sie sich dem Thema widmen.

MfG
D.Assmann
Dateianhänge
opsi-script-part-qo3VMd30P4.log
(623.2 KiB) 24-mal heruntergeladen
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: hwaudit will nicht mehr

Beitrag von n.doerrer »

ValueError: Failed to create object from dict ... dictionary changed size during iteration
Das ist möglicherweise ein Bug, der vor einiger Zeit behoben wurde. Ich empfehle ein update des opsiconfd (stable ist im Moment die 4.2.0.306).
sudo apt update && sudo apt upgrade
hm, trotzdem ist der 4.2.0.204 schon lange nicht mehr aktuell. Eventuell ist die "/etc/apt/sources.list.d/opsi.list" kaput?
Dirk.Assmann
Beiträge: 10
Registriert: 01 Dez 2021, 13:09

Re: hwaudit will nicht mehr

Beitrag von Dirk.Assmann »

Moin Herr Doerrer,
ich glaube Sie haben den Finger gerade in die richtige Wunde gesteckt...

Unter /etc/apt/sources.list.d habe ich zwei OPSI Dateien ( und noch ein paar andere...).
opsi.list

Code: Alles auswählen

# deb http://download.opensuse.org/repositories/home:/uibmz:/opsi:/4.2:/stable/xUbuntu_18.04/ / # Bei Aktualisierung zu focal deaktiviert
opsi.list.distUpgrade

Code: Alles auswählen

# deb http://download.opensuse.org/repositories/home:/uibmz:/opsi:/4.2:/stable/xUbuntu_18.04/ / # Bei Aktualisierung zu focal deaktiviert
Wenn die Zeilen auskommentiert sind kann er ja auch nix neues holen...
Wie musste es den bei einem aktuellen Stand aussehen?

MfG
D.Assmann
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: hwaudit will nicht mehr

Beitrag von n.doerrer »

Für ein ubuntu 22.04 sollte das so aussehen:

Code: Alles auswählen

deb http://download.opensuse.org/repositories/home:/uibmz:/opsi:/4.2:/stable/xUbuntu_22.04/ /
EDIT: ggfs muss der repo key noch registriert werden, siehe https://docs.opsi.org/opsi-docs-de/4.2/ ... n-base-deb
Dirk.Assmann
Beiträge: 10
Registriert: 01 Dez 2021, 13:09

Re: hwaudit will nicht mehr

Beitrag von Dirk.Assmann »

Moin Herr Doerrer,
das hat jetzt schon mal funktioniert und das hwaudit funktioniert wieder. :mrgreen:
Vielen Dank für Ihre Unterstützung.

Blöderweise funktioniert jetzt jedoch der configED in Version 4.2.21.2-1 nicht mehr.
Auf allen Systemen wo ich den Testweise installiert habe kommt eine:

Code: Alles auswählen

"java.lang.NullPointerExeption: Cannot invokek "java util List iterator()" because the return value of "de.uib.opsidatamodel.modulelicence.LicensingInfoMap.getModules()" is null
... Meldung. Der alte configED in Version 4.2.15,1.2 funktioniert noch weiterhin.

Haben Sie dazu auch noch eine Idee? :roll:
Benutzeravatar
n.doerrer
uib-Team
Beiträge: 267
Registriert: 23 Okt 2020, 16:11

Re: hwaudit will nicht mehr

Beitrag von n.doerrer »

Ah, das wird dann wohl die andere Fehlermeldung aus dem log von oben sein.

Code: Alles auswählen

[3] [2023-05-01 02:00:42.584] [               ] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: '/etc/opsi/modules'   (Backend.py:406)
'/etc/opsi/modules' sollte eigentlich eine Datei sein. Der Fehler behauptet, es sei ein directory bei Ihnen. Ich habe keine Ahnung, wie es dazu gekommen sein kann. Falls das directory leer ist, würde ich es vermutlich einfach löschen. Falls nicht und sich darin tatsächlich eine modules-datei befindet, könnten Sie mal probieren, die Datei woandershin zu sichern, dann '/etc/opsi/modules' zu löschen und die gesicherte Datei an dessen Stelle zu legen.
Dirk.Assmann
Beiträge: 10
Registriert: 01 Dez 2021, 13:09

[gelöst]Re: hwaudit will nicht mehr

Beitrag von Dirk.Assmann »

Hallo Doerrer,
und nochmal ein Treffer !!! :D

Das mit dem Modules Verzeichnis war irgendeine Altlast... Ich glaube mich erinnern zu können, dass man das Verzeichnis anlegen musste damit "keine" Fehlermeldung kommt, wenn man keine kostenpflichtigen Module benötigt.
Wie dem auch sei, jetzt läufts.

Vielen, vielen Dank für Ihre Unterstützung.

MfG
D.Assmann
Antworten