Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Moderator: crythias

Post Reply
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

I am trying to upgrade OTRS 5.0.28 to 6.0.10 from source using this guide https://www.ictforce.be/2017/otrs-upgrade-5-to-6/ and after su -c "/opt/otrs/scripts/DBUpdate-to-6.pl" -s /bin/bash otrs get this error:

Step 16 of 42: Migrating time zone configuration ...
[Mon Aug 20 11:21:56 2018] DBUpdate-to-6.pl: Use of uninitialized value $DefaultSetting{"Name"} in concatenation (.) or string at /opt/otrs/Kernel/System/SysConfig/DB.pm line 1690.
ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-10 Perl: 5.16.3 OS: linux Time: Mon Aug 20 11:21:56 2018

Message: Setting OTRSTimeZone does not exists!

Traceback (26805):
Module: Kernel::System::SysConfig::SettingUpdate Line: 454
Module: scripts::DBUpdateTo6::Base::SettingUpdate Line: 633
Module: scripts::DBUpdateTo6::MigrateTimeZoneConfiguration::Run Line: 158
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
Module: scripts::DBUpdateTo6::Run Line: 69
Module: /opt/otrs/scripts/DBUpdate-to-6.pl Line: 89


I have tried to add config.pm value $Self->{OTRSTimeZone } = 'Europe/Berlin'; but this didn't help.
How to fix this error?
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by jojo »

please follow the offical documentation you can find on https://doc.otrs.org
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

Yes, i did. https://doc.otrs.com/doc/manual/admin/6 ... ating.html
The same error after scripts/DBUpdate-to-6.pl
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by jojo »

did you use the official provided package? If you used the debian one, please contact the maintainer.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

I have used this:

OTRS 6 Patch Level 10 tar.gz
MD5 Sum:
49bc095c07df38c61dab502ddedb8d4d

https://community.otrs.com/thank-you-fo ... .10.tar.gz
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

In fact, after executing the script, i get such error:

Migration started ...

Checking requirements ...

Requirement check for: Check framework version ...
Requirement check for: Check required Perl version ...
Requirement check for: Check required database version ...
Requirement check for: Check database charset ...
Requirement check for: Check required Perl modules ...
Requirement check for: Check if database has been backed up ...

Did you backup the database? [Y]es/[N]o: y

Requirement check for: Upgrade database structure ...
Error: The following sequences with possible wrong names have been found. Please rename them manually.
pop3_account_id_seq
standard_response_attachment_id_seq
standard_response_id_seq
system_user_id_seq

Requirement check for: Migrating time zone configuration ...


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


But script continues to work and ends (halt) with TimeZone error. How to fix this first error? "Error: The following sequences with possible wrong names have been found. Please rename them manually." I rename pop3_account_id_seq to AAA_pop3_account_id_seq and then i get the same error about AAA_pop3_account_id_seq. So, how i must rename them?
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by wurzel »

Hi,

is it a Oracle Database?

Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- 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.
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

No, it's Postgresql. I have found similar some 3-4 posts, till now, without any solution.
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

Anny suggestion about Message: Setting OTRSTimeZone does not exists!?

Is there some way to set this setting manually and then run upgrade script?
eicki
Znuny newbie
Posts: 16
Joined: 01 Dec 2010, 12:55
Znuny Version: 5.0.29

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by eicki »

Hi,
is there any workaround or solution for

Message: Setting OTRSTimeZone does not exists! ?

If have run the update from otrs 5.0.29 to 6.0.10 with the tar-ball.

Any ideas?

Regards,
Jens
LXsysadmin
Znuny newbie
Posts: 21
Joined: 28 Jun 2018, 12:23
Znuny Version: 5.0.22
Real Name: Martins

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by LXsysadmin »

I am doing right now new one test, but looks that if i don't do XML migration (su -c "/opt/otrs/bin/otrs.Console.pl Dev::Tools::Migrate::ConfigXMLStructure --source-directory Kernel/Config/Files" -s /bin/bash otrs) then i don't get this error about "Setting OTRSTimeZone does not exists!".
As i don't have any specific XML configuration files or changes in OTRS 5 (just default), looks like this XML migration can be skipped.

The question is, is it safe to do migration without XML migration from OTRS 5 version?
tinokorth
Znuny newbie
Posts: 2
Joined: 23 Dec 2016, 21:16
Znuny Version: 6.0.30
Real Name: Tino Korth
Company: DrehPunkt GmbH
Location: Rostock
Contact:

Re: Upgrade from 5.0.28 to 6.0.10, OTRSTimeZone error

Post by tinokorth »

Hello,

we had also this problem and did not found a solution.

So I looked into the source code of the upgrade script.

In step 17 the migration script uses the external script scripts/DBUpdateTo6/MigrateTimeZoneConfiguration.pm.
In the first lines of this script we can see that the migration of the time zones will be skipped if there's a configuration found of OTRSTimeZone and UserDefaultTimeZone.

Code: Select all

    # Check if configuration was already made.
    my $OTRSTimeZone        = $ConfigObject->Get('OTRSTimeZone')        // '';
    my $UserDefaultTimeZone = $ConfigObject->Get('UserDefaultTimeZone') // '';
    if ( $OTRSTimeZone && $UserDefaultTimeZone ) {
        return 1;
    }
So we can skip this step of the migration by adding the configuration manually into the config section of the Config.pm

Code: Select all

$Self->{OTRSTimeZone} = 'Europe/Berlin';
$Self->{UserDefaultTimeZone} = 'Europe/Berlin';
After we've done this step we were able to continue with the migration script.

I hope this hint will help. 😎

BR,
Tino
DrehPunkt GmbH
https://drehpunkt.de
Post Reply