Probleme mit der Umstellung der Backends
Probleme mit der Umstellung der Backends
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
bitte
Code: Alles auswählen
cat /etc/opsi/backendManager/dispatch.conf
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de
Re: Probleme mit der Umstellung der Backends
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
Code: Alles auswählen
-*- coding: utf-8 -*-
Die Zeile:
Code: Alles auswählen
-*- coding: utf-8 -*-
Code: Alles auswählen
# -*- coding: utf-8 -*-
danach:
Code: Alles auswählen
opsi-setup --init-current-config
Vielen Dank für die Nutzung von opsi. Im Forum ist unser Support begrenzt.
Für den professionellen Einsatz und individuelle Beratung empfehlen wir einen Support-Vertrag und eine Schulung.
Gerne informieren wir Sie zu unserem Angebot.
uib GmbH
Telefon: +49 6131 27561 0
E-Mail: sales@uib.de
Re: Probleme mit der Umstellung der Backends
Danke , das hat funktioniert.

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
die Hardwareabfrage funktioniert auch wieder , aber mit einem anderen Script.
Danke für die gute Unterstützung.

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