OTRS 5 -> 6 DBUpdate-to-6.pl Problems

Moderator: crythias

Post Reply
Julia
Znuny newbie
Posts: 3
Joined: 22 Oct 2019, 08:58
Znuny Version: 5.0.38
Real Name: Julia

OTRS 5 -> 6 DBUpdate-to-6.pl Problems

Post by Julia »

Hello everyone,

I've been trying to upgrade my OTRS 5.0.38 (upgraded from 4.0.5 previously) to version 6.0.23. Every time I try to run DBUpdate-to-6.pl I get the following error:

Code: Select all

Can't locate object method "Load" via package "Kernel::Config::Backups::ZZZAutoOTRS5" (perhaps you forgot to load "Kernel::Config::Backups::ZZZAutoOTRS5"?) at /opt/otrs/Kernel/System/SysConfig/Migration.pm line 1602.
I've followed the official upgrade instructions exactly as they are on the page.

Here's what I've tried doing:

Attempted to install an older version from otrs-6.0.1.tar.gz.
Same error.

I tried copying both ZZZAuto.pm and ZZZAAuto.pm from OTRS 5.
Same error.

I noticed that running the script seems to delete ZZZAuto.pm before throwing the error. So I modified /opt/otrs/Kernel/System/SysConfig/Migration.pm and removed the code which deletes ZZZAuto.pm.
I got the following error instead:

Code: Select all

Message: Can't write '/opt/otrs/Kernel/Config/Backups/ZZZAutoOTRS5.pm':
I tried copying ZZZAuto.pm from the OTRS 5 installation and renaming it to ZZZAutoOTRS5.pm (while keeping one copy of it named ZZZAuto.pm).
Got an error about being unable to write the file.

I tried following this guide instead of the official: https://www.yobihat.com/update-otrs-fro ... n-centos7/
Same error.

I'm not sure what to do. Help, please?
fcasal
Znuny wizard
Posts: 336
Joined: 21 Apr 2014, 16:14
Znuny Version: 6.0.18

Re: OTRS 5 -> 6 DBUpdate-to-6.pl Problems

Post by fcasal »

I am not sure, but the error after copying the file looks like a lack of permissions.

Here a user had the same problem viewtopic.php?t=37664 You could try it.

Regards.
Julia
Znuny newbie
Posts: 3
Joined: 22 Oct 2019, 08:58
Znuny Version: 5.0.38
Real Name: Julia

Re: OTRS 5 -> 6 DBUpdate-to-6.pl Problems

Post by Julia »

fcasal wrote: 22 Oct 2019, 21:17 I am not sure, but the error after copying the file looks like a lack of permissions.

Here a user had the same problem viewtopic.php?t=37664 You could try it.

Regards.
Hello,

I've run the permission script (as root as the instructions suggested) each time before I've run the DBUpdate script. I don't think that is the case.

Here's how the folder looks after running the script:

Code: Select all

/opt/otrs/Kernel/Config/Files# ls -la
total 336
drwxrwsr-x 3 otrs www-data   4096 loka  23 09:11 .
drwxrwsr-x 4 otrs www-data   4096 loka  22 10:55 ..
drwxrwsr-x 2 otrs www-data   4096 syys  19 19:16 XML
-rw-rw---- 1 otrs www-data 297238 loka  22 10:55 ZZZAAuto.pm
-rw-rw---- 1 otrs www-data  31090 loka  23 09:11 ZZZAuto.pm
EDIT: I tried chmod 777 on the two files just for the heck of it, same error.

EDIT 2: I tried disabling AppArmor, same error.
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS 5 -> 6 DBUpdate-to-6.pl Problems

Post by root »

Hi,

Looks like you checked the wrong files/location. Your initial post was about /opt/otrs/Kernel/Config/Backups/ZZZAutoOTRS5.pm.

- 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 ?
Julia
Znuny newbie
Posts: 3
Joined: 22 Oct 2019, 08:58
Znuny Version: 5.0.38
Real Name: Julia

Re: OTRS 5 -> 6 DBUpdate-to-6.pl Problems

Post by Julia »

root wrote: 23 Oct 2019, 10:05 Hi,

Looks like you checked the wrong files/location. Your initial post was about /opt/otrs/Kernel/Config/Backups/ZZZAutoOTRS5.pm.

- Roy
Hello,

Good catch. There is indeed a ZZZAutoOTRS5.pm in /opt/otrs/Kernel/Config/Backups/
It's also owned by the user otrs, the group is www-data and the permissions are 0660.

I tried deleting the file (in case of corruption), ran otrs.SetPermissions.pl as root and then DBUpdate-to-6.pl as otrs.
Same error:

Code: Select all

Can't locate object method "Load" via package "Kernel::Config::Backups::ZZZAutoOTRS5" (perhaps you forgot to load "Kernel::Config::Backups::ZZZAutoOTRS5"?) at /opt/otrs/Kernel/System/SysConfig/Migration.pm line 1602.
This time the file got generated with slightly different permissions, 0644:

Code: Select all

/opt/otrs/Kernel/Config/Backups$ ls -la
total 40
drwxrwsr-x 2 otrs www-data  4096 loka  23 11:48 .
drwxrwsr-x 4 otrs www-data  4096 loka  22 10:55 ..
-rw-r--r-- 1 otrs www-data 31090 loka  23 11:48 ZZZAutoOTRS5.pm
I did chmod 777 on it, ran DBUpdate-to-6.pl again:

Code: Select all

Can't locate object method "Load" via package "Kernel::Config::Backups::ZZZAutoOTRS5" (perhaps you forgot to load "Kernel::Config::Backups::ZZZAutoOTRS5"?) at /opt/otrs/Kernel/System/SysConfig/Migration.pm line 1602.
I am not sure if the error is related to permissions.

- Julia

EDIT: I did chmod -R 777 /opt/otrs/ and got the same error. I highly doubt it's about permissions at this point.
Post Reply