Seite 1 von 1

Probleme mit der Umstellung der Backends

Verfasst: 12 Sep 2011, 09:40
von lars_k
Hallo ,

wir möchten gerne für die Inventarisierungsdaten das mysql Backend nutzen.
Ich habe die Datei /etc/opsi/backendManager/dispatch wie folgt geändert:
backend_.* : file, mysql, opsipxeconfd
host_.* : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.* : file, opsipxeconfd
audit.* : mysql
.* : file

Danach opsi-setup --init-current-config ausgeführt - Es erscheint folgende Meldung:
[4] [Sep 12 09:38:55] Failed to read opsi modules file '/etc/opsi/modules': [Errno 21] Ist ein Verzeichnis: u'/etc/opsi/modules' (Backend.py|356)
[5] [Sep 12 09:38:55] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|389)
[2] [Sep 12 09:38:55] Traceback: (Logger.py|742)
[2] [Sep 12 09:38:55] line 3068 in '<module>' in file '/usr/bin/opsi-setup' (Logger.py|742)
[2] [Sep 12 09:38:55] line 3027 in 'main' in file '/usr/bin/opsi-setup' (Logger.py|742)
[2] [Sep 12 09:38:55] line 2441 in 'initializeBackends' in file '/usr/bin/opsi-setup' (Logger.py|742)
[2] [Sep 12 09:38:55] line 140 in '__init__' in file '/usr/lib/pymodules/python2.6/OPSI/Backend/BackendManager.py' (Logger.py|742)
[2] [Sep 12 09:38:55] line 224 in '__init__' in file '/usr/lib/pymodules/python2.6/OPSI/Backend/BackendManager.py' (Logger.py|742)
[2] [Sep 12 09:38:55] line 259 in '__loadBackends' in file '/usr/lib/pymodules/python2.6/OPSI/Backend/BackendManager.py' (Logger.py|742)
[2] [Sep 12 09:38:55] ==>>> Backend configuration error: Backend config file '/etc/opsi/backends/utf-8 -*-.conf' not found (opsi-setup|3076)

ERROR: Backend configuration error: Backend config file '/etc/opsi/backends/utf-8 -*-.conf' not found

Wie behebe ich dieses ?

Danke und Gruß

Lars

Re: Probleme mit der Umstellung der Backends

Verfasst: 12 Sep 2011, 10:15
von ueluekmen
Hi,

bitte

Code: Alles auswählen

cat /etc/opsi/backendManager/dispatch.conf
ausführen und komplette Ausgabe posten.

Re: Probleme mit der Umstellung der Backends

Verfasst: 12 Sep 2011, 10:18
von lars_k
#ckend_.* : file, mysql, opsipxeconfd
host_.* : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.* : file, opsipxeconfd
audit.* : mysql
.* : file
-*- 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
#
# ldap as main backend, mysql as hw/sw invent and license management backend, opsipxeconfd and dhcpd backend:
# backend_.* : ldap, mysql, opsipxeconfd, dhcpd
# host_.* : ldap, opsipxeconfd, dhcpd
# productOnClient_.* : ldap, opsipxeconfd
# configState_.* : ldap, opsipxeconfd
# license.* : mysql
# softwareLicense.* : mysql
# audit.* : mysql
# .* : ldap
#

# backend_.* : file, opsipxeconfd


backend_.* : file,mysql, opsipxeconfd
host_.* : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.* : file, opsipxeconfd
audit.* : mysql
.* : file

Re: Probleme mit der Umstellung der Backends

Verfasst: 12 Sep 2011, 10:26
von ueluekmen
Bis zur Zeile:

Code: Alles auswählen

-*- coding: utf-8 -*-
alles löschen.
Die Zeile:

Code: Alles auswählen

-*- coding: utf-8 -*-
muss so aussehen:

Code: Alles auswählen

# -*- coding: utf-8 -*-
Falls nicht schon erledigt muss die MySQL-DB initialisiert werden.

danach:

Code: Alles auswählen

opsi-setup --init-current-config
Daemons neustarten.

Re: Probleme mit der Umstellung der Backends

Verfasst: 12 Sep 2011, 10:51
von lars_k
Hallo ,

Danke , das hat funktioniert. :D

Jetzt habe ich das Problem , das ich keine Infos mehr zum System angezeigt bekomme. :(
Ich habe auch schon eine neue Hardwareinventory durchgeführt.



opsiservicecall_authenticated



DefStringList $hardware_hersteller$

set $hardware_hersteller$ = getReturnListFromSection('opsiServiceCall_Hardware_hersteller')
defvar $hersteller$
defvar $hersteller1$


set $hersteller$ = takeString(0, $hardware_hersteller$)

set $hersteller1$ = takeString(1, splitstring($hersteller$,'"hostId":"%hostid%"'))
set $hersteller1$ = takeString(1, splitstring($hersteller1$,"vendor"))
set $hersteller1$ = takeString(2, splitstring($hersteller1$,'"'))

[opsiServiceCall_Hardware_hersteller]
"method": "auditHardwareOnHost_getObjects"
"params": [
"%hostid%",
'{"hardwareClass":"COMPUTER_SYSTEM"}'
]


[opsiservicecall_authenticated]
"method": "authenticated"
"params": [
]

Re: Probleme mit der Umstellung der Backends

Verfasst: 13 Sep 2011, 06:56
von lars_k
Hallo ,

die Hardwareabfrage funktioniert auch wieder , aber mit einem anderen Script.
Danke für die gute Unterstützung. :!: Super Forum

Gruß

Lars

[opsiServiceCall_Hardware_hersteller]
"method": "auditHardwareOnHost_getObjects"
"params": [
'""' ,
'{"hardwareClass":"COMPUTER_SYSTEM"}'
]