Upgrade 5.0.30 to 06.11.01

Moderator: crythias

Post Reply
christian1706
Znuny newbie
Posts: 2
Joined: 27 Sep 2018, 13:01
Znuny Version: 5.0.30

Upgrade 5.0.30 to 06.11.01

Post by christian1706 »

Hello community.

I run a OTRS platform on version 5.0.30 and would like to upgrade to 06.11.01 on a VMWare @ Open Suse Leap 42.3.

I follow the instructions in this manual
https://doc.otrs.com/doc/manual/admin/6 ... ating.html

but unfortunately the migrating script fails with those error messages:
please see screenshot fehler.jpg.

I got no Idea, where I can configure the mentioned "subject" value.

If you got any hints to solve this issue, I would be very grateful....

Regs Christian
You do not have the required permissions to view the files attached to this post.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Upgrade 5.0.30 to 06.11.01

Post by jojo »

Please paste the error text in TEXT not in Pictures
"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
christian1706
Znuny newbie
Posts: 2
Joined: 27 Sep 2018, 13:01
Znuny Version: 5.0.30

Re: Upgrade 5.0.30 to 06.11.01

Post by christian1706 »

Hello,

here the error in Text Form:
In advance I choose TimeZone Europe/Berlin as timezone and then receive those errors:


Executing tasks ...

Step 1 of 42: Check framework version ...
Step 2 of 42: Check required Perl version ...
Step 3 of 42: Check required database version ...
Step 4 of 42: Check database charset ...
Step 5 of 42: Check required Perl modules ...
Step 6 of 42: Check if database has been backed up ...
Step 7 of 42: Upgrade database structure ...
[Thu Sep 27 14:34:41 2018] DBUpdate-to-6.pl: DBD::mysql::db do failed: Field 'subject' doesn't have a default value at /opt/otrs/Kernel/System/DB.pm line 470.
ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-56 Perl: 5.18.2 OS: linux Time: Thu Sep 27 14:34:41 2018

Message: Field 'subject' doesn't have a default value, SQL: 'INSERT INTO notification_event (name, valid_id, comments, create_by, create_time, change_by, change_time)
VALUES
('Ticket email delivery failure notification', 1, '', 1, '2018-09-27 12:34:41', 1, '2018-09-27 12:34:41')'

Traceback (32212):
Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 363
Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 311
Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::UpdateNotificationTables::Run Line: 67
Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 138
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
Module: scripts::DBUpdateTo6::Run Line: 69
Module: ./DBUpdate-to-6.pl Line: 87


ERROR: OTRS-otrs.Console.pl-Maint::Database::Check-56 Perl: 5.18.2 OS: linux Time: Thu Sep 27 14:34:41 2018

Message: Error during execution of 'INSERT INTO notification_event (name, valid_id, comments, create_by, create_time, change_by, change_time)
VALUES
('Ticket email delivery failure notification', 1, '', 1, '2018-09-27 12:34:41', 1, '2018-09-27 12:34:41')'!

Traceback (32212):
Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBString Line: 366
Module: scripts::DBUpdateTo6::Base::ExecuteXMLDBArray Line: 311
Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::UpdateNotificationTables::Run Line: 67
Module: scripts::DBUpdateTo6::UpgradeDatabaseStructure::Run Line: 138
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
Module: scripts::DBUpdateTo6::Run Line: 69
Module: ./DBUpdate-to-6.pl Line: 87




Not possible to complete migration, check previous messages for more information.
christianclavet
Znuny newbie
Posts: 75
Joined: 27 Aug 2018, 13:50
Znuny Version: Community
Real Name: Christian Clavet
Company: Tact Group

Re: Upgrade 5.0.30 to 06.11.01

Post by christianclavet »

Hi!
Not sure I can help... :(

But I've seen that record from your output:
'Ticket email delivery failure notification', 1, '', 1, '2018-09-27 12:34:41', 1, '2018-09-27 12:34:41')'
There is notification event is causing problem in your DB as the subject have something that the migration script does'nt like.
I don't know why the script block on those events...

Perhaps using the console in maint:: and try to clear the email notifications.
You could try this command if it clear the event log for the communications and help to fix the problem..
otrs.Console.pl Maint::Log::CommunicationLog --purge
There is also this one you could use if the first doesn't help (will even clear active communication being logged)
otrs.Console.pl Maint::Log::CommunicationLog --force--delete
----------------------------------------------
OTRS Community 6.0.11
Debian 9.0

MariaDB
spark123
Znuny newbie
Posts: 29
Joined: 10 May 2021, 12:25
Znuny Version: 6.034
Real Name: Andreas

Re: Upgrade 5.0.30 to 06.11.01

Post by spark123 »

I faced the same problem. (maybe someone finds it helpful although answer comes late)
The purge commands above doesn't fixed the problem at all so I've added default values to the table.

Code: Select all

alter table otrs.notification_event alter subject SET DEFAULT '';
alter table otrs.notification_event alter text SET DEFAULT '';
alter table otrs.notification_event alter content_type SET DEFAULT '';
alter table otrs.notification_event alter charset SET DEFAULT '';
The upgrade progress is actually running through now.
Last edited by spark123 on 10 May 2021, 14:28, edited 1 time in total.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Upgrade 5.0.30 to 06.11.01

Post by root »

Hi,

If there an issue with the default values of a table you might also try

Code: Select all

bin/otrs.Console.pl Maint::Database::Check --repair
- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
spark123
Znuny newbie
Posts: 29
Joined: 10 May 2021, 12:25
Znuny Version: 6.034
Real Name: Andreas

Re: Upgrade 5.0.30 to 06.11.01

Post by spark123 »

root wrote: 10 May 2021, 13:49 Hi,

If there an issue with the default values of a table you might also try

Code: Select all

bin/otrs.Console.pl Maint::Database::Check --repair
- Roy
Sure, good point.
In my case the columns were from an old otrs version. In znuny they aren't exist anymore so I think you can't repair them with this script.
Thats why I had to add default values by hand.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Upgrade 5.0.30 to 06.11.01

Post by root »

spark123 wrote: 12 May 2021, 13:22 In my case the columns were from an old otrs version. In znuny they aren't exist anymore so I think you can't repair them with this script.
Thats why I had to add default values by hand.
Hi,

This literally means you screwed an previous migration.
This is the table in version 6:

Code: Select all

mysql> desc notification_event;
+-------------+--------------+------+-----+---------+----------------+
| Field       | Type         | Null | Key | Default | Extra          |
+-------------+--------------+------+-----+---------+----------------+
| id          | int(11)      | NO   | PRI | NULL    | auto_increment |
| name        | varchar(200) | NO   | UNI | NULL    |                |
| valid_id    | smallint(6)  | NO   | MUL | NULL    |                |
| comments    | varchar(250) | YES  |     | NULL    |                |
| create_time | datetime     | NO   |     | NULL    |                |
| create_by   | int(11)      | NO   | MUL | NULL    |                |
| change_time | datetime     | NO   |     | NULL    |                |
| change_by   | int(11)      | NO   | MUL | NULL    |                |
+-------------+--------------+------+-----+---------+----------------+
These columns where remove when migrating from version 4 to 5. See https://github.com/znuny/Znuny/blob/rel ... -5.pl#L704 and https://github.com/znuny/Znuny/blob/rel ... -5.pl#L792

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
Post Reply