GenericAgent.pl No such file...

Moderator: crythias

Post Reply
PointPubMedia
Znuny newbie
Posts: 18
Joined: 21 Oct 2010, 21:02
Znuny Version: 3.1.0
Company: PointPub Media Communications

GenericAgent.pl No such file...

Post by PointPubMedia »

Hi,

Since a while, we are having this error sometimes...

ERROR: OTRS-otrs.GenericAgent.pl-10 Perl: 5.10.1 OS: linux Time: Tue Apr 17 14:20:02 2012

Message: Can't open '/opt/otrs/var/tmp/CacheFileStorable/DynamicField/b11562902f3f9a315bc81a55339efe5b': No such file or directory

Traceback (6488):
Module: Kernel::System::Main::FileRead (v1.63) Line: 337
Module: Kernel::System::Cache::FileStorable::Get (v1.9) Line: 117
Module: Kernel::System::Cache::Get (v1.21) Line: 157
Module: Kernel::System::DynamicField::DynamicFieldGet (v1.50) Line: 289
Module: Kernel::System::DynamicField::DynamicFieldListGet (v1.50) Line: 964
Module: Kernel::System::GenericAgent::new (v1.81) Line: 117
Module: /opt/otrs//bin/otrs.GenericAgent.pl (v1.6) Line: 89


OTRS: 3.1.2
OTRS 3.2.9
OS: Debian Linux, MySql 5.1.x
52nEHJ
Znuny newbie
Posts: 23
Joined: 31 May 2012, 08:17
Znuny Version: 3.3.3

Re: GenericAgent.pl No such file...

Post by 52nEHJ »

Hi,
this morning we had this problem, too. Are there any news about this error? Bad configuration? Bug in the software?

Looking forward to get any response and by the way - a BIG THANK YOU to the developers and all other contributors of OTRS!
52nEHJ
Znuny newbie
Posts: 23
Joined: 31 May 2012, 08:17
Znuny Version: 3.3.3

Re: GenericAgent.pl No such file...

Post by 52nEHJ »

*PING*

Anything I can do?

Todays mail:
ERROR: OTRS-otrs.GenericAgent.pl-10 Perl: 5.10.1 OS: linux Time: Thu Sep 6 06:40:01 2012

Message: Can't open
'/opt/otrs/var/tmp/CacheFileStorable/DynamicField/b11562902f3f9a315bc81a55339efe5b': No
such file or directory

Traceback (14300):
Module: Kernel::System::Main::FileRead (v1.63) Line: 337
Module: Kernel::System::Cache::FileStorable::Get (v1.9) Line: 117
Module: Kernel::System::Cache::Get (v1.21) Line: 157
Module: Kernel::System::DynamicField::DynamicFieldGet (v1.56.2.2) Line: 272
Module: Kernel::System::DynamicField::DynamicFieldListGet (v1.56.2.2) Line: 940
Module: Kernel::System::GenericAgent::new (v1.81) Line: 117
Module: /opt/otrs//bin/otrs.GenericAgent.pl (v1.6) Line: 89
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: GenericAgent.pl No such file...

Post by CSL »

*PONG*

(Couldn't resist)

Does this directory exist:
/opt/otrs/var/tmp/CacheFileStorable/DynamicField/

If it does, what are the permissions on it? The error looks like it's trying to find a cache file that isn't there. This could be because it can't write to that location.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
52nEHJ
Znuny newbie
Posts: 23
Joined: 31 May 2012, 08:17
Znuny Version: 3.3.3

Re: GenericAgent.pl No such file...

Post by 52nEHJ »

CSL wrote:Does this directory exist:
/opt/otrs/var/tmp/CacheFileStorable/DynamicField/
Yes it exists:

Code: Select all

drwxrwsr-x 2 otrs     www-data  4096 Sep 18 08:20 DynamicField
drwxrwsr-x 2 otrs     www-data 12288 Sep 18 08:29 DynamicFieldValue
CSL wrote:If it does, what are the permissions on it? The error looks like it's trying to find a cache file that isn't there. This could be because it can't write to that location.
The newest files have this owner and permissions:

Code: Select all

-rw-rw-r-- 1 www-data www-data 2137 Sep 18 08:20 538867e23daf5723d184469a0e16613b
-rw-rw-r-- 1 www-data www-data   41 Sep 18 08:16 55296f4090c134bb28e5b3d80783f7d2
The file from my first post is changed somehow to this:

Code: Select all

-rw-rw-r-- 1 otrs     www-data  298 Sep 18 08:10 b11562902f3f9a315bc81a55339efe5b
I do not know why the owner is first www-data:www-data and than changed to otrs:www-data. The error mail is not send daily.
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: GenericAgent.pl No such file...

Post by CSL »

From section 7 of the INSTALL file in the OTRS directory:

Wbserver with www-data user (e. g. Debian, Ubuntu):

shell> bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs

The owner (first name listed) of the directory and all files should be otrs, not www-data. www-data should be the group (the second name listed). Try running the above to see if it corrects the issue.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
52nEHJ
Znuny newbie
Posts: 23
Joined: 31 May 2012, 08:17
Znuny Version: 3.3.3

Re: GenericAgent.pl No such file...

Post by 52nEHJ »

shell> bin/otrs.SetPermissions.pl --otrs-user=otrs --web-user=www-data --otrs-group=www-data --web-group=www-data /opt/otrs
I did this during the install of 3.1.8 and today during the update to 3.1.10. I'll see, if this issue is fixed in one of two patches and came back to tell you.

But I had to use the real folder and not the link: /opt/otrs-3.1.10 and not /opt/otrs.

I created the link using:

Code: Select all

shell:/opt/> ln -s otrs-3.1.10 otrs
Kind regards,
Eike
52nEHJ
Znuny newbie
Posts: 23
Joined: 31 May 2012, 08:17
Znuny Version: 3.3.3

Re: GenericAgent.pl No such file...

Post by 52nEHJ »

Here, we go again:

Code: Select all

ERROR: OTRS-otrs.GenericAgent.pl-10 Perl: 5.10.1 OS: linux Time: Tue Sep 25 14:40:01 2012

Message: Can't open
'/opt/otrs/var/tmp/CacheFileStorable/DynamicField/20aa1d07d0cc84b17bd7ad64056623ea': No
such file or directory

Traceback (14408):
   Module: Kernel::System::Main::FileRead (v1.63) Line: 337
   Module: Kernel::System::Cache::FileStorable::Get (v1.9) Line: 117
   Module: Kernel::System::Cache::Get (v1.21) Line: 157
   Module: Kernel::System::DynamicField::DynamicFieldGet (v1.56.2.2) Line: 272
   Module: Kernel::System::DynamicField::DynamicFieldListGet (v1.56.2.2) Line: 940
   Module: Kernel::System::GenericAgent::new (v1.81) Line: 117
   Module: /opt/otrs//bin/otrs.GenericAgent.pl (v1.6) Line: 89
This morning in /opt/otrs/var/tmp/CacheFileStorable/DynamicField/:

Code: Select all

-rw-rw-r-- 1 otrs     www-data  296 Sep 26 08:40 20aa1d07d0cc84b17bd7ad64056623ea
[...]
-rw-rw-r-- 1 www-data www-data 2.1K Sep 26 08:54 538867e23daf5723d184469a0e16613b
-rw-rw-r-- 1 www-data www-data   41 Sep 26 08:47 55296f4090c134bb28e5b3d80783f7d2
The file that cause the problem is today owned by the right user and group, I think. All files in the dir /opt/otrs/var/tmp/CacheFileStorable/DynamicField/ are touched today and the two in the quote above have not the right owner and group. What can cause this?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: GenericAgent.pl No such file...

Post by crythias »

52nEHJ wrote:What can cause this?
Apache runs as user www-data and OTRS wants to run as user otrs.

How to fix? well, you could make sure apache runs as otrs, but there appears to be another group issue ...
It seems weird, but apparently www-data user isn't a member of the www-data group. The reason I say that is that the group is writable for the can't open directory but the context of apache can't see it.
It's possible that I'm backwards in this assessment, but the more reasonable scenario of otrs not being a member of www-data and therefore being unable to read would mean that 20aa* should be able to be read and 538* and 552* would not be.

also, selinux enabled causes this. Disable selinux.
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
52nEHJ
Znuny newbie
Posts: 23
Joined: 31 May 2012, 08:17
Znuny Version: 3.3.3

Re: GenericAgent.pl No such file...

Post by 52nEHJ »

This morning, it was another file:

Code: Select all

Message: Can't open
'/opt/otrs/var/tmp/CacheFileStorable/DynamicField/6732332f2164b22a374a2cd7c080aea3': No
such file or directory
Regarding the group memberships:

Code: Select all

:~# groups www-data
www-data : www-data [...]
vServerB2:~# groups otrs
otrs : otrs www-data
Do I need to add user www-data to group otrs?

I'll give it a try.
crythias wrote:also, selinux enabled causes this. Disable selinux.
Are you sure, that disabling security in such a case is the right decision? I would like to fix the configuration of the components first.
CSL
Znuny expert
Posts: 159
Joined: 11 Nov 2011, 19:27
Znuny Version: 3.0.11

Re: GenericAgent.pl No such file...

Post by CSL »

Sounds like crythias has got to the bottom of it; you need to disable selinux on your OTRS server, it's part of the INSTALL file instructions. Selinux only provides enhanced security if you have set it up correctly and know what you are doing with it, otherwise it will only cause problems.
Backend: OTRS 3.0.11 RedHat Enterprise Linux 6.2, Apache, MySQL with replication
Frontend: OTRS 3.0.11 RedHat Enterprise Linux 6.2 with SELinux, Apache SSL
Post Reply