Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Antworten
MaPi
Beiträge: 4
Registriert: 25 Jun 2019, 13:38

Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von MaPi »

Hallo allerseits,

unser OPSI Config Editor zeigt in der Client-Liste nur noch einen Rechner an, da sollten aber etwa 300 stehen.
Das ist vor etwa einem halben Jahr schonmal passiert.
Die Spezialisten, die das damals reparierten, stehen uns aber derzeit nicht zur Verfügung.
Ich bin Linux-Admin, kenne mich aber mit OPSI nicht wirklich aus.

Gleichzeitig mit dem Fehler lief die Platte des OPSI-Servers voll wegen einem etwas älteren 165GB großen Logfile (nicht OPSI).
Ob das eine das andere bedingte, kann ich im Nachhinein nicht beantworten.
In den OPSI-Logs fiel mir nichts tragisches auf.

Die OPSI-Confd-Info meldet jedenfalls, dass die Clients bekannt sind:
Depotserver: 1
Client: 293
Product: 108
Config: 39

Versionen:
opsi config editor 4.0.7.6.34114
opsiclientd version 4.0.941474

Der im Config-Editor angezeigte Client ist eine olle Kamelle, die seit einem Jahr außer Betrieb ist. Wir haben den halt nicht gelöscht.
Das Log meines PCs in /var/log/opsi/opsiconfd/ sehen so aus:

Code: Alles auswählen

[5] [Jun 26 09:07:31] -----> Executing: productDependency_getObjects([]) (JsonRpc.py|134)
[4] [Jun 26 09:07:31] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: u'/etc/opsi/modules' (Backend.py|421)
[4] [Jun 26 09:07:32] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Jun 26 09:07:32] -----> Executing: auditSoftware_getHashes([u'name', u'version', u'subVersion', u'language', u'architecture', u'windowsSoftwareId']) (JsonRpc.py|134)
[4] [Jun 26 09:07:45] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Jun 26 09:07:45] -----> Executing: config_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 09:09:10] Application 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0' on client '<meineIP>' did not send cookie (workers.py|183)
[2] [Jun 26 09:09:10] Traceback: (Logger.py|757)
[2] [Jun 26 09:09:10]   File "/usr/lib/python2.7/dist-packages/OPSI/Service/Worker.py", line 292, in _errback
    failure.raiseException()
 (Logger.py|757)
[2] [Jun 26 09:09:10]   File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
    current.result = callback(current.result, *args, **kw)
 (Logger.py|757)
[2] [Jun 26 09:09:10]   File "/usr/lib/python2.7/dist-packages/opsiconfd/workers.py", line 191, in _getSession
    WorkerOpsi._getSession(self, result)
 (Logger.py|757)
[2] [Jun 26 09:09:10]   File "/usr/lib/python2.7/dist-packages/OPSI/Service/Worker.py", line 392, in _getSession
    sessionId = self._getSessionId()
 (Logger.py|757)
[2] [Jun 26 09:09:10]   File "/usr/lib/python2.7/dist-packages/opsiconfd/workers.py", line 186, in _getSessionId
    raise OpsiAuthenticationError(u"Application '%s' on client '%s' did neither supply session id nor password" % (self._getUserAgent(), self.request.remoteAddr.host))
 (Logger.py|757)
[2] [Jun 26 09:09:10]      ==>>> Opsi authentication error: Application 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0' on client '<meineIP>' did neither supply session id nor password (Worker.py|294)
[5] [Jun 26 09:09:17] Application 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0' on client '<meineIP>' did not send cookie (workers.py|183)
[5] [Jun 26 09:09:17] New session created (session.py|77)
[5] [Jun 26 09:09:17] Authorization request from <ich@meineIP> (application: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0) (workers.py|213)

Die Meldung "Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Is a directory: u'/etc/opsi/modules' (Backend.py|421)" taucht seit Jahren sehr häufig auf und hat die Funktion anscheinend nicht beeinflusst. Jedenfalls kommt sie auch in alten Logs massenhaft vor.
Um 9:09h habe ich den Config Editor gestartet, es dürfte sich also um meine Anmeldung handeln.

Die PCs haben dynamische IPs. Die Logs sind allesamt Links <pcname.log> -> <ipadresse.log>
In ipadresse.log steht natürlich ein Gemenge von Informationen über die Rechner, die den jeweiligen Lease hatten.

Wie kann ich den Client wieder dazu bewegen, alle Clients, insbesondere auch neue Clients, anzuzeigen?

Beste Grüße
MaPi
MaPi
Beiträge: 4
Registriert: 25 Jun 2019, 13:38

Re: Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von MaPi »

Wenn ich den Config Editor starte, erhalte ich diese Fehlermeldung:

Code: Alles auswählen

[3] [Jun 26 10:20:14] Execution error: Backend configuration error: You have tried to execute a method, that will not work with filebackend. (JsonRpc.py|146)
[4] [Jun 26 10:20:14] Failed RPC on u'getRawData' with params [u'select  *  from SOFTWARE_CONFIG LIMIT 1 ']: <BackendConfigurationError(u'You have tried to execute a method, that will not work with filebackend.')> (statistics.py|419)
Das gesamte Log meiner IP-Adresse für den Vorgang sieht so aus:

Code: Alles auswählen

[5] [Jun 26 10:20:13] Application 'opsi config editor 4.0.7.6.34' on client '<snip>' did not send cookie (workers.py|183)
[5] [Jun 26 10:20:13] New session created (session.py|77)
[5] [Jun 26 10:20:13] Authorization request from <snip> (application: opsi config editor 4.0.7.6.34) (workers.py|213)
[5] [Jun 26 10:20:14] -----> Executing: authenticated() (JsonRpc.py|134)
[5] [Jun 26 10:20:14] -----> Executing: getRawData(u'select  *  from SOFTWARE_CONFIG LIMIT 1 ') (JsonRpc.py|134)
[b][3] [Jun 26 10:20:14] Execution error: Backend configuration error: You have tried to execute a method, that will not work with filebackend. (JsonRpc.py|146)
[4] [Jun 26 10:20:14] Failed RPC on u'getRawData' with params [u'select  *  from SOFTWARE_CONFIG LIMIT 1 ']: <BackendConfigurationError(u'You have tried to execute a method, that will not work with filebackend.')> (statistics.py|419)
[/b][5] [Jun 26 10:20:14] -----> Executing: getPossibleMethods_listOfHashes() (JsonRpc.py|134)
[5] [Jun 26 10:20:14] -----> Executing: getOpsiInformation_hash() (JsonRpc.py|134)
[5] [Jun 26 10:20:14] -----> Executing: host_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 10:20:15] -----> Executing: configState_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 10:20:17] -----> Executing: config_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 10:20:17] -----> Executing: authenticated() (JsonRpc.py|134)
[5] [Jun 26 10:20:17] -----> Executing: accessControl_userIsReadOnlyUser() (JsonRpc.py|134)
[5] [Jun 26 10:20:17] -----> Executing: config_updateObjects([<UnicodeConfig(id=u'product_sort_algorithm', description=u'', possibleValues=[u'algorithm1', u'algorithm2'], defaultValues=[], editable=False, multiValue=False)>, <UnicodeConfig(id=u'configed.license...) (JsonRpc.py|134)
[5] [Jun 26 10:20:17] -----> Executing: objectToGroup_getObjects() (JsonRpc.py|134)
[5] [Jun 26 10:20:17] -----> Executing: config_updateObjects(<UnicodeConfig(id=u'configed.host_displayfields', description=u'', possibleValues=[u'UEFIboot', u'WANmode', u'clientConnected', u'clientCreated', u'clientDescription', u'clientHardwareAddress', u'clie...) (JsonRpc.py|134)
[5] [Jun 26 10:20:19] -----> Executing: SSHCommand_getObjects() (JsonRpc.py|134)
[5] [Jun 26 10:20:19] -----> Executing: accessControl_userIsReadOnlyUser() (JsonRpc.py|134)
[5] [Jun 26 10:20:19] -----> Executing: config_updateObjects([<UnicodeConfig(id=u'product_sort_algorithm', description=u'', possibleValues=[u'algorithm1', u'algorithm2'], defaultValues=[], editable=False, multiValue=False)>, <UnicodeConfig(id=u'configed.license...) (JsonRpc.py|134)
[5] [Jun 26 10:20:20] -----> Executing: product_getObjects([u'id', u'productVersion', u'packageVersion', u'setupScript', u'updateScript', u'uninstallScript', u'alwaysScript', u'onceScript', u'customScript', u'userLoginScript', u'priority', u'advice', u'name',...) (JsonRpc.py|134)
[5] [Jun 26 10:20:20] -----> Executing: productOnDepot_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 10:20:20] -----> Executing: getProductOrdering(u'') (JsonRpc.py|134)
[5] [Jun 26 10:20:20] Using sort algorithm 'algorithm1' (10_opsi.conf|99)
[5] [Jun 26 10:20:21] Generating product sequence by algorithm 1. (SharedAlgorithm.py|591)
[5] [Jun 26 10:20:21] product u'java' should be arranged before product u'dfn_freemind' but is not available (SharedAlgorithm.py|636)
[5] [Jun 26 10:20:21] product u'gitscm' should be arranged before product u'dfn_tortoisegit' but is not available (SharedAlgorithm.py|636)
[5] [Jun 26 10:20:21] -----> Executing: productProperty_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 10:20:21] -----> Executing: getProductOrdering(u'inr-infra02.inr.kit.edu') (JsonRpc.py|134)
[5] [Jun 26 10:20:21] Using sort algorithm 'algorithm1' (10_opsi.conf|99)
[5] [Jun 26 10:20:22] Generating product sequence by algorithm 1. (SharedAlgorithm.py|591)
[5] [Jun 26 10:20:22] product u'java' should be arranged before product u'dfn_freemind' but is not available (SharedAlgorithm.py|636)
[5] [Jun 26 10:20:22] product u'gitscm' should be arranged before product u'dfn_tortoisegit' but is not available (SharedAlgorithm.py|636)
[5] [Jun 26 10:20:22] -----> Executing: getDomain() (JsonRpc.py|134)
[5] [Jun 26 10:20:22] -----> Executing: getOpsiHWAuditConf(u'de_DE') (JsonRpc.py|134)
[5] [Jun 26 10:20:22] -----> Executing: productDependency_getObjects([]) (JsonRpc.py|134)
[5] [Jun 26 10:20:22] -----> Executing: auditSoftware_getHashes([u'name', u'version', u'subVersion', u'language', u'architecture', u'windowsSoftwareId']
Das Logfile des OPSI-Servers sieht so aus von "service opsiconfd restart" bis ich den Config Editor offen habe:

Code: Alles auswählen

==================================================================
=             opsi configuration service starting                =
================================================================== (Logger.py|847)
[5] [Jun 26 10:12:45] Creating pid file u'/var/run/opsiconfd/opsiconfd.pid' (opsiconfd.py|653)
[5] [Jun 26 10:12:45] Starting opsiconfd main thread (opsiconfd.py|469)
[5] [Jun 26 10:12:45] Opening socket /var/run/opsiconfd/opsiconfd.socket for interprocess communication. (opsiconfd.py|438)
[5] [Jun 26 10:12:45] Added static content '/' which points to directory '/usr/share/opsiconfd/static' (opsiconfd.py|291)
[5] [Jun 26 10:12:45] Running on depot server '<snip>', exporting repository directory (opsiconfd.py|308)
[5] [Jun 26 10:12:45] Running on depot server '<snip>', exporting depot directory (opsiconfd.py|321)
[5] [Jun 26 10:12:45] Added webdav content 'repository' which points to directory '/var/lib/opsi/repository' () (opsiconfd.py|354)
[5] [Jun 26 10:12:45] Added webdav content 'depot' which points to directory '/var/lib/opsi/depot' () (opsiconfd.py|354)
[5] [Jun 26 10:12:45] Added webdav content 'configed' which points to directory '/usr/lib/configed' (u'noauth',) (opsiconfd.py|354)
[5] [Jun 26 10:12:45] Accepting HTTPS requests on 0.0.0.0:4447 (opsiconfd.py|407)
[5] [Jun 26 10:12:45] Publishing opsiconfd over zeroconf as 'opsi configuration daemon' on '4447' (opsiconfd.py|421)
[5] [Jun 26 10:17:06] Session 'g0zuqtYI0fG9x4dA2Xj7hVOc9VQ5IRSf' from ip '<snip>', application 'opsiclientd version 4.0.94' expired after 120 seconds (Session.py|190)
[5] [Jun 26 10:17:06] Session 'g0zuqtYI0fG9x4dA2Xj7hVOc9VQ5IRSf' from ip '<snip>', application 'opsiclientd version 4.0.94' deleted (Session.py|225)
[5] [Jun 26 10:17:09] Session 'U7xRwGmM4jCGsvJ0Hlb1cullFDojRjuW' from ip '<snip>', application 'opsi config editor 4.0.7.6.34' expired after 120 seconds (Session.py|190)
[5] [Jun 26 10:17:09] Session 'U7xRwGmM4jCGsvJ0Hlb1cullFDojRjuW' from ip '<snip>', application 'opsi config editor 4.0.7.6.34' deleted (Session.py|225)
dropped91
Beiträge: 73
Registriert: 11 Mai 2017, 16:29

Re: Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von dropped91 »

Hi,

wie sieht denn deine backends.config aus?


Gruß
dropped
Benutzeravatar
n.wenselowski
Ex-uib-Team
Beiträge: 3194
Registriert: 04 Apr 2013, 12:15

Re: Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von n.wenselowski »

Hi,
MaPi hat geschrieben:Gleichzeitig mit dem Fehler lief die Platte des OPSI-Servers voll wegen einem etwas älteren 165GB großen Logfile (nicht OPSI).
Wenn das File-Backend zum Einsatz kommt, hat die vollgelaufene Platte vermutlich das Problem versucht, so dass opsi keine Daten mehr wegschreiben konnte - es entstehen nur noch leere Dateien, weil kein Platz mehr existiert diese mit Inhalt zu füllen.
Ich würde in diesem Fall raten ein Backup einzuspielen!


Gruß

Niko

Code: Alles auswählen

import OPSI
MaPi
Beiträge: 4
Registriert: 25 Jun 2019, 13:38

Re: Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von MaPi »

@dropped: Ich finde keine backend.conf
Es gibt einen Ordner /etc/opsi/backends mit etlichen Dateien drin:

Code: Alles auswählen

-rw-rw---- 1 opsiconfd opsiadmin 412 Nov 27  2018 dhcpd.conf
-rw-rw---- 1 opsiconfd opsiadmin 139 Nov 12  2015 file.conf
-rw-rw---- 1 opsiconfd opsiadmin 232 Feb 13  2018 hostcontrol.conf
-rw-rw---- 1 opsiconfd opsiadmin 142 Nov 12  2015 jsonrpc.conf
-rw-rw---- 1 opsiconfd opsiadmin 416 Nov 12  2015 multiplex.conf
-rw-rw---- 1 opsiconfd opsiadmin 379 Nov 12  2015 mysql.conf
-rw-rw---- 1 opsiconfd opsiadmin 120 Nov 12  2015 opsipxeconfd.conf
-rw-rw---- 1 opsiconfd opsiadmin 103 Nov 12  2015 sqlite.conf
dropped91
Beiträge: 73
Registriert: 11 Mai 2017, 16:29

Re: Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von dropped91 »

Hi,

sorry mein Fehler.

Hier der richtige Pfad:
/etc/opsi/backendManager/dispatch.conf
MaPi
Beiträge: 4
Registriert: 25 Jun 2019, 13:38

Re: Opsi Config Editor zeigt nur noch einen Rechner in der Liste

Beitrag von MaPi »

Die Dispatch-Conf ist:

Code: Alles auswählen

# -*- coding: utf-8 -*-
# = = = = = = = = = = = = = = = = = = = = = = =
# =      backend dispatch configuration       =
# = = = = = = = = = = = = = = = = = = = = = = =
#
# This file configures which methods are dispatched to which backends.
# Entries has to follow the form:
# <regular expression to match method name(s)> : <comma separated list of backend name(s)>
#
# Backend names have to match a backend configuraton file basename <backend name>.conf beneath /etc/opsi/backends.
# For every method executed on backend dispatcher the first matching regular expression will be decisive.
#
# Typical configurations:
#    file, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       .*                 : file
#
#    jsonrpc, opsipxeconfd and dhcpd backend:
#       backend_.*         : jsonrpc, opsipxeconfd, dhcpd
#       .*                 : jsonrpc
#
#    file as main backend, mysql as hw/sw invent and license management backend, opsipxeconfd and dhcpd backend:
#       backend_.*         : file, mysql, opsipxeconfd, dhcpd
#       host_.*            : file, opsipxeconfd, dhcpd
#       productOnClient_.* : file, opsipxeconfd
#       configState_.*     : file, opsipxeconfd
#       license.*          : mysql
#       softwareLicense.*  : mysql
#       audit.*            : mysql
#       .*                 : file
#

backend_.*         : file, opsipxeconfd
host_.*            : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.*     : file, opsipxeconfd
.*                 : file
Antworten