Setting up GenericAgent Option Under Admin Settings

Moderator: crythias

Locked
arvobowen
Znuny newbie
Posts: 55
Joined: 12 Jul 2010, 20:34
Znuny Version: 2.4

Setting up GenericAgent Option Under Admin Settings

Post by arvobowen »

Why will my generic agent jobs not run? I have a job set up under generic agent that is set to VALID. But for some reason it will not run automatically. It runs fine when I manually run it. I have added a Scheduled Task to my windows server that runs the following...

C:\Perl\bin\perl.exe c:/Httpd/OTRS/bin/GenericAgent.pl

But for some reason it seems that file really does not contain anything to do with running the GenericAgent jobs I created via OTRS admin panel.

Any ideas?
Operating System: Windows Server 2003 x86
Purpose: Information Technology Help Desk
OTRS Version: OTRS 2.4.7
arvobowen
Znuny newbie
Posts: 55
Joined: 12 Jul 2010, 20:34
Znuny Version: 2.4

Re: Setting up GenericAgent Option Under Admin Settings

Post by arvobowen »

OK so it seems that you need to copy a file for the GenericAgent.pl to run successfully... When it was running before it would error out. I tried to run the same command from the command prompt and got the following...

Code: Select all

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\User>C:\Perl\bin\perl.exe c:/Httpd/OTRS/bin/GenericAgent.pl
ERROR: OTRS-GenericAgent-10 Perl: 5.10.1 OS: MSWin32 Time: Mon Mar 28 10:15:03 2011
 Message: Module Kernel/Config/GenericAgent.pm not found!
 Traceback (4280):
   Module: c:/Httpd/OTRS/bin/GenericAgent.pl (v1.59) Line: 108
ERROR: Can't load agent job file 'Kernel::Config::GenericAgent': Inappropriate I/O control operation
I ended up copying "C:\Httpd\OTRS\Kernel\Config\GenericAgent.pm.dist" to "C:\Httpd\OTRS\Kernel\Config\GenericAgent.pm" and now it runs with no errors!

On to a new problem...
OK now that it runs with no errors it also does not return anything telling me the results to any extent... Looking in the GenericAgent.pm file I noticed there was an area to fill out hard coded jobs for the GenericAgent to run. I'm sure it would work if I manually added a job to it then tried to run it but I'm after something different... I want it to actually run the jobs listed on the /otrs/index.pl?Action=AdminGenericAgent JOB LIST. I'm guessing this list is kept in the database so basically I need to run the jobs in the database. :)

Any ideas on how to do that?
Operating System: Windows Server 2003 x86
Purpose: Information Technology Help Desk
OTRS Version: OTRS 2.4.7
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: Setting up GenericAgent Option Under Admin Settings

Post by ferrosti »

Yes, run the jobs from your database 8)

You have started genericagent without -db parameter. Have a look at all the cron files. There is one that specifies GenericAgent jobs that should run from database. Change this one, update your crontab and go for it.
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
arvobowen
Znuny newbie
Posts: 55
Joined: 12 Jul 2010, 20:34
Znuny Version: 2.4

Re: Setting up GenericAgent Option Under Admin Settings

Post by arvobowen »

OK great thanks ferrosti! That's a step in the right direction but still not 100% there...

So I found the "generic_agent-database.dist" file and extracted the following...
# start generic agent every 10 minutes
*/10 * * * * $HOME/bin/GenericAgent.pl -c db >> /dev/null
Using Windows 2003 Server from the command prompt I try the following command...
C:\Documents and Settings\User>C:\Perl\bin\perl.exe c:/Httpd/OTRS/bin/GenericAgent.pl -c db
That ran without any errors as well but when I look at my Generic Agent list it shows the job still has not change the "Last Run" date/time.
Is there maybe a switch for verbose mode or something?
Operating System: Windows Server 2003 x86
Purpose: Information Technology Help Desk
OTRS Version: OTRS 2.4.7
ferrosti
Znuny superhero
Posts: 723
Joined: 10 Oct 2007, 14:30
Znuny Version: 3.0
Location: Hamburg, Germany

Re: Setting up GenericAgent Option Under Admin Settings

Post by ferrosti »

Try

Code: Select all

perl -c "c:/Httpd/OTRS/bin/GenericAgent.pl -c db"
BTW: Which OTSR Version are you running? Please fill out your signature! This does not seem to be OTRS 3.0.x
openSuSE on ESX
IT-Helpdesk: OTRS 3.0
Customer Service: OTRS 3.0 (upgraded from 2.3)
Customer Service (subsidiary): OTRS 3.0
+additional test and development systems
arvobowen
Znuny newbie
Posts: 55
Joined: 12 Jul 2010, 20:34
Znuny Version: 2.4

Re: Setting up GenericAgent Option Under Admin Settings

Post by arvobowen »

Sorry about that ferrosti, and thanks.
Operating System: Windows Server 2003 x86
Purpose: Information Technology Help Desk
OTRS Version: OTRS 2.4.7
Locked