ich wollte unseren opsi-Server so einrichten, das er die Daten der Inventarisierung in einer MySQL-Datenbank speichert. Dabei kam es zu einigen Fehlern.
Zuerst wurde der Server auf den aktuellen Stand gebracht mit:
Code: Alles auswählen
apt-get update && apt-get dist-upgrade
danach ging es an die Einrichtung des Datenbankservers (wir nutzen einen dezidierten Datenbankserver mit dem DNS-Namen database.fak6.tu-berlin.de):
Code: Alles auswählen
ostrya:~# opsi-setup --configure-mysql
[2] [Feb 27 15:58:32] Traceback: (Logger.py|710)
[2] [Feb 27 15:58:32] line 2772 in '<module>' in file '/usr/bin/opsi-setup' (Logger.py|710)
[2] [Feb 27 15:58:32] line 2738 in 'main' in file '/usr/bin/opsi-setup' (Logger.py|710)
[2] [Feb 27 15:58:32] line 2015 in 'configureMySQLBackend' in file '/usr/bin/opsi-setup' (Logger.py|710)
[2] [Feb 27 15:58:32] ==>>> (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-berlin.de IDENTIFIED BY '********************'' at line 1") (opsi-setup|2780)
ERROR: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-berlin.de IDENTIFIED BY ''********************'' '' at line 1")
Danach gings an die Konfiguration der Datei /etc/opsi/backendManager/dispatch.own.conf (die einen Link auf dispatch.conf hat):
Code: Alles auswählen
backend_.* : file, opsipxeconfd, mysql, dhcpd
host_.* : file, opsipxeconfd, dhcpd
productOnClient_.* : file, opsipxeconfd
configState_.* : file, opsipxeconfd
license.* : mysql
softwareLicense.* : mysql
audit.* : mysql
.* : file
Nach Handbuch geht es weiter mit
Code: Alles auswählen
ostrya:~# opsi-setup --init-current-config
[5] [Feb 27 16:05:21] Modules file signature verified (customer: opsi community) (MySQL.py|408)
[5] [Feb 27 16:05:21] Creating base path: '/var/lib/opsi/config' (File.py|213)
[5] [Feb 27 16:05:22] Creating opsi base (SQL.py|298)
[2] [Feb 27 16:05:22] Traceback: (Logger.py|710)
[2] [Feb 27 16:05:22] line 2772 in '<module>' in file '/usr/bin/opsi-setup' (Logger.py|710)
[2] [Feb 27 16:05:22] line 2734 in 'main' in file '/usr/bin/opsi-setup' (Logger.py|710)
[2] [Feb 27 16:05:22] line 2344 in 'initializeBackends' in file '/usr/bin/opsi-setup' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in 'backend_createBase' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 393 in '_executeMethod' in file '/var/lib/python-support/python2.5/OPSI/Backend/Backend.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in '<module>' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in 'backend_createBase' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 393 in '_executeMethod' in file '/var/lib/python-support/python2.5/OPSI/Backend/Backend.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in '<module>' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in 'backend_createBase' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 393 in '_executeMethod' in file '/var/lib/python-support/python2.5/OPSI/Backend/Backend.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in '<module>' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in 'backend_createBase' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 309 in '_dispatchMethod' in file '/var/lib/python-support/python2.5/OPSI/Backend/BackendManager.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 1 in '<module>' in file '<string>' (Logger.py|710)
[2] [Feb 27 16:05:22] line 328 in 'backend_createBase' in file '/var/lib/python-support/python2.5/OPSI/Backend/SQL.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 337 in 'execute' in file '/var/lib/python-support/python2.5/OPSI/Backend/MySQL.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 166 in 'execute' in file '/var/lib/python-support/python2.5/MySQLdb/cursors.py' (Logger.py|710)
[2] [Feb 27 16:05:22] line 35 in 'defaulterrorhandler' in file '/var/lib/python-support/python2.5/MySQLdb/connections.py' (Logger.py|710)
[2] [Feb 27 16:05:22] ==>>> (1050, "Table 'host' already exists") (opsi-setup|2780)
ERROR: (1050, "Table 'host' already exists")
Dieser letzte Fehler hat aber bisher offensichtlich keine Auswirkungen auf die Funktion. Soweit ich bisher sehe werden die Inventarisierungsdaten in der Datenbank gespeichert und auch abgerufen. Clients erhalten ihre IPs und können neu aufgesetzt werden.