eigentlich nutze ich meines Wissens immer noch das File-Backend für so ziemlich alles Mögliche (Software-Audits etc), aber beim letzten Update kam plötzlich folgende Fehlermeldung:
Code: Alles auswählen
opsi-depotserver (4.0.6.7-2) wird eingerichtet ...
[5] [Oct 19 19:04:17] Modules file signature verified (customer: opsi community) (MySQL.py|523)
[5] [Oct 19 19:04:18] Creating base path: '/var/lib/opsi/config' (File.py|233)
[5] [Oct 19 19:04:19] Creating opsi base (SQL.py|462)
[2] [Oct 19 19:04:19] Traceback: (Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/bin/opsi-setup", line 2182, in <module>
main()
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/bin/opsi-setup", line 2130, in main
initializeBackends()
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/bin/opsi-setup", line 1794, in initializeBackends
backend.backend_createBase()
(Logger.py|753)
[2] [Oct 19 19:04:19] File "<string>", line 1, in backend_createBase
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
return meth(**kwargs)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "<string>", line 1, in backend_createBase
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
return meth(**kwargs)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "<string>", line 1, in backend_createBase
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/OPSI/Backend/Backend.py", line 488, in _executeMethod
return meth(**kwargs)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "<string>", line 1, in backend_createBase
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/OPSI/Backend/BackendManager.py", line 488, in _dispatchMethod
res = meth(**kwargs)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/OPSI/Backend/SQL.py", line 994, in backend_createBase
self._sql.execute(hardwareConfigTable)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/OPSI/Backend/MySQL.py", line 445, in execute
res = cursor.execute(query)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 226, in execute
self.errorhandler(self, exc, value)
(Logger.py|753)
[2] [Oct 19 19:04:19] File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorvalue
(Logger.py|753)
[2] [Oct 19 19:04:19] ==>>> (1067, "Invalid default value for 'firstseen'") (opsi-setup|2186)
Code: Alles auswählen
+-----------------+---------------+------+-----+---------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+---------------+------+-----+---------------------+----------------+
| config_id | int(11) | NO | PRI | NULL | auto_increment |
| clientId | varchar(255) | NO | | NULL | |
| name | varchar(100) | NO | | NULL | |
| version | varchar(100) | NO | | NULL | |
| subVersion | varchar(100) | NO | | NULL | |
| language | varchar(10) | NO | | NULL | |
| architecture | varchar(3) | NO | | NULL | |
| uninstallString | varchar(200) | YES | | NULL | |
| binaryName | varchar(100) | YES | | NULL | |
| firstseen | timestamp | NO | | 0000-00-00 00:00:00 | |
| lastseen | timestamp | NO | | 0000-00-00 00:00:00 | |
| state | tinyint(4) | NO | | NULL | |
| usageFrequency | int(11) | NO | | -1 | |
| lastUsed | timestamp | NO | | 0000-00-00 00:00:00 | |
| licenseKey | varchar(1024) | YES | | NULL | |
+-----------------+---------------+------+-----+---------------------+----------------+
Code: Alles auswählen
alter table SOFTWARE_CONFIG alter lastseen set DEFAULT '1970-01-01 00:00:01', alter firstseen set DEFAULT '1970-01-01 00:00:01', alter lastused set default '1970-01-01 00:00:01';
ERROR 1067 (42000): Invalid default value for 'firstseen'
Daher hab ich dann mal usageFrequency so verändert, dass NULL als Default gesetzt wird, aber das macht es leider nicht besser.
Bei der Fehlersuche war ich auf den Hinweis bzgl. des safe_mode von mysql gestoßen, der TIMESTAMPS mit "0000-00-00 00:00" als Default verbietet:
Code: Alles auswählen
mysql> SHOW VARIABLES LIKE 'sql_mode'
-> ;
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
| sql_mode | ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+---------------+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0,00 sec)
Installiert sind u.a. die folgenden Pakete:
- * opsi-atftpd_0.7.dfsg-6_i386.deb
* opsiconfd_4.0.7.4-1_all.deb
* opsi-configed_4.0.7.1.3-1_all.deb
* opsi-depotserver_4.0.6.7-2_all.deb
* opsi-linux-bootimage_20160706-1_i386.deb
* opsi-linux-bootimage_20160825-1_i386.deb
* opsipxeconfd_4.0.7.1-1_all.deb
* opsi-utils_4.0.7.5-1_all.deb
* mysql-client-5.7_5.7.15-0ubuntu0.16.04.1_i386.deb
* mysql-client-core-5.7_5.7.15-0ubuntu0.16.04.1_i386.deb
* mysql-common_5.7.15-0ubuntu0.16.04.1_all.deb
* mysql-server_5.7.15-0ubuntu0.16.04.1_all.deb
* mysql-server-5.7_5.7.15-0ubuntu0.16.04.1_i386.deb
* mysql-server-core-5.7_5.7.15-0ubuntu0.16.04.1_i386.deb
Code: Alles auswählen
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://archive.ubuntu.com/ubuntu xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted
deb http://archive.ubuntu.com/ubuntu xenial universe
deb-src http://archive.ubuntu.com/ubuntu xenial universe
deb http://archive.ubuntu.com/ubuntu xenial multiverse
deb-src http://archive.ubuntu.com/ubuntu xenial multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
deb http://download.opensuse.org/repositories/home:/uibmz:/opsi:/opsi40/xUbuntu_14.04 ./