Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Moderator: crythias

Post Reply
pccleaningwipes
OTRS newbie
Posts: 9
Joined: 21 Mar 2018, 18:48
OTRS Version?: 5.0.23

Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Post by pccleaningwipes » 21 Mar 2018, 19:22

Hey guys,

I'm currently trying to upgrade from 5.0.23 to 6.0.6.
OS: CentOS 7

When running

Code: Select all

yum -y install otrs-6.0.6-01.noarch.rpm
I get the following Error:

Code: Select all

Warning: /opt/otrs/Kernel/Config.pm erstellt als /opt/otrs/Kernel/Config.pm.rpmnew
[Wed Mar 21 18:16:06 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2026.
[Wed Mar 21 18:16:09 2018] otrs.Console.pl: DBD::mysql::st execute failed: Table 'otrs.sysconfig_deployment_lock' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 694.
ERROR: OTRS-otrs.Console.pl-Maint::Config::Rebuild-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 18:16:09 2018

 Message: Table 'otrs.sysconfig_deployment_lock' doesn't exist, SQL: '
            SELECT id, exclusive_lock_guid, exclusive_lock_user_id, exclusive_lock_expiry_time
            FROM sysconfig_deployment_lock
            ORDER BY exclusive_lock_expiry_time DESC LIMIT 1'

 Traceback (4218):
   Module: Kernel::System::SysConfig::DB::_DeploymentLockGet Line: 5183
   Module: Kernel::System::SysConfig::DB::DeploymentIsLocked Line: 4905
   Module: Kernel::System::SysConfig::DB::DefaultSettingLock Line: 1591
   Module: Kernel::System::SysConfig::ConfigurationXML2DB Line: 2581
   Module: Kernel::System::Console::Command::Maint::Config::Rebuild::Run Line: 51
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 38

[Wed Mar 21 18:16:09 2018] otrs.Console.pl: DBD::mysql::db do failed: Table 'otrs.sysconfig_default' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Maint::Config::Rebuild-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 18:16:09 2018

 Message: Table 'otrs.sysconfig_default' doesn't exist, SQL: '
        UPDATE sysconfig_default
        SET
            exclusive_lock_guid = ?,
            exclusive_lock_user_id = ?,
            exclusive_lock_expiry_time = ?
        '

 Traceback (4218):
   Module: Kernel::System::SysConfig::DB::DefaultSettingLock Line: 1676
   Module: Kernel::System::SysConfig::ConfigurationXML2DB Line: 2581
   Module: Kernel::System::Console::Command::Maint::Config::Rebuild::Run Line: 51
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 38

ERROR: OTRS-otrs.Console.pl-Maint::Config::Rebuild-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 18:16:09 2018

 Message: System was unable to lock Default Settings

 Traceback (4218):
   Module: Kernel::System::SysConfig::ConfigurationXML2DB Line: 2586
   Module: Kernel::System::Console::Command::Maint::Config::Rebuild::Run Line: 51
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 38

Error: There was a problem writing XML to DB.
Rebuilding the system configuration...
[Wed Mar 21 18:16:10 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2026.
Deleting cache...
Done.

Next steps:
...
It still finishes though. But if I now run the migration script

Code: Select all

/opt/otrs/scripts/DBUpdate-to-6.pl
I get:

Code: Select all

Executing tasks ...

    Step 1 of 39: Check framework version ...
    Step 2 of 39: Check required Perl version ...
    Step 3 of 39: Check required database version ...
    Step 4 of 39: Check database charset ...
    Step 5 of 39: Check required Perl modules ...
    Step 6 of 39: Check if database has been backed up ...
    Step 7 of 39: Upgrade database structure ...
[Wed Mar 21 17:31:56 2018] DBUpdate-to-6.pl: DBD::mysql::db do failed: Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_time' at row 1 at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 17:31:56 2018

 Message: Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_time' at row 1, SQL: 'ALTER TABLE customer_user CHANGE pw pw VARCHAR (128) NULL'

 Traceback (4264):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 363
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 311
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::PasswordColumnChanges::Run Line: 39
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 134
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: /opt/otrs/scripts/DBUpdate-to-6.pl Line: 89


ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 17:31:56 2018

 Message: Error during execution of 'ALTER TABLE customer_user CHANGE pw pw VARCHAR (128) NULL'!

 Traceback (4264):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 366
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 311
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::PasswordColumnChanges::Run Line: 39
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 134
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: /opt/otrs/scripts/DBUpdate-to-6.pl Line: 89


 Not possible to complete migration, check previous messages for more information.
I also tried first upgrading to 5.0.27 which completes with only this warning:

Code: Select all

Warning: /opt/otrs/Kernel/Config.pm erstellt als /opt/otrs/Kernel/Config.pm.rpmnew
[Wed Mar 21 17:20:54 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2012.
Rebuilding the system configuration...
Done.
[Wed Mar 21 17:21:04 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2012.
Deleting cache...
Done.

Next steps:
...
Then upgrading to 6 brings up the same error.

Looking forward to your comments

skullz
OTRS wizard
Posts: 182
Joined: 24 Feb 2012, 03:58
OTRS Version?: OTRS 6

Re: Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Post by skullz » 22 Mar 2018, 08:17

pccleaningwipes wrote:Hey guys,

I'm currently trying to upgrade from 5.0.23 to 6.0.6.
OS: CentOS 7

When running

Code: Select all

yum -y install otrs-6.0.6-01.noarch.rpm
I get the following Error:

Code: Select all

Warning: /opt/otrs/Kernel/Config.pm erstellt als /opt/otrs/Kernel/Config.pm.rpmnew
[Wed Mar 21 18:16:06 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2026.
[Wed Mar 21 18:16:09 2018] otrs.Console.pl: DBD::mysql::st execute failed: Table 'otrs.sysconfig_deployment_lock' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 694.
ERROR: OTRS-otrs.Console.pl-Maint::Config::Rebuild-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 18:16:09 2018

 Message: Table 'otrs.sysconfig_deployment_lock' doesn't exist, SQL: '
            SELECT id, exclusive_lock_guid, exclusive_lock_user_id, exclusive_lock_expiry_time
            FROM sysconfig_deployment_lock
            ORDER BY exclusive_lock_expiry_time DESC LIMIT 1'

 Traceback (4218):
   Module: Kernel::System::SysConfig::DB::_DeploymentLockGet Line: 5183
   Module: Kernel::System::SysConfig::DB::DeploymentIsLocked Line: 4905
   Module: Kernel::System::SysConfig::DB::DefaultSettingLock Line: 1591
   Module: Kernel::System::SysConfig::ConfigurationXML2DB Line: 2581
   Module: Kernel::System::Console::Command::Maint::Config::Rebuild::Run Line: 51
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 38

[Wed Mar 21 18:16:09 2018] otrs.Console.pl: DBD::mysql::db do failed: Table 'otrs.sysconfig_default' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Maint::Config::Rebuild-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 18:16:09 2018

 Message: Table 'otrs.sysconfig_default' doesn't exist, SQL: '
        UPDATE sysconfig_default
        SET
            exclusive_lock_guid = ?,
            exclusive_lock_user_id = ?,
            exclusive_lock_expiry_time = ?
        '

 Traceback (4218):
   Module: Kernel::System::SysConfig::DB::DefaultSettingLock Line: 1676
   Module: Kernel::System::SysConfig::ConfigurationXML2DB Line: 2581
   Module: Kernel::System::Console::Command::Maint::Config::Rebuild::Run Line: 51
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 38

ERROR: OTRS-otrs.Console.pl-Maint::Config::Rebuild-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 18:16:09 2018

 Message: System was unable to lock Default Settings

 Traceback (4218):
   Module: Kernel::System::SysConfig::ConfigurationXML2DB Line: 2586
   Module: Kernel::System::Console::Command::Maint::Config::Rebuild::Run Line: 51
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs/bin/otrs.Console.pl Line: 38

Error: There was a problem writing XML to DB.
Rebuilding the system configuration...
[Wed Mar 21 18:16:10 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2026.
Deleting cache...
Done.

Next steps:
...
It still finishes though. But if I now run the migration script

Code: Select all

/opt/otrs/scripts/DBUpdate-to-6.pl
I get:

Code: Select all

Executing tasks ...

    Step 1 of 39: Check framework version ...
    Step 2 of 39: Check required Perl version ...
    Step 3 of 39: Check required database version ...
    Step 4 of 39: Check database charset ...
    Step 5 of 39: Check required Perl modules ...
    Step 6 of 39: Check if database has been backed up ...
    Step 7 of 39: Upgrade database structure ...
[Wed Mar 21 17:31:56 2018] DBUpdate-to-6.pl: DBD::mysql::db do failed: Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_time' at row 1 at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 17:31:56 2018

 Message: Incorrect datetime value: '0000-00-00 00:00:00' for column 'create_time' at row 1, SQL: 'ALTER TABLE customer_user CHANGE pw pw VARCHAR (128) NULL'

 Traceback (4264):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 363
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 311
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::PasswordColumnChanges::Run Line: 39
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 134
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: /opt/otrs/scripts/DBUpdate-to-6.pl Line: 89


ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Wed Mar 21 17:31:56 2018

 Message: Error during execution of 'ALTER TABLE customer_user CHANGE pw pw VARCHAR (128) NULL'!

 Traceback (4264):
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 366
   Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 311
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::PasswordColumnChanges::Run Line: 39
   Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 134
   Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
   Module: scripts::DBUpdateTo6::Run Line: 69
   Module: /opt/otrs/scripts/DBUpdate-to-6.pl Line: 89


 Not possible to complete migration, check previous messages for more information.
I also tried first upgrading to 5.0.27 which completes with only this warning:

Code: Select all

Warning: /opt/otrs/Kernel/Config.pm erstellt als /opt/otrs/Kernel/Config.pm.rpmnew
[Wed Mar 21 17:20:54 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2012.
Rebuilding the system configuration...
Done.
[Wed Mar 21 17:21:04 2018] otrs.Console.pl: Malformed UTF-8 character (unexpected end of string) in substitution (s///) at /opt/otrs/Kernel/Config/Defaults.pm line 2012.
Deleting cache...
Done.

Next steps:
...
Then upgrading to 6 brings up the same error.

Looking forward to your comments
As per http://doc.otrs.com/doc/manual/admin/6. ... ating.html

Code: Select all

rpm -Uvh otrs-x.x.x.-01.rpm

pccleaningwipes
OTRS newbie
Posts: 9
Joined: 21 Mar 2018, 18:48
OTRS Version?: 5.0.23

Re: Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Post by pccleaningwipes » 22 Mar 2018, 15:55

Hi skullz,
thanks for replying.

I already tried it with the rpm command and the errors are the exact same (during the installation and the migration script).

I wonder now if it's even ok that these errors during the installation occur since it still finishes and tells me that the installation was complete. But if I update from 5.0.23 to 5.0.27 it finishes with only two warnings.

Also I did the tarball variant and running the migration script thereafter still brings up the same error.

So my guess is that I'm entering wrong/imcompatible time zones during the migration script (see Note @ Step 4) since it's complaining about wrong time values. From the Note I think I have to enter my own time zone (Europe/Berlin) because I'm not doing a new install and also the script tells me

Code: Select all

 
 Requirement check for: Migrating time zone configuration ...


        The currently configured time offset is 1 hours, these are the suggestions for a corresponding OTRS time zone:

        Africa/Algiers
        Africa/Bangui
        Africa/Brazzaville
        Africa/Ceuta
        Africa/Douala
        Africa/Kinshasa
        Africa/Lagos
        Africa/Libreville
        Africa/Luanda
        Africa/Malabo
        Africa/Ndjamena
        Africa/Niamey
        Africa/Porto-Novo
        Africa/Tunis
        CET
        Europe/Amsterdam
        Europe/Andorra
        Europe/Belgrade
        Europe/Berlin
        Europe/Brussels
        Europe/Budapest
        Europe/Copenhagen
        Europe/Gibraltar
        Europe/Luxembourg
        Europe/Madrid
        Europe/Malta
        Europe/Monaco
        Europe/Oslo
        Europe/Paris
        Europe/Prague
        Europe/Rome
        Europe/Stockholm
        Europe/Tirane
        Europe/Vienna
        Europe/Warsaw
        Europe/Zurich
        MET


        It seems that Europe/Berlin should be the correct time zone to set for your OTRS.

        Enter the time zone to use for OTRSTimeZone (leave empty to show a list of all available time zones): Europe/Berlin

        Enter the time zone to use for UserDefaultTimeZone (leave empty to show a list of all available time zones): Europe/Berlin

    Requirement check for: Update calendar appointment future tasks ...
There I also tried both entering "Europe/Berlin" and "UTC", both failed with the same error about the datetime value.

I'm really running out of ideas and every advice is appreciated.

303536
OTRS newbie
Posts: 44
Joined: 14 Feb 2018, 12:18
OTRS Version?: version 6
Real Name: Maria Ramos
Company: Opgk Software
Contact:

Re: Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Post by 303536 » 23 Mar 2018, 14:49

Hi there!

It seems that there is a problem with System Configuration. You might have something incorrectly set in Sysconfig and now it can't be transferred to OTRS6. What I would recommend is for you to try a testing migration without your ZZZAuto changes (ZZZAuto stores what you changed from default value in SysConfig).

Take your configuration file /opt/otrs/Kernel/Config/Files/ZZZAuto.pm

backup it and delete it or change its name then run rebuild config command:

su -c "/opt/otrs/bin/otrs.Console.pl Maint::Config::Rebuild" -s /bin/bash otrs

This way create you another 'clean' ZZZAuto.pm

It should have a very small size and there shouldn’t be a lot of data the inside should like like this:

# OTRS config file (automatically generated)

# VERSION:1.1

package Kernel::Config::Files::ZZZAuto;

use strict;

use warnings;

no warnings 'redefine';

use utf8;

sub Load {

my ($File, $Self) = @_;

$Self->{'SecureMode'} = '1';

}

1;

Then when you have a 'clean' SysConfig try to migrate.

If this helps then you have option either you go back to original OTRS5 review your SysConfig changes and look for the faulty one, fix it and then migrate again, or you stay with OTRS6 and make the configuration again.
Add-Ons for OTRS team

We account with premium and free add-ons on our website.

Do not forget to visit us and follow us in our social media to be updated with our services.

https://otrsaddons.com/
https://www.linkedin.com/company/addons-for-otrs/
https://www.facebook.com/AddonsForOTRS/

pccleaningwipes
OTRS newbie
Posts: 9
Joined: 21 Mar 2018, 18:48
OTRS Version?: 5.0.23

Re: Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Post by pccleaningwipes » 26 Mar 2018, 17:16

Hey,

thanks for that plausible hint.
Unfortunately it didn't solve the errors.

But you referred to the error occuring during the installation, didn't you?
So do you think that is the real problem and fixing that will lead to the migration script completing?
Or can this maybe be ignored (which I think i read in some post) and maybe there is a defect in the database?

pccleaningwipes
OTRS newbie
Posts: 9
Joined: 21 Mar 2018, 18:48
OTRS Version?: 5.0.23

Re: Upgrade from 5.0.23/5.0.27 to 6: migration script fails

Post by pccleaningwipes » 29 Mar 2018, 17:44

Ok, so I don't really think anyone else will have this issue. But it was actually just what it said :D.

I went into the DB and looked at the table and there were time values = '0000-00-00 00:00:00' which are invalid according to mySQL docs. So i changed them to '1000-01-01 00:00:00' and it worked.

Post Reply