Updating from 5.x.x to 6.x.x orphaned entries error

Moderator: crythias

Post Reply
alemazz
Znuny newbie
Posts: 7
Joined: 17 Jul 2019, 17:51
Znuny Version: 5.x.x, 6.0.20
Real Name: Alessandro

Updating from 5.x.x to 6.x.x orphaned entries error

Post by alemazz »

Hi,
im migrating from otrs 5 to 6, running the DBUpdate-to-6.pl script i got this error:

Code: Select all

Requirement check for: Migrating time zone configuration ...
Requirement check for: Update calendar appointment future tasks ...
Requirement check for: Migrate GenericAgent jobs configuration ...
Requirement check for: Migrate TicketAppointment rules configuration ...
Requirement check for: Create entries in new article table ...
        
Found 17 orphaned entries in article_attachment table ...
Do you want to automatically delete the entries from the database now?
Is it safe to automatically delete these entries or not?
I checked my db with mysqlcheck and everything seems to be ok, so i actually don't know what to do

can someone help me or maybe advice me something to do?

thanks
alemazz
Znuny newbie
Posts: 7
Joined: 17 Jul 2019, 17:51
Znuny Version: 5.x.x, 6.0.20
Real Name: Alessandro

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by alemazz »

Skipping that part now im stucked here and i actually don't know how to fix this problem.

Code: Select all

Step 10 of 44: Refresh configuration cache after migration of OTRS 5 settings ...
Step 11 of 44: Migrating ticket storage configuration ...
[Mon Jul 22 15:11:14 2019] DBUpdate-to-6.pl: Use of uninitialized value $DefaultSetting{"Name"} in concatenation (.) or string at /opt/otrs/Kernel/System/SysConfig/DB.pm line 1700.
ERROR: OTRS-otrs.Console.pl-Dev::Code::CPANAudit-10 Perl: 5.16.3 OS: linux Time: Mon Jul 22 13:11:14 2019

Message: Setting Ticket::Article::Backend::MIMEBase::ArticleStorage does not exists!

Traceback (2839):
Module: Kernel::System::SysConfig::SettingUpdate Line: 454
Module: scripts::DBUpdateTo6::Base::SettingUpdate Line: 664
Module: scripts::DBUpdateTo6::MigrateTicketStorageModule::Run Line: 51
Module: scripts::DBUpdateTo6::_ExecuteComponent Line: 157
Module: scripts::DBUpdateTo6::Run Line: 69
Module: scripts/DBUpdate-to-6.pl Line: 87


Error:Unable to migrate Ticket::StorageModule.


Not possible to complete migration, check previous messages for more information.
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by root »

alemazz wrote: 22 Jul 2019, 11:52
Is it safe to automatically delete these entries or not?
Orphaned entries are useless, they are not referenced anywhere. I would delete them unless you have changed the database or need the entries in a view or sth. similar.

- 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 ?
fcasal
Znuny wizard
Posts: 336
Joined: 21 Apr 2014, 16:14
Znuny Version: 6.0.18

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by fcasal »

What do you have set here in ArticleStorage?

Message: Setting Ticket::Article::Backend::MIMEBase::ArticleStorage does not exists!
alemazz
Znuny newbie
Posts: 7
Joined: 17 Jul 2019, 17:51
Znuny Version: 5.x.x, 6.0.20
Real Name: Alessandro

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by alemazz »

fcasal wrote: 22 Jul 2019, 22:28 What do you have set here in ArticleStorage?

Message: Setting Ticket::Article::Backend::MIMEBase::ArticleStorage does not exists!
Where can i find this one?
There is nothing releated in SysConfig.
alemazz
Znuny newbie
Posts: 7
Joined: 17 Jul 2019, 17:51
Znuny Version: 5.x.x, 6.0.20
Real Name: Alessandro

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by alemazz »

root wrote: 22 Jul 2019, 22:27
alemazz wrote: 22 Jul 2019, 11:52
Is it safe to automatically delete these entries or not?
Orphaned entries are useless, they are not referenced anywhere. I would delete them unless you have changed the database or need the entries in a view or sth. similar.

- Roy
Hi Roy, thank you!

I was able to reach step 31 of 44 but it was hard, there were a lot of db errors, especially with foreign keys, i disabled foreign keys check but i know this isn't the best thing to do.
Btw ill try to reach at least the end of the script and then ill try to restart the procedure on another snapshot avoiding errors.
fcasal
Znuny wizard
Posts: 336
Joined: 21 Apr 2014, 16:14
Znuny Version: 6.0.18

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by fcasal »

In the otrs 6 version exists the ArticleStorage option, and as I can see in the admin manual for OTRS 5 (p. 262), in Kernel::System::Ticket::ArticleStorageDB or Kernel::System::Ticket::ArticleStorageFS, and perhaps, some of your database problems came from here.

Regards!
alemazz
Znuny newbie
Posts: 7
Joined: 17 Jul 2019, 17:51
Znuny Version: 5.x.x, 6.0.20
Real Name: Alessandro

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by alemazz »

"Deployment successful.
Done.

Migration completed!"

Did it, finally! :) Thanks to everyone!
fcasal
Znuny wizard
Posts: 336
Joined: 21 Apr 2014, 16:14
Znuny Version: 6.0.18

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by fcasal »

Which was the problem and the solution?

Thanks!
monigc
Znuny newbie
Posts: 1
Joined: 18 Oct 2021, 13:14
Znuny Version: 6.0.37
Real Name: Christoph Monig

Re: Updating from 5.x.x to 6.x.x orphaned entries error

Post by monigc »

I had the exact same issue, and was very sad
that no answer regarding the fix was posted.

It took a while to figure out what the problem was.

As @fcasal wrote, there probably was some confusion
in the script regarding the ArticleStorageFS and ArticleStorageDB settings.

Mine was set to "ArticleStorageFS" resulting in the error:

Code: Select all

Setting Ticket::Article::Backend::MIMEBase::ArticleStorage does not exists!
I did the following to resolve this:

Before the update, the following must be done:

1. In AdminSysConfig, search for ArticleStorage and open the Group "Core::Ticket".
2. Revert the Setting "Ticket::StorageModule" to it's default, "ArticleStorageDB".
3. On the command line (I'm using Ubuntu), as user OTRS, migrate all tickets into the DB:

Code: Select all

su - otrs
cd /opt/otrs
bin/otrs.Console.pl Admin::Article::StorageSwitch --target ArticleStorageDB
After the tickets have been migrated, revert the following settings to their defaults as well:

"Ticket::StorageModule::CheckAllBackends" should be "No".

"ArticleDir" should be "<OTRS_CONFIG_Home>/var/article"

This resolved the "ArticleStorage" issues for me, and the script finishes without issues.

I hope this helps someone.

Cheers,

Christoph
Post Reply