Seite 1 von 1

Keine Verbindung: NoneType object has no attribute has_key

Verfasst: 10 Mai 2012, 14:47
von embl-structures
Hi,

ich habe heute zwei neue Clients installiert (Win 7 Pro 64bit und Windows XP Pro 32bit). Was frueher bestens geklappt hat, resultiert jetzt in einem Client, der beim Starten keine Verbindung mit dem Server aufnehmen kann:

Code: Alles auswählen

Failed to connect to config server 'https://MEINSERVER:4447/rpc/rpc': 'NoneType' object has no attribute 'has_key'   (OpsiService.pyo|340)
Der opsiclientd versucht mehrere RPC-Verbindungen zu oeffnen, aber alle beenden mit demselben Fehler.

Ein kompletter Block ist soweit ich sehe (C:\tmp\opsiclient.log):

Code: Alles auswählen

[6] [May 10 14:18:45] [ control pipe                  ] Creating pipe \\.\pipe\opsiclientd   (ControlPipe.pyo|253)
[5] [May 10 14:18:45] [ control pipe                  ] -----> Executing: getBlockLogin()   (JsonRpc.pyo|123)
[5] [May 10 14:18:45] [ opsiclientd                   ] rpc getBlockLogin: blockLogin is 'True'   (ControlPipe.pyo|428)
[6] [May 10 14:18:45] [ control pipe                  ] Got result   (JsonRpc.pyo|131)
[5] [May 10 14:18:45] [ control pipe                  ] -----> Executing: isShutdownRequested()   (JsonRpc.pyo|123)
[6] [May 10 14:18:45] [ control pipe                  ] Got result   (JsonRpc.pyo|131)
[6] [May 10 14:18:45] [ control pipe                  ] Creating pipe \\.\pipe\opsiclientd   (ControlPipe.pyo|253)
[5] [May 10 14:18:46] [ control pipe                  ] -----> Executing: isRebootRequested()   (JsonRpc.pyo|123)
[6] [May 10 14:18:46] [ control pipe                  ] Got result   (JsonRpc.pyo|131)
[6] [May 10 14:18:46] [ control pipe                  ] Creating pipe \\.\pipe\opsiclientd   (ControlPipe.pyo|253)
[5] [May 10 14:18:47] [ control pipe                  ] -----> Executing: getBlockLogin()   (JsonRpc.pyo|123)
[5] [May 10 14:18:47] [ opsiclientd                   ] rpc getBlockLogin: blockLogin is 'True'   (ControlPipe.pyo|428)
[6] [May 10 14:18:47] [ control pipe                  ] Got result   (JsonRpc.pyo|131)
[6] [May 10 14:18:47] [ control pipe                  ] Creating pipe \\.\pipe\opsiclientd   (ControlPipe.pyo|253)
[5] [May 10 14:18:47] [ service connection            ] Connecting to config server 'https://MEINSERVER:4447/rpc/rpc' #2   (OpsiService.pyo|308)
[5] [May 10 14:18:48] [ control pipe                  ] -----> Executing: isShutdownRequested()   (JsonRpc.pyo|123)
[6] [May 10 14:18:48] [ control pipe                  ] Got result   (JsonRpc.pyo|131)
[6] [May 10 14:18:48] [ control pipe                  ] Creating pipe \\.\pipe\opsiclientd   (ControlPipe.pyo|253)
[6] [May 10 14:18:48] [ service connection            ] Verifying modules file signature   (JSONRPC.pyo|520)
[3] [May 10 14:18:48] [ service connection            ] Failed to connect to config server 'https://MEINSERVER:4447/rpc/rpc': 'NoneType' object has no attribute 'has_key'   (OpsiService.pyo|340)
Serverseitig (opsiconfd log fuer den Client im config editor) sieht es etwa so aus

Code: Alles auswählen

[5] [May 10 13:42:57] New session created (session.py|74)
[5] [May 10 13:42:57] Authorization request from host MEINCLIENT@10.11.28.127 (application: opsiclientd version 4.0.68) (workers.py|186)
[5] [May 10 13:42:58] -----> Executing: backend_getInterface() (JsonRpc.py|123)
[5] [May 10 13:42:58] -----> Executing: backend_info() (JsonRpc.py|123)
[5] [May 10 13:42:58] -----> Executing: backend_info() (JsonRpc.py|123)
[5] [May 10 13:42:58] -----> Executing: dispatcher_getConfig() (JsonRpc.py|123)
[5] [May 10 13:43:01] Application 'opsiclientd version 4.0.68' on client '10.11.28.127' did not send cookie (workers.py|161)
Auf beiden Clients hatte ich opsi komplett geloescht und neu installiert. Die einzige bewusste Aenderung in letzter Zeit war die Aenderung von ResolveHostAddress in /etc/opsi/backends/hostcontrol.conf. Ich habe diese Aenderung rueckgaengig gemacht und OPSI neu gestartet, aber leider ohne Erfolg. Bereits installierte Clients funktionieren weiterhin bestens und OPSI wurde in letzter Zeit nicht aktualisiert. Ebenfalls faellt auf, dass der Connection-Timeout bei den neu installierten Clients 30 Sekunden ist, waehrend die schon installierten Clients alle einen Timeout von 10 Sekunden haben.

Serverseitig installiert sind:

Code: Alles auswählen

sauron:~# dpkg -l |  grep -i opsi
ii  opsi-atftpd                          0.7.dfsg-1.4             advanced TFTP server - opsi version with pcr
ii  opsi-configed                        4.0.1.12-1               OPSI config editor
ii  opsi-depotserver                     4.0.1.10-1               opsi depotserver configuration package
ii  opsi-linux-bootimage                 20110829-1               Linux-Bootimage fuer das Softwareverteilungs
ii  opsi-utils                           4.0.1.14-1               opsi utils
ii  opsiconfd                            4.0.1.9-3                opsi configuration service
ii  opsipxeconfd                         4.0.1.4-1                opsi pxe configuration daemon
ii  python-opsi                          4.0.1.28-1               opsi python library
sauron:~# 
Ich bin gerade etwas ratlos.

frank

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 10 Mai 2012, 16:33
von mdecker
Hi,
embl-structures hat geschrieben:

Code: Alles auswählen

Failed to connect to config server 'https://MEINSERVER:4447/rpc/rpc': 'NoneType' object has no attribute 'has_key'   (OpsiService.pyo|340)
für mich sieht das auf den ersten Blick nach dem Problem aus: da steht /rpc/rpc. Zumindest bei mir steht da immer nur

Code: Alles auswählen

https://MEINSERVER:4447/rpc
in der Konfiguration. Ist da vielleicht an der Stelle was schief gelaufen?

Michael

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 10 Mai 2012, 16:55
von embl-structures
mdecker hat geschrieben:
embl-structures hat geschrieben:

Code: Alles auswählen

Failed to connect to config server 'https://MEINSERVER:4447/rpc/rpc': 'NoneType' object has no attribute 'has_key'   (OpsiService.pyo|340)
für mich sieht das auf den ersten Blick nach dem Problem aus: da steht /rpc/rpc. Zumindest bei mir steht da immer nur

Code: Alles auswählen

https://MEINSERVER:4447/rpc
Hmm in der Tat. Allerdings aendert sich an der Situation nichts, wenn ich auf dem Client in der Konfiguration die URL auf "https://MEINSERVER:4447/rpc" korrigiere.

frank

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 10 Mai 2012, 18:49
von d.oertel
Hi,

wert von
configed / Serverkonfiguration / clientconfig.configserver.url
?

gruss
d.oertel

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 10 Mai 2012, 19:05
von embl-structures
d.oertel hat geschrieben:configed / Serverkonfiguration / clientconfig.configserver.url
ist https://MEINSERVER:4447/rpm.

frank

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 10 Mai 2012, 19:44
von embl-structures
Das root-Filesystem war korrupt. Leider haben aber ein Reboot des Servers und ein fsck nichts geholfen. Frisch installierte Clients haben immer noch das beschriebene Problem. Ich sehe auch, dass C:\Program Files\opsi.org\opsi-client-agent\opsiclientd\opsiclientd.conf auf dem Client groesstenteils falsch ist. Die Werte unter [depot_server] sind z.B. alle leer und auch sonst stimmen viel Eintraege nicht mit denen auf einem funktionierenden Client ueberein. configed zeigt aber die korrekten Werte an.

Sollte ich am Besten das opsi-client-agent-Paket auf dem Server neu einspielen und kann man das machen, ohne die aktuellen Einstellungen zu verlieren?

Frank

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 10 Mai 2012, 22:43
von wolfbardo
Bitte Stand der opsi-Server Pakete prüfen.

Was sagt z.B.

Code: Alles auswählen

dpkg -l | grep opsi
Gruss
Bardo Wolf

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 11 Mai 2012, 10:36
von embl-structures
wolfbardo hat geschrieben: Was sagt z.B.

Code: Alles auswählen

dpkg -l | grep opsi
Steht schon in meinem originalen Post, aber hier nochmals

Code: Alles auswählen

sauron:~# dpkg -l |  grep -i opsi
ii  opsi-atftpd                          0.7.dfsg-1.4             advanced TFTP server - opsi version with pcr
ii  opsi-configed                        4.0.1.12-1               OPSI config editor
ii  opsi-depotserver                     4.0.1.10-1               opsi depotserver configuration package
ii  opsi-linux-bootimage                 20110829-1               Linux-Bootimage fuer das Softwareverteilungs
ii  opsi-utils                           4.0.1.14-1               opsi utils
ii  opsiconfd                            4.0.1.9-3                opsi configuration service
ii  opsipxeconfd                         4.0.1.4-1                opsi pxe configuration daemon
ii  python-opsi                          4.0.1.28-1               opsi python library
sauron:~# 
Gruss
Frank Thommen

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 11 Mai 2012, 10:47
von wolfbardo
embl-structures hat geschrieben: Steht schon in meinem originalen Post
hatte ich ubersehen.

In jedem Falle muss man stets beide Seiten aktuell halten, opsi-Linux Pakete und opsi-Windows Pakete.

Eine Aktualisierung der opsi-Server Pakete sollte das Problem beheben.

Gruss
Bardo Wolf

Re: Keine Verbindung: NoneType object has no attribute has_k

Verfasst: 11 Mai 2012, 12:26
von embl-structures
wolfbardo hat geschrieben:In jedem Falle muss man stets beide Seiten aktuell halten, opsi-Linux Pakete und opsi-Windows Pakete.
Das war eigentlich der Fall. Ich habe nie eine Seite einseitig aktualisiert.
wolfbardo hat geschrieben:Eine Aktualisierung der opsi-Server Pakete sollte das Problem beheben.
"apt-get upgrade" hat die korrupte Konfiguration repariert.

Danke
Frank