Magic ticket error

Moderator: crythias

Locked
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Magic ticket error

Post by fredygarcia »

Our OTRS server crashed after running out of disk space. We cleared out some data and got things running again. Now, certain agents see the following error:
Magic number checking on storable string failed at ../../lib/Storable.pm (autosplit into ../../lib/auto/Storable/thaw.al) line 366, at /opt/otrs//Kernel/System/Cache/FileStorable.pm line 128
Some agents see it immediately upon login, other on various links, and others see no errors. Seems very inconsistent. We've tried clearing the ${OTRSHOME}/var/tmp directory, but are still having problems.

Could this error be due to database corruption? Any suggestions are much appreciated.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Magic ticket error

Post by crythias »

did you restart cron and apache?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Re: Magic ticket error

Post by fredygarcia »

the entire server was rebooted.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Magic ticket error

Post by crythias »

This error is perl related and not specific to otrs. While that doesn't incredibly help, if you google this error, you'll find that it's related to "I can't read your data properly."
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Re: Magic ticket error

Post by fredygarcia »

I'll look into the Perl releated error. In the mean time, I was looking at the code in FileStorable.pm (I emphasized the line where the error is thrown),
my $CacheDirectory = $Self->{CacheDirectory} . '/' . $Param{Type};
my $Content = $Self->{MainObject}->FileRead(
Directory => $CacheDirectory,
Filename => $Param{Key},
Type => 'MD5',
Mode => 'binmode',
DisableWarnings => 1,
);

# check if cache exists
return if !$Content;

# read data structure back from file dump, use block eval for safety reasons
my $Storage = eval { Storable::thaw( ${$Content} ) };
return if !$Storage;
and CachedDirectory is previously defined as follows:
$Self->{CacheDirectory} = $TempDir . '/CacheFileStorable/';
I've checked the CacheFileStorable directory, and it is empty. Should I delete this directory and force it to be recreated? Might that help?
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Re: Magic ticket error

Post by fredygarcia »

nevermind, deleting the directory did nothing. We've had this error in the past, and a server restart has always cured it. We have no idea why it won't go away this time.
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Re: Magic ticket error

Post by fredygarcia »

I ran the following script to test my PERL setup: perl -cw bin/cgi-bin/index.pl

and got the following result:
Can't locate /etc/otrs/database.pm in @INC (@INC contains: /usr/share/otrs-3.0.1/bin/cgi-bin/../../Kernel/cpan-lib /usr/share/otrs-3.0.1/bin/cgi-bin/../.. /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /usr/share/otrs-3.0.1/bin/cgi-bin/../../Kernel/Config.pm line 25.
BEGIN failed--compilation aborted at /usr/share/otrs-3.0.1/bin/cgi-bin/../../Kernel/Config.pm line 35.
Compilation failed in require at /usr/share/otrs-3.0.1/bin/cgi-bin/../../Kernel/System/Web/InterfaceAgent.pm line 21.
BEGIN failed--compilation aborted at /usr/share/otrs-3.0.1/bin/cgi-bin/../../Kernel/System/Web/InterfaceAgent.pm line 21.
Compilation failed in require at bin/cgi-bin/index.pl line 42.
BEGIN failed--compilation aborted at bin/cgi-bin/index.pl line 42.
I located "/etc/otrs/database.pm". I tried viewing the file, but got permission denied. Unfortunately I don't have full admin access to the server. Am I on the right track? I wonder if this file was corrupted when the disk filled up. These are the permissions I see on database.pm
-rw-r----- 1 otrs www-data 555 2008-02-04 22:05 database.pm
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Magic ticket error

Post by crythias »

I don't know why there's a database.pm in /etc/otrs. I don't know why there's an /etc/otrs.

What's your version, environment, how was otrs installed?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Re: Magic ticket error

Post by fredygarcia »

We renamed the database.pm to avoid including it, and the perl -cw bin/cgi-bin/index.pl command now completes with "syntax OK".

The second command I run is perl -cw bin/PostMaster.pl... although in our installation the file file is named otrs.PostMaster.pl. That also completes with syntax OK

I've checked all necessary Perl modules are installed. We are still getting the magic number error :(

I believe we are running version 3.0.10, on Ubuntu... installed from source.
fredygarcia
Znuny newbie
Posts: 7
Joined: 23 Nov 2011, 03:51
Znuny Version: 3.0.10

Re: Magic ticket error

Post by fredygarcia »

We figured it out!

I just started here about a month ago. Before I got here, there was an upgrade performed on OTRS. Apparently the default location for the site was changed to /usr/shared/otrs.

The cache we were clearing was for the original /opt/otrs location. Clearing the correct cache did the trick. Thank you so much for your help and guidance.
Locked