[SOLVED] Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Antworten
MAEChris
Beiträge: 6
Registriert: 06 Jul 2015, 09:28

[SOLVED] Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Beitrag von MAEChris »

Hallo zusammen,

nach dem Upgrade von Ubuntu 14.04 auf 16.04 und gleichzeitiger Aktualisierung von opsi auf 4.0.7.1.3-1 können wir keine Clients löschen oder umbenennen. Folgende Fehlermeldung erhalten wir im Config Editor:

Code: Alles auswählen

Sep 02  08:57:31.853  2016 -- Opsi service error:  [OperationalError] (1054, "Unknown column 'NumberOfCores' in 'where clause'")
Nach der Suche hier im Forum, habe ich schon folgendes ausprobiert, leider ohne Erfolg:

Code: Alles auswählen

opsi-setup --init-current-config
[4] [Sep 02 10:59:41] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 02 10:59:41] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[5] [Sep 02 10:59:41] Creating base path: '/var/lib/opsi/config' (File.py|233)
[5] [Sep 02 10:59:41] Try to find a Configserver. (opsi-setup|1796)
[5] [Sep 02 10:59:42] Getting current system config (opsi-setup|111)
[5] [Sep 02 10:59:42] System information: (opsi-setup|164)
[5] [Sep 02 10:59:42]    distributor  : Ubuntu (opsi-setup|165)
[5] [Sep 02 10:59:42]    distribution : Ubuntu 16.04.1 LTS (opsi-setup|166)
[5] [Sep 02 10:59:42]    ip address   : 192.168.xx.xx (opsi-setup|167)
[5] [Sep 02 10:59:42]    netmask      : 255.255.xx.xx (opsi-setup|168)
[5] [Sep 02 10:59:42]    subnet       : 192.168.xx.xx (opsi-setup|169)
[5] [Sep 02 10:59:42]    broadcast    : 192.168.xx.xx (opsi-setup|170)
[5] [Sep 02 10:59:42]    fqdn         : opsi-xx (opsi-setup|171)
[5] [Sep 02 10:59:42]    hostname     : opsi-xx (opsi-setup|172)
[5] [Sep 02 10:59:42]    domain       : xx.local (opsi-setup|173)
[5] [Sep 02 10:59:42]    win domain   : WORKGROUP (opsi-setup|174)
[5] [Sep 02 10:59:42] Configuring client user pcpatch (opsi-setup|180)
[5] [Sep 02 10:59:42]    Creating RSA private key for user pcpatch in '/var/lib/opsi/.ssh/id_rsa' (opsi-setup|194)
[5] [Sep 02 10:59:42] Setting rights on directory '/var/lib/opsi/.ssh' (Rights.py|121)
[4] [Sep 02 10:59:42] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 02 10:59:42] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[4] [Sep 02 10:59:43] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 02 10:59:43] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)

Code: Alles auswählen

/etc/init.d/opsiconfd restart
Stopping opsi config service...   (done).
Starting opsi config service.......   (done).
Beim nächsten Befehl erhalten wir folgende Fehlermeldung, im Forum bin ich leider auf keine Lösung gestoßen:

Code: Alles auswählen

opsi-setup --update-mysql
[5] [Sep 02 11:01:40] Connection to database 'opsi' on 'localhost' as user 'opsi' (MySQL.py|47)
[2] [Sep 02 11:01:40] Traceback: (Logger.py|753)
[2] [Sep 02 11:01:40]   File "/usr/bin/opsi-setup", line 2182, in <module>
    main()
 (Logger.py|753)
[2] [Sep 02 11:01:40]   File "/usr/bin/opsi-setup", line 2137, in main
    updateMySQLBackend(additionalBackendConfiguration=backendConfig)
 (Logger.py|753)
[2] [Sep 02 11:01:40]   File "/usr/lib/python2.7/dist-packages/OPSI/Util/Task/UpdateBackend/MySQL.py", line 56, in updateMySQLBackend
    mysql.execute("alter table `%s` convert to charset utf8 collate utf8_general_ci;" % tableName)
 (Logger.py|753)
[2] [Sep 02 11:01:40]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 445, in execute
    res = cursor.execute(query)
 (Logger.py|753)
[2] [Sep 02 11:01:40]   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in execute
    self.errorhandler(self, exc, value)
 (Logger.py|753)
[2] [Sep 02 11:01:40]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorvalue
 (Logger.py|753)
[2] [Sep 02 11:01:40]      ==>>> (1067, "Invalid default value for 'firstseen'") (opsi-setup|2186)

ERROR: (1067, "Invalid default value for 'firstseen'")
Und zur Vollständigkeit der dispatch.conf Auszug:

Code: Alles auswählen

backend_.*         : file, opsipxeconfd
host_.*            : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.*     : file, opsipxeconfd
audit.*            : mysql
.*                 : file
Kann jemand weiterhelfen? Danke :)
Zuletzt geändert von MAEChris am 08 Feb 2017, 08:10, insgesamt 1-mal geändert.
Benutzeravatar
wolfbardo
uib-Team
Beiträge: 1411
Registriert: 01 Jul 2008, 12:10

Re: Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Beitrag von wolfbardo »

Backendkonfiguration ist fehlerhaft:
MAEChris hat geschrieben: Und zur Vollständigkeit der dispatch.conf Auszug:

Code: Alles auswählen

backend_.*         : file, opsipxeconfd
host_.*            : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.*     : file, opsipxeconfd
audit.*            : mysql
.*                 : file
Kann jemand weiterhelfen? Danke :)
Bitte anpassen auf

Code: Alles auswählen

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

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


MAEChris
Beiträge: 6
Registriert: 06 Jul 2015, 09:28

Re: Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Beitrag von MAEChris »

Danke für die schnelle Antwort.

Dispatch ist angepasst

Code: Alles auswählen

backend_.*         : file, opsipxeconfd, mysql
host_.*            : file, opsipxeconfd
productOnClient_.* : file, opsipxeconfd
configState_.*     : file, opsipxeconfd
audit.*            : mysql
.*                 : file
Bekomme aber trotzdem die Fehlermeldung:

Code: Alles auswählen

opsi-setup --init-current-config
[4] [Sep 02 13:15:57] Failed to read opsi modules file '/etc/opsi/modules': [Errno 2] No such file or directory: u'/etc/opsi/modules' (Backend.py|421)
[5] [Sep 02 13:15:57] Disabling mysql backend and license management module: no customer in modules file (MySQL.py|492)
[5] [Sep 02 13:15:57] Creating base path: '/var/lib/opsi/config' (File.py|233)
[5] [Sep 02 13:15:57] Creating opsi base (SQL.py|462)
[2] [Sep 02 13:15:57] Traceback: (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/bin/opsi-setup", line 2182, in <module>
    main()
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/bin/opsi-setup", line 2130, in main
    initializeBackends()
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/bin/opsi-setup", line 1794, in initializeBackends
    backend.backend_createBase()
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "<string>", line 1, in backend_createBase
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
    return meth(**kwargs)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "<string>", line 1, in backend_createBase
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
    return meth(**kwargs)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "<string>", line 1, in backend_createBase
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
    return meth(**kwargs)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "<string>", line 1, in backend_createBase
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 488, in _dispatchMethod
    res = meth(**kwargs)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/SQL.py", line 994, in backend_createBase
    self._sql.execute(hardwareConfigTable)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 445, in execute
    res = cursor.execute(query)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in execute
    self.errorhandler(self, exc, value)
 (Logger.py|753)
[2] [Sep 02 13:15:57]   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorvalue
 (Logger.py|753)
[2] [Sep 02 13:15:57]      ==>>> (1067, "Invalid default value for 'firstseen'") (opsi-setup|2186)

ERROR: (1067, "Invalid default value for 'firstseen'")
Benutzeravatar
m.radtke
Ex-uib-Team
Beiträge: 1767
Registriert: 10 Jun 2015, 12:19

Re: Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Beitrag von m.radtke »

Hi

in den Releasenotes und im getting started gibt es einen gesonderten Hinweis zum Thema Ubuntu 16.04 MySQL und strict mode

http://download.uib.de/opsi4.0/doc/html ... ig-backend


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


MAEChris
Beiträge: 6
Registriert: 06 Jul 2015, 09:28

Re: Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Beitrag von MAEChris »

Hallo,

ja, hat geklappt. Und beim nächsten Mal lese ich auch zurest die Releasenotes ;)

Danke für die Unterstützung! :)
Benutzeravatar
m.radtke
Ex-uib-Team
Beiträge: 1767
Registriert: 10 Jun 2015, 12:19

Re: Clients können nicht gelöscht/umbenannt werden 4.0.7/Ubuntu 16.04

Beitrag von m.radtke »

Hi,
gerne.

Bitte für in den Threadtitel ein [SOLVED] hinzu.
So wissen die anderen user auch das dieses Problem gelöst wurde.
Danke und ein angenehmes Wochenende


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


Antworten