OTRS 4.0.6 to 5

Moderator: crythias

Locked
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

OTRS 4.0.6 to 5

Post by spiderpig »

Hi guys,

I'm upgradeing from 4.0.6 to 5 in my test enviroment, when I try to migrate the DB it stops on step 5 "Lost connection to Mysql server"
I already did:
shell> cat scripts/DBUpdate-to-5.mysql.sql | mysql -p -f -u root otrs
shell> bin/otrs.Console.pl Maint::Database::Check
and it says it's connected to database. Any ideas?

----

# su -c "scripts/DBUpdate-to-5.pl" -s /bin/bash otrs

Migration started...

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

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

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

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

Step 5 of 17: Migrate charset to UTF-8 on notification_event table...[Mon Nov 23 17:59:38 2015] DBUpdate-to-5.pl: DBD::mysql::db do failed: Lost connection to MySQL server during query at /opt/otrs/Kernel/System/DB.pm line 449.
ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.16.3 OS: linux Time: Mon Nov 23 17:59:38 2015

Message: Lost connection to MySQL server during query, SQL: 'ALTER TABLE notification_event DROP charset'

Traceback (28599):
Module: main::_MigrateCharsetAndDeleteCharsetColumnsNotificationEvent Line: 677
Module: scripts/DBUpdate-to-5.pl Line: 162

ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.16.3 OS: linux Time: Mon Nov 23 17:59:38 2015

Message: Error during execution of 'ALTER TABLE notification_event DROP charset'!

Traceback (28599):
Module: main::_MigrateCharsetAndDeleteCharsetColumnsNotificationEvent Line: 679
Module: scripts/DBUpdate-to-5.pl Line: 162

error.

[Mon Nov 23 17:59:38 2015] DBUpdate-to-5.pl: Died at scripts/DBUpdate-to-5.pl line 167.

-----
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: OTRS 4.0.6 to 5

Post by spiderpig »

I tried to run it again, now it stops on Step 7

----


Step 7 of 17: Migrate notifications to event based notifications...[Mon Nov 23 18:53:13 2015] DBUpdate-to-5.pl: DBD::mysql::st execute failed: Table 'otrs.notification_event' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 666.
ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.16.3 OS: linux Time: Mon Nov 23 18:53:13 2015

Message: Table 'otrs.notification_event' doesn't exist, SQL: 'SELECT id, name FROM notification_event'

Traceback (28663):
Module: Kernel::System::NotificationEvent::NotificationList Line: 71
Module: main::_MigrateNotifications Line: 859
Module: scripts/DBUpdate-to-5.pl Line: 162

[Mon Nov 23 18:53:13 2015] DBUpdate-to-5.pl: DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/otrs/Kernel/System/DB.pm line 734.
[Mon Nov 23 18:53:13 2015] DBUpdate-to-5.pl: DBD::mysql::st execute failed: Table 'otrs.notification_event' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 666.
ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.16.3 OS: linux Time: Mon Nov 23 18:53:13 2015

Message: Table 'otrs.notification_event' doesn't exist, SQL: '
SELECT id, name, valid_id, comments, create_time, create_by, change_time, change_by
FROM notification_event
WHERE name = ?'

Traceback (28663):
Module: Kernel::System::NotificationEvent::NotificationGet Line: 158
Module: Kernel::System::NotificationEvent::NotificationAdd Line: 267
Module: main::_MigrateNotifications Line: 1109
Module: scripts/DBUpdate-to-5.pl Line: 162

[Mon Nov 23 18:53:13 2015] DBUpdate-to-5.pl: DBD::mysql::st fetchrow_array failed: fetch() without execute() at /opt/otrs/Kernel/System/DB.pm line 734.
[Mon Nov 23 18:53:13 2015] DBUpdate-to-5.pl: DBD::mysql::db do failed: Table 'otrs.notification_event' doesn't exist at /opt/otrs/Kernel/System/DB.pm line 449.
ERROR: OTRS-DBUpdate-to-5.pl-10 Perl: 5.16.3 OS: linux Time: Mon Nov 23 18:53:13 2015

Message: Table 'otrs.notification_event' doesn't exist, SQL: '
INSERT INTO notification_event
(name, valid_id, comments, create_time, create_by, change_time, change_by)
VALUES (?, ?, ?,
'2015-11-23 18:53:13'
, ?,
'2015-11-23 18:53:13'
, ?)'

Traceback (28663):
Module: Kernel::System::NotificationEvent::NotificationAdd Line: 310
Module: main::_MigrateNotifications Line: 1109
Module: scripts/DBUpdate-to-5.pl Line: 162

error.
wurzel
Znuny guru
Posts: 3274
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: OTRS 4.0.6 to 5

Post by wurzel »

Hi,

I had similar things in beta phase. I think I migrated wrong sometimes. The database was lost in all cases (did several tests, but could not find my error)

you should restore your database, try the latest dbUpdate script and try again.


this indicates
Message: Lost connection to MySQL server during query, SQL: 'ALTER TABLE notification_event DROP charset'
Message: Error during execution of 'ALTER TABLE notification_event DROP charset'!

an error.

MySQL Lost during upgrade is bad. Mybe wrong my.cnf settings? (I am not an mysql specialist)

Which version are you using?
Florian
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.
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: OTRS 4.0.6 to 5

Post by spiderpig »

Hi wurzel,

I am running mysql version 5.5.40-MariaDB
wurzel
Znuny guru
Posts: 3274
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: OTRS 4.0.6 to 5

Post by wurzel »

Hi,

;)

Sorry, my fault. You are migrating to latest 5.0.3 version?

Is your Support Asessment of OTRS4 showing all green?

Was/is it a productive system, running for a long time? Is it a young/fresh installation?

Cheers
Florian
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.
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: OTRS 4.0.6 to 5

Post by spiderpig »

:)

yes I'm migrating to 5.0.3, and the system was last updated to 4.0.6 from 4.0.1, that was about five months ago.


everything green except this one is orange

Ticket Search Index Module (Kernel::System::Ticket::ArticleSearchIndex::RuntimeDB)
You have more than 50,000 articles and should use the StaticDB backend. See admin manual (Performance Tuning) for more information.
wurzel
Znuny guru
Posts: 3274
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: OTRS 4.0.6 to 5

Post by wurzel »

Hi,

thanks for the info. You did everything, I would do.
I am not able to help here. Sorry. :(

Florian
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.
spiderpig
Znuny expert
Posts: 198
Joined: 15 Dec 2011, 02:26
Znuny Version: OTRS 5

Re: OTRS 4.0.6 to 5

Post by spiderpig »

I cloned my live OTRS environment and ran upgrade on that server, and it worked :)
I'm not sure what the issue was on the old "test" server, maybe one of my tests before was conflicting the upgrade.

thank you for the help.
Locked