Probleme nach Migration

Hilfe zu Znuny Problemen aller Art
Locked
masanin
Znuny newbie
Posts: 3
Joined: 12 Feb 2016, 16:00
Znuny Version: 5.0.3

Probleme nach Migration

Post by masanin »

Hallo Zusammen

Wir setzen in unserer Firma schon länger OTRS ein. Jedoch haben wir beim letzten Server es versäumt, die Updates regelmässig zu machen, haben wir uns entschieden, gleich eine virtuelle Maschine zu erstellen (ESX) anstatt neue Hardware zu kaufen.
Auf dieser virtuellen Maschine läuft FreeBSD 10.2 mit MySQL56 und Apache24.

Ich musste die Datenbank mithilfe der Scripts von der OTRS Version 3.2.1 auf die neuste Version im FreeBSD-Portstree 5.0.3 Updaten. Wie es auch in der Anleitung beschrieben ist, habe ich das OTRS mithilfe der Scripts aus dem Tarball folgendermassen geupdatet:
3.2.11-->3.3.9-->4.0.9-->5.0.3

Nun habe ich das Problem, wenn ich den "geupdateten Datenbankdump" einspiele, dass ich immer den Fehler "Need TicketID!" erhalte, wenn ich ein neues Ticket erstellen will. Ich habe das Update der Datenbank mehrmals wiederholt und es gab nie Fehler.

Jetzt wenn ich im http-error.log nachschaue, sehe ich folgenden Fehler:

Code: Select all

[Fri Feb 12 15:13:11.195206 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: [Fri Feb 12 15:13:11 2016] index.pl: DBD::mysql::db do failed: Field 'ticket_answered' doesn't have a default value at /usr/local/otrs/bin/cgi-bin/../../Kernel/System/DB.pm line 449.: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.197801 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: ERROR: OTRS-CGI-15 Perl: 5.20.3 OS: freebsd Time: Fri Feb 12 15:13:11 2016: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.197815 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.197848 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  Message: Field 'ticket_answered' doesn't have a default value, SQL: ': /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.197892 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:             INSERT INTO ticket (tn, title, create_time_unix, type_id, queue_id, ticket_lock_id,: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.197938 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:                 user_id, responsible_user_id, ticket_priority_id, ticket_state_id,: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.197976 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:                 escalation_time, escalation_update_time, escalation_response_time,: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198024 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:                 escalation_solution_time, timeout, service_id, sla_id, until_time,: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198060 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:                 archive_flag, create_time, create_by, change_time, change_by): /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198095 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:             VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 0, 0, 0, 0, 0, ?, ?, 0, ?,: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198107 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:                 : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198123 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:         '2016-02-12 15:13:11': /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198132 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:     , ?, : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198148 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:         '2016-02-12 15:13:11': /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198156 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:     , ?)': /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198161 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198176 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  RemoteAddress: 192.168.2.53: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198192 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  RequestURI: /otrs/index.pl: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198197 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198209 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  Traceback (4293): : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198236 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: Kernel::System::Ticket::TicketCreate Line: 450: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198271 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: Kernel::Modules::AgentTicketPhone::Run Line: 1230: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198301 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: Kernel::System::Web::InterfaceAgent::Run Line: 1041: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.198314 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: /usr/loc: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315573 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: al/otrs/bin/cgi-bin/index.pl Line: 40: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315594 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315634 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: ERROR: OTRS-CGI-15 Perl: 5.20.3 OS: freebsd Time: Fri Feb 12 15:13:11 2016: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315640 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315654 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  Message: Need TicketID!: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315659 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315675 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  RemoteAddress: 192.168.2.53: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315690 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  RequestURI: /otrs/index.pl: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315695 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315707 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:  Traceback (4293): : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315738 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: Kernel::System::Ticket::Article::ArticleCreate Line: 133: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315767 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: Kernel::Modules::AgentTicketPhone::Run Line: 1325: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315796 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: Kernel::System::Web::InterfaceAgent::Run Line: 1041: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315823 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215:    Module: /usr/local/otrs/bin/cgi-bin/index.pl Line: 40: /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
[Fri Feb 12 15:13:11.315827 2016] [cgi:error] [pid 4291] [client 192.168.2.53:64661] AH01215: : /usr/local/otrs/bin/cgi-bin/index.pl, referer: http://192.168.3.220/otrs/index.pl?Action=AgentTicketPhone
Ich vermute dass das Problem mit dem Feld 'ticket_answered' in der DB zusammenhängt, aber leider weiss ich hier nicht weiter...

Kann mir vielleicht jemand hier weiterhelfen?
Ich versuche es schon seit mehreren Wochen und bin am verzweifeln...

Gruss Miro
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Probleme nach Migration

Post by wurzel »

Hi,

wohoooooo FreeBSD ist 'n bisschen tricky. Ich würde NICHT den FreeBSD PortsTree verwenden, sondern from scratch das tar.gz file. Das tar.gz file ist am Ende leichter (also mir fiel es immer leichter) weil Ports (wie auch andere online repos) oft die Pfade verbiegen und dann der "Standard" oft nicht läuft.

ich vermute (!) dass Deine Migration an einem Punkt fehl schlug. Hattest Du während der Upgrades mit den Skripten irgendwo Fehler?

das hier

Code: Select all

Field 'ticket_answered' doesn't have a default value
da würde ich mal ansetzen. Da fehlt was. Entweder in der DB oder in der Sysconfig.


Hast Du mal mit einer leeren Sysconfig probiert (also ZZZAuto.pm mal gelöscht + rebuild?)

Viele Grüße
Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
masanin
Znuny newbie
Posts: 3
Joined: 12 Feb 2016, 16:00
Znuny Version: 5.0.3

Re: Probleme nach Migration

Post by masanin »

Hi Flo

Den Vorgang der Migration der DB habe ich mehrfach gemacht, es gab z.T. Probleme, wie z.B. ein Teil der Tabellen in der DB waren mit MyISAM ein Teil InnoDB. Konnte jedoch gelöst werden, indem ich jede Tabelle, welche MyISAM als Storage-Engine verwendeten zu InnoDB gewechselt. Auch gab es bei Ausführung des Migrationsscript für die DB einen Fehler, aber nachdem ich das Script nochmals ausgeführt habe, trat dieser nicht mehr auf.
Ich werde das ganze heute nochmals durchspielen, die Fehler, falls welche auftreten, notieren und hier posten.

An der Konfiguration kann es nicht liegen. Nachdem ich das OTRS aus dem Portstree installiert habe und mit einer frischen Konfiguration gearbeitet hatte, funktionierte alles Tadellos. Erst als ich den Dump wieder eingespielt hatte, funktionierte es nicht mehr. Daher vermute ich, dass es "nur" an der Datenbank liegt.

Gruss Miro
masanin
Znuny newbie
Posts: 3
Joined: 12 Feb 2016, 16:00
Znuny Version: 5.0.3

Re: Probleme nach Migration

Post by masanin »

Also

Nun habe ich den ganzen Update-Prozess der Datenbank durchgespielt.
Ich hatte, damit ich die Datenbank und die Config einfach "updaten" kann eine weitere virtuelle Maschine mit FreeBSD erstellt und dort mithilfe der Tarballs alle OTRS-Versionen installiert, welche ich für den Updatevorgang brauche. OTRS 3.3.9, 4.0.9 und 5.0.3.

Hier mein vorgehen und die Fehler:
OTRS 3.3.9:
Beim Ausführen des Scripts otrs.CheckDB.pl:

Code: Select all

Connected.
Your storage engine is InnoDB.
These tables use a different storage engine:

article
article_attachment
article_flag
...
Danach habe ich mit ALTER TABLE im mysql die Storage-Engine von MyISAM auf InnoDB gewechselt

Code: Select all

ALTER TABLE article ENGINE=InnoDB;
ALTER TABLE article_attachment ENGINE=InnoDB;
ALTER TABLE article_flag ENGINE=InnoDB;
...
Danach wieder das otrs.CheckDB.pl Script nochmals ausgeführt und es zeigte nichts mehr an.

Nach dem Schritt "cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs" erhielt ich ein paar "Fehler" von MySQL:

Code: Select all

#cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_queue_id_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_queue_standard_response_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_response_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_standard_attachment_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_create_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_attachment_change_by_id does not exist, skipping.
Im Thread viewtopic.php?t=26934 habe ich nachgelesen, dass es sich dabei im nichts Verheerendes handelt und mit dem Script DBUpdate-to-3.3.pl weitergemacht. Dies zeigte keine Fehler an, lediglich "Subroutinge Load redefindet at..." Fehler, welche man, laut dem Script, ignorieren kann

Danach habe ich normal weiter gemacht. Beim Update von 3.3 auf 4.0 mit dem Scriot DB-Update-to-4.mysql.sql gab es wieder ein paar Fremdschlüssel-Probleme, was ich dieses mal auch Ignorierte.

Code: Select all

#cat scripts/DBUpdate-to-4.mysql.sql | mysql -p -f -u root otrs
INFO: Foreign key constraint FK_ticket_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_ticket_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_ticket_history_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_ticket_history_valid_id_id does not exist, skipping
Beim Perl-Script für das DB-Update gab es schon mehr Fehler

Code: Select all

#su otrs
%perl scripts/DBUpdate-to-4.pl
Step 9 of 15: Uninstall Merged Feature Add-Ons... ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/Config/Files/Support.xml!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/Language/de_Support.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/Language/es_MX_Support.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/Modules/AdminSupport.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/Output/HTML/Standard/AdminSupport.dtl!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/Output/HTML/Standard/AdminSupportLicenseText.dtl!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Database.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/OS.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/OTRS.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Webserver/IIS.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Webserver/Apache.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Database/oracle.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Database/mssql.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Database/postgresql.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Database/mysql.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/System/Support/Webserver.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/cpan-lib/Archive/Tar/Constant.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/cpan-lib/Archive/Tar/File.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016

 Message: No such file: /usr/local/otrs/Kernel/cpan-lib/Archive/Tar.pm!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

Notice: Backup for changed file: /usr/local/otrs/Kernel/cpan-lib/Linux/Distribution.pm.backup
ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:45 2016

 Message: Can't remove file /usr/local/otrs/Kernel/cpan-lib/Linux/Distribution.pm, because it a framework file and no other one exists!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3435
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176

ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:45 2016

 Message: No such file: /usr/local/otrs/var/httpd/htdocs/skins/Agent/default/css/Support.Default.css!

 Traceback (63438): 
   Module: Kernel::System::Package::_FileRemove Line: 3412
   Module: Kernel::System::Package::PackageUninstall Line: 1162
   Module: main::_UninstallMergedFeatureAddOns Line: 1503
   Module: scripts/DBUpdate-to-4.pl Line: 176
   
Da wir jedoch keine zusätzlichen Module installiert haben oder benötigen, war es für mich nicht von Belang und es hat ja auch nichts mit der Datenbank zu tun.

Das Update von 4.0 auf 5.0 verlief auch nicht ganz ohne Meldungen. Der DB-Check, sowie das Script DBUpdate-to-5.mysql.sql waren erfolgreich, auch wenn das Script DBUpdate-to-5.mysql.sql lediglich ein paar Sekunden benötigte und der Dump doch ca. 6GB gross ist:

Code: Select all

% perl bin/otrs.Console.pl Maint::Database::Check
Trying to connect to database 'DBI:mysql:database=otrs;host=localhost;' with user 'otrs'...
Connection successful.

Code: Select all

#su otrs
%perl scripts/DBUpdate-to-5.pl
Ich habe einmal angenommen, dass es nicht sehr viele Änderungen an der Datenbank zwischen der Version 4 und 5 gab und es deshalb sehr schnell fertig war.

Jedoch gab es einen Fehler beim ausführen des Perl-DB-Update Scripts:

Code: Select all

su otrs
perl scripts/DBUpdate-to-5.pl

Step 7 of 17: Migrate notifications to event based notifications...[Mon Feb 15 11:17:06 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-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:17:06 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 (63474): 
   Module: Kernel::System::NotificationEvent::NotificationAdd Line: 365
   Module: main::_MigrateNotifications Line: 1205
   Module: scripts/DBUpdate-to-5.pl Line: 162

error.

[Mon Feb 15 11:17:06 2016] DBUpdate-to-5.pl: Died at scripts/DBUpdate-to-5.pl line 167.
Nachdem ich das Script wieder gestartet hatte, funktionierte alles ohne Fehler. Es kam die Meldung für den vorhin fehlgeschlagenen Schritt 9: "Step 9 of 17: Add Email notification method to all event based notifications...done. "
Daher bin ich einmal davon ausgegangen, dass alles funktioniert…

Nachdem habe ich wieder einen Dump erstellt und diesen auf dem neuen System eingespielt und ich habe wieder den gleichen Fehler...

Sorry für den langen Post, aber denke, je mehr Infos ihr habt, desto mehr Chancen habe ich auf Hilfe ^^
Ich hoffe ihr könnt mir da weiterhelfen...

Gruss Miro
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Probleme nach Migration

Post by wurzel »

Hi

... na dann schaumermal ;)
Auch gab es bei Ausführung des Migrationsscript für die DB einen Fehler, aber nachdem ich das Script nochmals ausgeführt habe, trat dieser nicht mehr auf.
Das Skript sagt Dir ja "wenn 'n Fehler auftritt, nicht weitermachen"
2x laufen kann zwar gehen, aber in dem Fall - würde ich sagen - falsch.

wenn das OTRS aus dem Portstree läuft, umso beser. Ich hatte damit so meine Probleme. Das mag aber auch an meinen mangelnden FreeBSD Kenntnissen gelegen haben ;)

masanin wrote: Hier mein vorgehen und die Fehler:
OTRS 3.3.9:
Beim Ausführen des Scripts otrs.CheckDB.pl:

Code: Select all

Connected.
Your storage engine is InnoDB.
These tables use a different storage engine:

article
article_attachment
article_flag
...
Danach habe ich mit ALTER TABLE im mysql die Storage-Engine von MyISAM auf InnoDB gewechselt

Code: Select all

ALTER TABLE article ENGINE=InnoDB;
ALTER TABLE article_attachment ENGINE=InnoDB;
ALTER TABLE article_flag ENGINE=InnoDB;
...
es gibt ein schönes Script dafür :)
siehe unter anderem
http://blog.otrs.org/2013/02/20/about-o ... e-engines/

Das skript nennt sich bin/otrs.MySQLInnoDBSwitch.pl :)
masanin wrote: Danach wieder das otrs.CheckDB.pl Script nochmals ausgeführt und es zeigte nichts mehr an.
Perfekt.
Nach dem Schritt "cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs" erhielt ich ein paar "Fehler" von MySQL:

Code: Select all

#cat scripts/DBUpdate-to-3.3.mysql.sql | mysql -p -f -u root otrs
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
INFO: Foreign key constraint FK_standard_response_valid_id_id does not exist, skipping.
(...)
Im Thread viewtopic.php?t=26934 habe ich nachgelesen, dass es sich dabei im nichts Verheerendes handelt und mit dem Script DBUpdate-to-3.3.pl weitergemacht. Dies zeigte keine Fehler an, lediglich "Subroutinge Load redefindet at..." Fehler, welche man, laut dem Script, ignorieren kann
[/quote]

Ich bin kein SQL und ForeignKey Spezialist, aber ich würde den Fehler nicht ignorieren, auch wenn meine damalige Aussage 'ne Andere war. Ist denn die Migration am Ende "successful"?

Versuch mal, die DB Engine mit dem Script von OTRS umzustellen.


die foreign key Probleme lassen wir mal so stehen. Es KANN sein, dass das nicht stört.
masanin wrote: Danach habe ich normal weiter gemacht. Beim Update von 3.3 auf 4.0 mit dem Scriot DB-Update-to-4.mysql.sql (...)
Beim Perl-Script für das DB-Update gab es schon mehr Fehler

Code: Select all

#su otrs
%perl scripts/DBUpdate-to-4.pl
Step 9 of 15: Uninstall Merged Feature Add-Ons... ERROR: OTRS-DBUpdate-to-4.pl-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:09:44 2016
[/quote]

Die xxx entwickelt die AddOns weiter und baut die in das Free Framework ein. In diesem Fall werden - falls  ein 3.x Add on installiert war - das Add On entfernt. Die Fehler kannst Du ignorieren.

[quote="masanin"]
Ich habe einmal angenommen, dass es nicht sehr viele Änderungen an der Datenbank zwischen der Version 4 und 5 gab und es deshalb sehr schnell fertig war.
[/quote]

Die großen Änderungen gab es in den 3.xer versionen. Die Skripte laufen von 3.3.x auf 4 und auf 5 relativ schnell. das ist richtig.

[quote="masanin"]
Jedoch gab es einen Fehler beim ausführen des Perl-DB-Update Scripts:
[code]
su otrs
perl scripts/DBUpdate-to-5.pl

Step 7 of 17: Migrate notifications to event based notifications...[Mon Feb 15 11:17:06 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-15 Perl: 5.20.3 OS: freebsd Time: Mon Feb 15 11:17:06 2016
(...)
Das deutet auf fehlerhafte Codings hin in der DB oder ZZZAuto.pm
masanin wrote: Nachdem ich das Script wieder gestartet hatte, funktionierte alles ohne Fehler.
siehe oben:
Das Skript sagt Dir ja "wenn 'n Fehler auftritt, nicht weitermachen"
2x laufen kann zwar gehen, aber in dem Fall - würde ich sagen - falsch.
masanin wrote: Es kam die Meldung für den vorhin fehlgeschlagenen Schritt 9: "Step 9 of 17: Add Email notification method to all event based notifications...done. "
Daher bin ich einmal davon ausgegangen, dass alles funktioniert…
Also für mich lese ich zuviel "bin ich davon ausgegangen", "Script beim zweiten mal OK" an und dass da noch in der Basis eigentlich was faslch ist.

Du musst bitte von Deinem ursprünglichen Stand nochmal migrieren.

Und bitte VOLLSTÄNDIG, und Fehlerfrei.

Installiere Dir mal bitte eine 3.2.x fehlerfrei auf einem Neuen System.
Danach dumpst Du die 3.1.x DB und restorst Die auf dem 3.2.x und nimmst Deine Config auch mit rüber.
Dann migrieren. Und zwar ohne Fehler! Das heisst ggf. den Datenbank Dump bereinigen, er muss UTF 8 sein, falsche ISO Werte entfernen falls vorhanden. Das InnoDB Switch Skript laufen lassen,

Dann auf Fehlerfreiheit im Frontend testen. Wenn da ALLE läuft, weiter machen mit 3.3.x

Ansonsten helfen Dir diverse Dienstleister gerne. Ich hatte die Tage mal 'ne vollständige Liste gelesen hier im Forum finde sie aber grad nicht :( Der Hersteller ist otrs.com das wäre die erste Anlaufstelle.

Flo
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Locked