Can't create PID GenericAgent, because it's already running

Moderator: crythias

Locked
KamZor
Znuny newbie
Posts: 22
Joined: 16 Dec 2010, 16:24
Znuny Version: 3.0.3

Can't create PID GenericAgent, because it's already running

Post by KamZor »

Hello,

I'm having some troubles with my OTRS instance.
My environment : Linux Debian Lenny, OTRS 3.0.4

Sometimes there's a freeze and users (customers and agents) can't access to the otrs's website.
I found some entriers in the OTRS's System Logs pannel, and i think we can connect the problem and these logs :

Code: Select all

Mon Jan 17 09:00:03 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11549)!
Mon Jan 17 08:40:03 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11457)!
Mon Jan 17 08:20:02 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11385)!
Mon Jan 17 08:00:02 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11296)!
Mon Jan 17 07:40:02 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11210)!
Mon Jan 17 07:20:02 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11122)!
Mon Jan 17 07:00:02 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/11041)!
Mon Jan 17 06:40:02 2011 	notice 	OTRS-otrs.GenericAgent.pl-02 	Can't create PID GenericAgent, because it's already running (support.monsite.net/10957)!
As you can see the error log shows up each 20 minutes.
Each time the cron line : GenericAgent.pl is launched.

Any ideas ?
Thanks in advance.
KamZor
Znuny newbie
Posts: 22
Joined: 16 Dec 2010, 16:24
Znuny Version: 3.0.3

Re: Can't create PID GenericAgent, because it's already runn

Post by KamZor »

^UP^
Wolfgangf
Znuny ninja
Posts: 1029
Joined: 13 Apr 2009, 12:26
Znuny Version: 6.0.13
Real Name: Wolfgang Fürtbauer
Company: PBS Logitek GmbH
Location: Pinsdorf

Re: Can't create PID GenericAgent, because it's already runn

Post by Wolfgangf »

have you tried to remove the PID once manually?
Produktiv:
OTRS 6.0.13/ ITSM 6.0.13
OS: SUSE Linux (SLES 12, Leap), MySql 5.5.x, 5.6.x
Windows 2012 AD Integration (agents and customers), Nagios integration (incidents, CMDB), Survey, TimeAccounting
uleodolter
Znuny newbie
Posts: 1
Joined: 15 Nov 2010, 14:59
Znuny Version: 3.01

Re: Can't create PID GenericAgent, because it's already runn

Post by uleodolter »

hi,

we have the same problem on otrs 3.0.5

i think its because of cron staring GenericAgent.pl in parallel.

this are the two default crontab entries, so every 20 minutes
otrs.GenericAgent.pl is started twice.

# start generic agent every 20 minutes
*/20 * * * * $HOME/bin/otrs.GenericAgent.pl >> /dev/null
# start generic agent every 10 minutes
*/10 * * * * $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null

in older otrs version 2.2.x i found that GenericAgent.pl PID locking
is only used when "-c db" option was given.

i am unsure it the current implementation is a bug or if
the crontab entry needs to be changed like:

# start generic agent every 20 minutes
5,25,45 * * * * $HOME/bin/otrs.GenericAgent.pl >> /dev/null
# start generic agent every 10 minutes
*/10 * * * * $HOME/bin/otrs.GenericAgent.pl -c db >> /dev/null

best regards
ulrich
keithf4
Znuny newbie
Posts: 23
Joined: 28 Jan 2011, 23:01
Znuny Version: 3.0.5

Re: Can't create PID GenericAgent, because it's already runn

Post by keithf4 »

Still happening in 3.0.6 (fresh install). The above change to the crontab stopped the error from showing up in the syslog. Thanks uleodolter!
OTRS 3.0.7 | Ubuntu 10.04 LTS | Postgresql 8.4.7
Locked