Update von OTRS4 auf 5

Hilfe zu OTRS Problemen aller Art
Post Reply
Scifire

Update von OTRS4 auf 5

Post by Scifire »

Hallo zusammen,

ich habe den Auftrag bekommen ein OTRS4 auf Ubuntu 12.04.5 auf einen neuen Server mit Ubuntu 16.04.1 umzuziehen und dabei auch gleich OTRS zu updaten. Leider haben meine bisherigen versuche alle fehlgeschlagen.
Mein letzter versuch: OTRS mittels backup script zu backupen, rsync auf das neue system, dort zu restoren und dann nach upgrade anleitung das upgrade fahren. Hat theoretisch auch funktioniert, praktisch leider jedoch nicht da das Datenbankupgrade auf 5 fehlschlägt.

Code: Select all

Step 2 of 18: Check framework version...[Thu Dec 15 09:51:42 2016] DBUpdate-to-5.pl: Error: You are trying to run this script on the wrong framework version 4.0.5! at scripts/DBUpdate-to-5.pl line 255.
Das sagt mir leider jetzt auch nichts, zumal ich auch nichts bei google gefunden habe.
Könnte mir hier wer weiterhelfen?
Braucht ihr noch weitere Informationen?

Vielen Dank schonmal,
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Update von OTRS4 auf 5

Post by RStraub »

Was steht denn in der Datei ~otrs/RELEASE?

Der Fehler sagt aus, dass du versuchst die DB auf Version 5 umzuziehen, ohne vorher das Framework ausgetauscht zu haben.
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
Scifire

Re: Update von OTRS4 auf 5

Post by Scifire »

Nachdem post habe ich festgestellt das ich ein Fehler beim kopieren der neuen otrs version gemacht habe. Also war das der Versuch war mit den Daten von 4 auf 5 zu updaten was natürlich schlecht geht.

Jetzt habe ich die richtige Version (5.0.1) abgelegt doch nu kommt leider folegnder fehler:

Code: Select all

root@testotrs:/opt/otrs# cat scripts/DBUpdate-to-5.mysql.sql | mysql -p -f -u root otrs
Enter password:
ERROR 1061 (42000) at line 4: Duplicate key name 'link_relation_list_source'
ERROR 1061 (42000) at line 5: Duplicate key name 'link_relation_list_target'
ERROR 1050 (42S01) at line 9: Table 'scheduler_task' already exists
ERROR 1050 (42S01) at line 28: Table 'scheduler_future_task' already exists
ERROR 1050 (42S01) at line 47: Table 'scheduler_recurrent_task' already exists
ERROR 1091 (42000) at line 68: Can't DROP 'text2'; check that column/key exists
ERROR 1050 (42S01) at line 72: Table 'notification_event_message' already exists
ERROR 1050 (42S01) at line 87: Table 'cloud_service_config' already exists
ERROR 1022 (23000) at line 101: Can't write; duplicate key in table '#sql-28c4_3fe6'
ERROR 1022 (23000) at line 102: Can't write; duplicate key in table '#sql-28c4_3fe6'
ERROR 1022 (23000) at line 103: Can't write; duplicate key in table '#sql-28c4_3fe6'
ERROR 1022 (23000) at line 104: Can't write; duplicate key in table '#sql-28c4_3fe6'
Da die tables ja vorhanden waren bin ich einfach mal weiter gegangen jedoch DB updatescript ebenfalls fehl:

Code: Select all

$ scripts/DBUpdate-to-5.pl

Migration started...

Step 1 of 16: Refresh configuration cache...
If you see warnings about 'Subroutine Load redefined', that's fine, no need to worry!
done.

Step 2 of 16: Check framework version...done.

Step 3 of 16: Migrate Database Column Types...done.

Step 4 of 16: Migrate charset to UTF-8 on auto_response table...done.

Step 5 of 16: Migrate charset to UTF-8 on notification_event table...done.

Step 6 of 16: Migrate event based notifications to support multiple languages...done.

Step 7 of 16: Migrate notifications to event based notifications...[Thu Dec 15 10:22:44 2016] DBUpdate-to-5.pl: DBD::mysql::db do failed: Incorrect string value: '\xE7\xA5\xA8\xE6\x8D\xAE...' for column 'subject' at row 1 at /opt/otrs/Kernel/System/DB.pm line 449.
ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.22.1 OS: linux Time: Thu Dec 15 10:22:44 2016

 Message: Incorrect string value: '\xE7\xA5\xA8\xE6\x8D\xAE...' for column 'subject' at row 1, SQL: '
                INSERT INTO notification_event_message
                    (notification_id, subject, text, content_type, language)
                VALUES (?, ?, ?, ?, ?)'

 Traceback (8433):
   Module: Kernel::System::NotificationEvent::NotificationAdd Line: 375
   Module: main::_MigrateNotifications Line: 1207
   Module: scripts/DBUpdate-to-5.pl Line: 158

error.

[Thu Dec 15 10:22:44 2016] DBUpdate-to-5.pl: Died at scripts/DBUpdate-to-5.pl line 163.
Kann ich die Fehler in der mysql DB korrigieren?
nd0
Znuny expert
Posts: 232
Joined: 24 Mar 2015, 16:53
Znuny Version: 5.0.14
Location: Colonia

Re: Update von OTRS4 auf 5

Post by nd0 »

Stell den Ur-Zustand wieder her, bevor du erneut das Upgrade versuchst.

Die Tabellen "scheduler_task", "scheduler_future_task" und "scheduler_recurrent_task" existieren erst seit der 5er Version. Das bedetet, an der Datenbank (wie sie aktuell vorliegt) hat schonmal ein Script gewerkelt ... geh wieder zurück zum Zustand der 4er Version und versuch es dann nochmal.
LIVE: OTRS 5.0.14 || Debian || MySQL/LDAP
TEST: OTRS 5.0.14 || Debian || MySQL/LDAP
Scifire

Re: Update von OTRS4 auf 5

Post by Scifire »

Ich habe jetzt nochmal otrs vom live system gebackupt und auf dem test neu eingespielt. Dennoch hänge ich wieder am gleichen Fehler.

Code: Select all

Step 7 of 16: Migrate notifications to event based notifications...[Fri Dec 16 13:17:37 2016] DBUpdate-to-5.pl: DBD::mysql::db do failed: Incorrect string value: '\xE7\xA5\xA8\xE6\x8D\xAE...' for column 'subject' at row 1 at /opt/otrs/Kernel/System/DB.pm line 449.
ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.22.1 OS: linux Time: Fri Dec 16 13:17:37 2016

 Message: Incorrect string value: '\xE7\xA5\xA8\xE6\x8D\xAE...' for column 'subject' at row 1, SQL: '
                INSERT INTO notification_event_message
                    (notification_id, subject, text, content_type, language)
                VALUES (?, ?, ?, ?, ?)'

 Traceback (28685):
   Module: Kernel::System::NotificationEvent::NotificationAdd Line: 375
   Module: main::_MigrateNotifications Line: 1207
   Module: scripts/DBUpdate-to-5.pl Line: 158
any suggetions?
Post Reply