opsidirectoryconnector - Fehlermeldung

Antworten
majoso1953
Beiträge: 30
Registriert: 28 Okt 2016, 12:08

opsidirectoryconnector - Fehlermeldung

Beitrag von majoso1953 »

Hallo,

wir haben den opsidirectoryconnector erworben und versuchen uns an der Inbetriebnahme. Lt. Beschreibung des Connectors kann das nicht so schwierig sein, aber es funktioniert natürlich nicht.... Wir haben die version 31.1 aus dem Stable verwendet - der Server hat 4.1.1.8 - und ein Windows AD. Die --checks sind fehlerfrei, nur ein Warning zum opsi-Zertifikat.

Die Config sieht so aus:

Code: Alles auswählen

{
    "directory": {
        "address": "ldap://x.x.x.x",
        "user": "XXX\\Benutzer",
        "password": "***********",
        "passwordFile": "",
        "search_base": "DC=xxx,DC=xxxxxxx,DC=xx",
        "search_query_computers": "(objectClass=computer)",
        "identifying_attribute": "distinguishedName",
        "connection_options": {
            "start_tls": false,
            "paged_search_limit": 768
        }
    },
    "behaviour": {
        "group_handling": "distinguishedName",
        "write_changes_to_opsi": true,
        "root_dir_in_opsi": "clientdirectory",
        "update_existing_clients": false,
        "prefer_location_from_directory": true
    },
    "mapping": {
        "client": {
            "id": "name",
            "description": "description",
            "notes": "",
            "hardwareAddress": "",
            "ipAddress": "",
            "inventoryNumber": "",
            "oneTimePassword": ""
        }
    },
    "opsi": {
        "address": "https://x.x.x.x:4447",
        "username": "user",
        "password": "********",
        "passwordFile": "",
        "exit_on_error": false,
        "connection_options": {
            "verify_certificate": false
        }
    }
Es werden folgende Errors beim Starten angezeigt:

Code: Alles auswählen

[DEBUG] [2021-02-10 08:30:16,014] LDAP search query: '(objectClass=computer)'
[WARNING] [2021-02-10 08:30:16,015] No value given for opsi client attribute 'oneTimePassword'
[WARNING] [2021-02-10 08:30:16,016] No value given for opsi client attribute 'hardwareAddress'
[WARNING] [2021-02-10 08:30:16,016] No value given for opsi client attribute 'notes'
[WARNING] [2021-02-10 08:30:16,017] No value given for opsi client attribute 'ipAddress'
[WARNING] [2021-02-10 08:30:16,018] No value given for opsi client attribute 'inventoryNumber'
[DEBUG] [2021-02-10 08:30:16,018] Adding 'distinguishedName' as identifying attribute
[DEBUG] [2021-02-10 08:30:16,018] Querying for the following attributes: cn, objectClass, objectCategory, distinguishedName, description, name
[DEBUG] [2021-02-10 08:30:16,019] Searching for elements in directory with paged search...
[INFO] [2021-02-10 08:30:16,019] Connected to directory
[DEBUG] [2021-02-10 08:30:16,701] Found element: {'uri': ["b'ldap://DomainDnsZones.xxx.xxxxx.xx/DC=DomainDnsZones,DC=xxx,DC=xxxxx,DC=xx'"], 'type': 'searchResRef'}
[DEBUG] [2021-02-10 08:30:16,701] yielding element: {'uri': ["b'ldap://DomainDnsZones.xxx.xxxxx.xx/DC=DomainDnsZones,DC=xxx,DC=xxxxx,DC=xx'"], 'type': 'searchResRef'}
[DEBUG] [2021-02-10 08:30:16,701] Next element: {'uri': ["b'ldap://DomainDnsZones.xxx.xxxxx.xx/DC=DomainDnsZones,DC=xxx,DC=xxxxx,DC=xx'"], 'type': 'searchResRef'}
[DEBUG] [2021-02-10 08:30:16,701] Failed to get identifying name from {'uri': ["b'ldap://DomainDnsZones.xxx.xxxxx.xx/DC=DomainDnsZones,DC=xxx,DC=xxxxx,DC=xx'"], 'type': 'searchResRef'} (via attribute 'dn'): KeyError('dn',)
[CRITICAL] [2021-02-10 08:30:16,701] Unable to get the identifying name for the current element!
Traceback (most recent call last):
  File "/usr/bin/opsidirectoryconnector", line 6, in <module>
    runConnector()
  File "/usr/lib/python3/dist-packages/opsidirectoryconnector/cli.py", line 103, in runConnector
    updateOpsi(opsiSession, actions, writeChanges=writeChanges, exitOnError=exitOnError)
  File "/usr/lib/python3/dist-packages/opsidirectoryconnector/opsi.py", line 114, in updateOpsi
    for actionCounter, action in enumerate(processableActions, start=1):
  File "/usr/lib/python3/dist-packages/opsidirectoryconnector/opsi.py", line 111, in <genexpr>
    processableActions = (action for action in actions if action is not None)
  File "/usr/lib/python3/dist-packages/opsidirectoryconnector/connector.py", line 43, in convertComputers
    dn = getDNFromElement(element, identifyingAttribute)
  File "/usr/lib/python3/dist-packages/opsidirectoryconnector/connector.py", line 80, in getDNFromElement
    raise kerr
  File "/usr/lib/python3/dist-packages/opsidirectoryconnector/connector.py", line 76, in getDNFromElement
    return element[identifyingAttribute]
KeyError: 'dn'
Vielleicht hat jemand sofort DIE Lösung - angekündigt ist ja ebenfalls bereits eine neue Version.

vielen Dank im Voraus

vG RG
Benutzeravatar
ThomasT
uib-Team
Beiträge: 538
Registriert: 26 Jun 2013, 12:26

Re: opsidirectoryconnector - Fehlermeldung

Beitrag von ThomasT »

Hallo,

da spielt uns eine aktualisierte Python-Library einen Streich, hier sind u.a. hart verdrahtete Attribute drin, die in einem AD nicht vorkommen.
Versuch es bitte mal mit der Testing Variante aus:
http://download.opensuse.org/repositori ... _amd64.deb

Beste Grüße

Thomas
Kein Support per DM!
_________________________
opsi support - https://www.uib.de/
For productive opsi installations we recommend support contracts.
majoso1953
Beiträge: 30
Registriert: 28 Okt 2016, 12:08

Re: opsidirectoryconnector - Fehlermeldung

Beitrag von majoso1953 »

Hallo Thomas,

vielen Dank für die schnelle Antwort. Aufgrund eines kurzfristigen Homeoffice kann ich den Test nicht gleich machen, aber gebe eine zeitnahe Rückmeldung!!!

VG Ronald
majoso1953
Beiträge: 30
Registriert: 28 Okt 2016, 12:08

Re: opsidirectoryconnector - Fehlermeldung

Beitrag von majoso1953 »

Hallo Thomas,

leider konnte ich die Aktualisierung erst vor 2 Wochen durchführen :|

Wir haben jetzt die Version 45.6-1 installiert und die Verbindung funktioniert super. Allerdings haben wir jetzt einen Fehler, wenn wir im opsi einen Client löschen wollen:
2021-05-31 10:32:49.058 -- Opsi service error: [ProgrammingError] (1146, "Table 'opsi.HARDWARE_CONFIG_TPM' doesn't exist")
Es liegen natürlich keine Hardwareinformationen vor.
Generell wird jetzt beim Ausführen von "hwaudit" die gleiche Fehlermeldung angezeigt:
474) [6] [2021-05-31 11:22:07.598] [hwaudit] Then
(475) [5] [2021-05-31 11:22:07.598] [hwaudit] comment: Try to include hwaudit.log file in instlog
(476) [7] [2021-05-31 11:22:07.607] [hwaudit] Start including tail of LogFile "C:\opsi.org\tmp\hwaudit.log with encoding: cp1252"
(477) [7] [2021-05-31 11:22:07.607] [hwaudit] ################################################################
(478) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] Traceback: (Logger.pyo|798)
(479) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "OPSI\Backend\JSONRPC.pyo", line 100, in processResult
(480) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(481) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] ==>>> Opsi rpc error: (1146, "Table 'opsi.HARDWARE_CONFIG_TPM' doesn't exist") (JSONRPC.pyo|109)
(482) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug] Executing jsonrpc method 'backend_exit' on host u'########' (JSONRPC.pyo|113)
(483) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] jsonrpc: '{"params": [], "id": 4, "method": "backend_exit"}' (JSONRPC.pyo|117)
(484) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug] Posting request... (JSONRPC.pyo|628)
(485) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug] Starting new HTTPS connection (1) to xxxxxxxxxxxx:4447 (HTTP.pyo|582)
(486) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug] Connection established to: xxxxxxxxxx
(HTTP.pyo|584)
(487) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] Trying to get peer cert... (HTTP.pyo|118)
(488) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] Failed to get peer cert: 'NoneType' object has no attribute 'getpeercert' (HTTP.pyo|133)
(489) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] Handing data to connection... (HTTP.pyo|461)
(490) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] Creating HTTPResponse from httplib... (HTTP.pyo|205)
(491) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug] Closing connection: <httplib.HTTPSConnection instance at 0x0395D9E0> (HTTP.pyo|502)
(492) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] Processing response... (JSONRPC.pyo|634)
(493) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug] Expecting gzip'ed data from server (JSONRPC.pyo|648)
(494) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [debug2] Response is: {"id": 4, "result": null, "error": null} (JSONRPC.pyo|654)
(495) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] Traceback: (Logger.pyo|798)
(496) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "hwaudit.py", line 894, in <module>
(497) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(498) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "hwaudit.py", line 884, in main
(499) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(500) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "<string>", line 1, in auditHardwareOnHost_setObsolete
(501) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(502) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "OPSI\Backend\JSONRPC.pyo", line 594, in _jsonRPC
(503) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(504) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "OPSI\Backend\JSONRPC.pyo", line 146, in execute
(505) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(506) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] File "OPSI\Backend\Backend.pyo", line 207, in waitForResult
(507) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: (Logger.pyo|798)
(508) [7] [2021-05-31 11:22:07.607] [hwaudit] ==>: May 31 11:22:07 [critical] ==>>> Opsi rpc error: (1146, "Table 'opsi.HARDWARE_CONFIG_TPM' doesn't exist") (hwaudit.py|896)
(509) [7] [2021-05-31 11:22:07.607] [hwaudit] ################################################################
(510) [7] [2021-05-31 11:22:07.607] [hwaudit] End including LogFile "C:\opsi.org\tmp\hwaudit.log"
Hast Du eine Idee?

viele Grüße
Ronald
feltel
Beiträge: 218
Registriert: 09 Dez 2014, 07:22

Re: opsidirectoryconnector - Fehlermeldung

Beitrag von feltel »

das hat mit dem Connector nix zu tun. Der Fehler trat vor kurzem bei einigen hier auf. Ein "opsi-setup --init-current-config" hat geholfen.
majoso1953
Beiträge: 30
Registriert: 28 Okt 2016, 12:08

Re: opsidirectoryconnector - Fehlermeldung

Beitrag von majoso1953 »

... das war ja einfach - vielen DANK!! - funktioniert
Antworten