[SOLVED] OTRS Upgrade 4 to 5 - error

Moderator: crythias

Post Reply
andy17d
Znuny newbie
Posts: 78
Joined: 30 Jan 2014, 15:27
Znuny Version: 4.0.19
Location: Poland
Contact:

[SOLVED] OTRS Upgrade 4 to 5 - error

Post by andy17d »

Hey,
I'm in the process of updating OTRS from 4.0.19 to 5.0.42.
Unfortunately, there is a problem in step 6.1: Database schema update.
The command:

Code: Select all

bin/otrs.Console.pl Maint::Database::Check
returns an error:
Eval went very, very wrong:

# localizing: Crypt::Random::Source::Factory::has_weak_source, Crypt::Random::Source::Factory::weak_source, Crypt::Random::Source::Factory::clear_weak_source, Crypt::Random::Source::Factory::new_weak, Crypt::Random::Source::Factory::_assert_weak_source, Crypt::Random::Source::Factory::new_strong, Crypt::Random::Source::Factory::_assert_strong_source, Crypt::Random::Source::Factory::has_any_source, Crypt::Random::Source::Factory::any_source, Crypt::Random::Source::Factory::clear_any_source, Crypt::Random::Source::Factory::has_strong_source, Crypt::Random::Source::Factory::strong_source, Crypt::Random::Source::Factory::clear_strong_source, Crypt::Random::Source::Factory::new_any, Crypt::Random::Source::Factory::_assert_any_source, Crypt::Random::Source::Factory::scan_inc, Crypt::Random::Source::Factory::has_scan_inc, Crypt::Random::Source::Factory::clear_scan_inc, Crypt::Random::Source::Factory::has_strong_sources, Crypt::Random::Source::Factory::strong_sources, Crypt::Random::Source::Factory::clear_strong_sources, Crypt::Random::Source::Factory::has_weak_sources, Crypt::Random::Source::Factory::weak_sources, Crypt::Random::Source::Factory::clear_weak_sources, Math::Random::Secure::RNG::seeder, Math::Random::Secure::RNG::seed_size, Math::Random::Secure::RNG::has_seed, Math::Random::Secure::RNG::seed, Math::Random::Secure::RNG::clear_seed, Math::Random::Secure::RNG::clear_rng, Math::Random::Secure::RNG::rng, Math::Random::Secure::RNG::irand, Math::Random::Secure::RNG::rand, Math::Random::Secure::RNG::_assert_rng, Math::Random::Secure::RNG::_for_pid
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::has_weak_source {
exists $_[0]->{"weak_source"}
}
$Sub::Quote::QUOTED{"CODE(0x2253d08)"}[3] = \&Crypt::Random::Source::Factory::has_weak_source
}
{
my $isa_check_for_weak_source = ${$_[1][0]->{"\$isa_check_for_weak_source"}};
no warnings 'closure';
sub Crypt::Random::Source::Factory::weak_source {
(@_ > 1
? do { my ($self, $value) = @_;
$isa_check_for_weak_source->($value);
$self->{"weak_source"} = $value;
}
: do { $_[0]->{"weak_source"} = $_[0]->1 unless exists $_[0]->{"weak_source"}; $_[0]->{"weak_source"} }
) }
$Sub::Quote::QUOTED{"CODE(0x2253de0)"}[3] = \&Crypt::Random::Source::Factory::weak_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::clear_weak_source {
delete $_[0]->{"weak_source"}
}
$Sub::Quote::QUOTED{"CODE(0x2254278)"}[3] = \&Crypt::Random::Source::Factory::clear_weak_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::new_weak {
shift->_assert_weak_source->new(@_); }
$Sub::Quote::QUOTED{"CODE(0x22545f0)"}[3] = \&Crypt::Random::Source::Factory::new_weak
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::_assert_weak_source {
do { do { $_[0]->{"weak_source"} = $_[0]->1 unless exists $_[0]->{"weak_source"}; $_[0]->{"weak_source"} } }||die "Attempted to access 'weak_source' but it is not set" }
$Sub::Quote::QUOTED{"CODE(0x2254908)"}[3] = \&Crypt::Random::Source::Factory::_assert_weak_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::new_strong {
shift->_assert_strong_source->new(@_); }
$Sub::Quote::QUOTED{"CODE(0x2255998)"}[3] = \&Crypt::Random::Source::Factory::new_strong
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::_assert_strong_source {
do { do { $_[0]->{"strong_source"} = $_[0]->1 unless exists $_[0]->{"strong_source"}; $_[0]->{"strong_source"} } }||die "Attempted to access 'strong_source' but it is not set" }
$Sub::Quote::QUOTED{"CODE(0x2255cb0)"}[3] = \&Crypt::Random::Source::Factory::_assert_strong_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::has_any_source {
exists $_[0]->{"any_source"}
}
$Sub::Quote::QUOTED{"CODE(0x2255fc8)"}[3] = \&Crypt::Random::Source::Factory::has_any_source
}
{
my $isa_check_for_any_source = ${$_[1][1]->{"\$isa_check_for_any_source"}};
no warnings 'closure';
sub Crypt::Random::Source::Factory::any_source {
(@_ > 1
? do { my ($self, $value) = @_;
$isa_check_for_any_source->($value);
$self->{"any_source"} = $value;
}
: do { $_[0]->{"any_source"} = $_[0]->1 unless exists $_[0]->{"any_source"}; $_[0]->{"any_source"} }
) }
$Sub::Quote::QUOTED{"CODE(0x22560a0)"}[3] = \&Crypt::Random::Source::Factory::any_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::clear_any_source {
delete $_[0]->{"any_source"}
}
$Sub::Quote::QUOTED{"CODE(0x2256538)"}[3] = \&Crypt::Random::Source::Factory::clear_any_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::has_strong_source {
exists $_[0]->{"strong_source"}
}
$Sub::Quote::QUOTED{"CODE(0x22777f8)"}[3] = \&Crypt::Random::Source::Factory::has_strong_source
}
{
my $isa_check_for_strong_source = ${$_[1][2]->{"\$isa_check_for_strong_source"}};
no warnings 'closure';
sub Crypt::Random::Source::Factory::strong_source {
(@_ > 1
? do { my ($self, $value) = @_;
$isa_check_for_strong_source->($value);
$self->{"strong_source"} = $value;
}
: do { $_[0]->{"strong_source"} = $_[0]->1 unless exists $_[0]->{"strong_source"}; $_[0]->{"strong_source"} }
) }
$Sub::Quote::QUOTED{"CODE(0x22778d0)"}[3] = \&Crypt::Random::Source::Factory::strong_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::clear_strong_source {
delete $_[0]->{"strong_source"}
}
$Sub::Quote::QUOTED{"CODE(0x2277d68)"}[3] = \&Crypt::Random::Source::Factory::clear_strong_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::new_any {
shift->_assert_any_source->new(@_); }
$Sub::Quote::QUOTED{"CODE(0x227be28)"}[3] = \&Crypt::Random::Source::Factory::new_any
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::_assert_any_source {
do { do { $_[0]->{"any_source"} = $_[0]->1 unless exists $_[0]->{"any_source"}; $_[0]->{"any_source"} } }||die "Attempted to access 'any_source' but it is not set" }
$Sub::Quote::QUOTED{"CODE(0x227c140)"}[3] = \&Crypt::Random::Source::Factory::_assert_any_source
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::scan_inc {
die "scan_inc is a read-only accessor" if @_ > 1;
do { $_[0]->{"scan_inc"} = $_[0]->1 unless exists $_[0]->{"scan_inc"}; $_[0]->{"scan_inc"} } }
$Sub::Quote::QUOTED{"CODE(0x227c458)"}[3] = \&Crypt::Random::Source::Factory::scan_inc
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::has_scan_inc {
exists $_[0]->{"scan_inc"}
}
$Sub::Quote::QUOTED{"CODE(0x227c650)"}[3] = \&Crypt::Random::Source::Factory::has_scan_inc
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::clear_scan_inc {
delete $_[0]->{"scan_inc"}
}
$Sub::Quote::QUOTED{"CODE(0x227c920)"}[3] = \&Crypt::Random::Source::Factory::clear_scan_inc
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::has_strong_sources {
exists $_[0]->{"strong_sources"}
}
$Sub::Quote::QUOTED{"CODE(0x2286150)"}[3] = \&Crypt::Random::Source::Factory::has_strong_sources
}
{
my $isa_check_for_strong_sources = ${$_[1][3]->{"\$isa_check_for_strong_sources"}};
no warnings 'closure';
sub Crypt::Random::Source::Factory::strong_sources {
(@_ > 1
? do { my ($self, $value) = @_;
$isa_check_for_strong_sources->($value);
$self->{"strong_sources"} = $value;
}
: do { $_[0]->{"strong_sources"} = $_[0]->1 unless exists $_[0]->{"strong_sources"}; $_[0]->{"strong_sources"} }
) }
$Sub::Quote::QUOTED{"CODE(0x2286228)"}[3] = \&Crypt::Random::Source::Factory::strong_sources
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::clear_strong_sources {
delete $_[0]->{"strong_sources"}
}
$Sub::Quote::QUOTED{"CODE(0x22866c0)"}[3] = \&Crypt::Random::Source::Factory::clear_strong_sources
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::has_weak_sources {
exists $_[0]->{"weak_sources"}
}
$Sub::Quote::QUOTED{"CODE(0x229b2f0)"}[3] = \&Crypt::Random::Source::Factory::has_weak_sources
}
{
my $isa_check_for_weak_sources = ${$_[1][4]->{"\$isa_check_for_weak_sources"}};
no warnings 'closure';
sub Crypt::Random::Source::Factory::weak_sources {
(@_ > 1
? do { my ($self, $value) = @_;
$isa_check_for_weak_sources->($value);
$self->{"weak_sources"} = $value;
}
: do { $_[0]->{"weak_sources"} = $_[0]->1 unless exists $_[0]->{"weak_sources"}; $_[0]->{"weak_sources"} }
) }
$Sub::Quote::QUOTED{"CODE(0x229b380)"}[3] = \&Crypt::Random::Source::Factory::weak_sources
}
{
no warnings 'closure';
sub Crypt::Random::Source::Factory::clear_weak_sources {
delete $_[0]->{"weak_sources"}
}
$Sub::Quote::QUOTED{"CODE(0x229bb30)"}[3] = \&Crypt::Random::Source::Factory::clear_weak_sources
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::seeder {
die "seeder is a read-only accessor" if @_ > 1;
do { $_[0]->{"seeder"} = $_[0]->_build_seeder unless exists $_[0]->{"seeder"}; $_[0]->{"seeder"} } }
$Sub::Quote::QUOTED{"CODE(0x22a50e0)"}[3] = \&Math::Random::Secure::RNG::seeder
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::seed_size {
die "seed_size is a read-only accessor" if @_ > 1;
$_[0]->{"seed_size"} }
$Sub::Quote::QUOTED{"CODE(0x22a56b0)"}[3] = \&Math::Random::Secure::RNG::seed_size
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::has_seed {
exists $_[0]->{"seed"}
}
$Sub::Quote::QUOTED{"CODE(0x22a8748)"}[3] = \&Math::Random::Secure::RNG::has_seed
}
{
my $isa_check_for_seed = ${$_[1][5]->{"\$isa_check_for_seed"}};
no warnings 'closure';
sub Math::Random::Secure::RNG::seed {
(@_ > 1
? do { my ($self, $value) = @_;
$isa_check_for_seed->($value);
$self->{"seed"} = $value;
}
: do { $_[0]->{"seed"} = $_[0]->_build_seed unless exists $_[0]->{"seed"}; $_[0]->{"seed"} }
) }
$Sub::Quote::QUOTED{"CODE(0x22a8820)"}[3] = \&Math::Random::Secure::RNG::seed
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::clear_seed {
delete $_[0]->{"seed"}
}
$Sub::Quote::QUOTED{"CODE(0x22a8cb8)"}[3] = \&Math::Random::Secure::RNG::clear_seed
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::clear_rng {
delete $_[0]->{"rng"}
}
$Sub::Quote::QUOTED{"CODE(0x22a8f58)"}[3] = \&Math::Random::Secure::RNG::clear_rng
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::rng {
die "rng is a read-only accessor" if @_ > 1;
do { $_[0]->{"rng"} = $_[0]->_build_rng unless exists $_[0]->{"rng"}; $_[0]->{"rng"} } }
$Sub::Quote::QUOTED{"CODE(0x22a9120)"}[3] = \&Math::Random::Secure::RNG::rng
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::irand {
shift->_assert_rng->irand(@_); }
$Sub::Quote::QUOTED{"CODE(0x22a9e18)"}[3] = \&Math::Random::Secure::RNG::irand
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::rand {
shift->_assert_rng->rand(@_); }
$Sub::Quote::QUOTED{"CODE(0x22aa0e8)"}[3] = \&Math::Random::Secure::RNG::rand
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::_assert_rng {
do { do { $_[0]->{"rng"} = $_[0]->_build_rng unless exists $_[0]->{"rng"}; $_[0]->{"rng"} } }||die "Attempted to access 'rng' but it is not set" }
$Sub::Quote::QUOTED{"CODE(0x22aa3a0)"}[3] = \&Math::Random::Secure::RNG::_assert_rng
}
{
no warnings 'closure';
sub Math::Random::Secure::RNG::_for_pid {
(@_ > 1
? $_[0]->{"_for_pid"} = $_[1]
: $_[0]->{"_for_pid"}
) }
$Sub::Quote::QUOTED{"CODE(0x22aa610)"}[3] = \&Math::Random::Secure::RNG::_for_pid
}


Number found where operator expected at (eval 148) line 17, near "->1"
Compilation failed in require at /opt/otrs/Kernel/cpan-lib/Math/Random/Secure.pm line 8.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/cpan-lib/Math/Random/Secure.pm line 8.
Compilation failed in require at /opt/otrs/Kernel/System/Main.pm line 23.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/Main.pm line 23.
Compilation failed in require at /opt/otrs/Kernel/System/ObjectManager.pm line 33.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/ObjectManager.pm line 33.
Compilation failed in require at bin/otrs.Console.pl line 28.
BEGIN failed--compilation aborted at bin/otrs.Console.pl line 28.
I've installed the xperl-Crypt-OpenSSL-Random library but it didn't help.
What else can I do?
Last edited by andy17d on 12 Feb 2021, 10:24, edited 1 time in total.
OTRS 4.0.19/6.0.26, openSUSE 12, MySQL 5.5

KodIT Usługi Informatyczne - Odzyskiwanie danych Poznań - Serwis Komputerowy
root
Administrator
Posts: 3934
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Upgrade 4 to 5 - error

Post by root »

Hi,

First of all, let us know which manual you are following.

- 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 ?
andy17d
Znuny newbie
Posts: 78
Joined: 30 Jan 2014, 15:27
Znuny Version: 4.0.19
Location: Poland
Contact:

Re: OTRS Upgrade 4 to 5 - error

Post by andy17d »

https://ftp.otrs.org/pub/otrs/doc/doc-a ... n_book.pdf

Chapter: 5. Upgrading OTRS from 4 to 5
OTRS 4.0.19/6.0.26, openSUSE 12, MySQL 5.5

KodIT Usługi Informatyczne - Odzyskiwanie danych Poznań - Serwis Komputerowy
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: OTRS Upgrade 4 to 5 - error

Post by reneeb »

Can you run the CheckModules script?
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
andy17d
Znuny newbie
Posts: 78
Joined: 30 Jan 2014, 15:27
Znuny Version: 4.0.19
Location: Poland
Contact:

Re: OTRS Upgrade 4 to 5 - error

Post by andy17d »

reneeb wrote: 09 Feb 2021, 17:48 Can you run the CheckModules script?
Of course.
/opt/otrs/bin/otrs.CheckModules.pl
o Apache::DBI......................ok (v1.12)
o Apache2::Reload..................ok (v0.13)
o Archive::Tar.....................ok (v1.82)
o Archive::Zip.....................ok (v1.30)
o Crypt::Eksblowfish::Bcrypt.......Not installed! Use: 'zypper install perl-Crypt-Eksblowfish' (optional - For strong password hashing.)
o Crypt::SSLeay....................ok (v0.58)
o Date::Format.....................ok (v2.24)
o DBI..............................ok (v1.617)
o DBD::mysql.......................ok (v4.021)
o DBD::ODBC........................Not installed! (optional - Required to connect to a MS-SQL database.)
o DBD::Oracle......................Not installed! (optional - Required to connect to a Oracle database.)
o DBD::Pg..........................Not installed! Use: 'zypper install perl-DBD-Pg' (optional - Required to connect to a PostgreSQL database.)
o Digest::SHA......................ok (v5.71)
o Encode::HanExtra.................ok (v0.23)
o IO::Socket::SSL..................ok (v1.55)
o JSON::XS.........................ok (v2.32)
o List::Util::XS...................ok (v1.25)
o LWP::UserAgent...................ok (v6.13)
o Mail::IMAPClient.................Not installed! Use: 'zypper install perl-Mail-IMAPClient' (optional - Required for IMAP TLS connections.)
o IO::Socket::SSL................ok (v1.55)
o Authen::SASL...................Not installed! Use: 'zypper install perl-Authen-SASL' (optional - Required for MD5 authentication mechanisms in IMAP connections.)
o Authen::NTLM...................Not installed! Use: 'zypper install perl-Authen-NTLM' (optional - Required for NTLM authentication mechanism in IMAP connections.)
o ModPerl::Util....................ok (v2.000006)
o Net::DNS.........................ok (v0.68)
o Net::LDAP........................ok (v0.44)
o Template.........................ok (v2.24)
o Template::Stash::XS..............ok (undef)
o Text::CSV_XS.....................ok (v0.87)
o Time::HiRes......................ok (v1.9725)
o Time::Piece......................ok (v1.20_01)
o XML::LibXML......................ok (v1.95)
o XML::LibXSLT.....................ok (v1.76)
o XML::Parser......................ok (v2.41)
o YAML::XS.........................ok (v0.38)
OTRS 4.0.19/6.0.26, openSUSE 12, MySQL 5.5

KodIT Usługi Informatyczne - Odzyskiwanie danych Poznań - Serwis Komputerowy
andy17d
Znuny newbie
Posts: 78
Joined: 30 Jan 2014, 15:27
Znuny Version: 4.0.19
Location: Poland
Contact:

Re: OTRS Upgrade 4 to 5 - error

Post by andy17d »

Problem solved.
I was testing on a virtual machine, so I reverted the machine to previous state and tried updating to 5.0.41 and it was fine.
I think the problem was caused by missing libraries, which my opensuse version just doesn't have.
#5.0.42 2020-03-27 - 2020-03-23 Mask user credentials in the SupportBundle. - 2020-03-03 Improved random number generator. We added new CPAN dependencies, which should already be present on all systems: Crypt::Random::Source Exporter::Tiny Math::Random::ISAAC Math::Random::Secure Module::Find Moo Types::TypeTiny namespace::clean
OTRS 4.0.19/6.0.26, openSUSE 12, MySQL 5.5

KodIT Usługi Informatyczne - Odzyskiwanie danych Poznań - Serwis Komputerowy
Post Reply