Odd Errors in RT Log from scrip

To List,

I have a scrip that checks to see if the requestor is also the AdminCc so
that duplicate emails are not sent, The condition is:

Check for Ticket Status changed to “QA approvd”

and cancel if Admin and Requestor is same user

my $trans = $self->TransactionObj;
my $ticket = $self->TicketObj;
my $requestor = $ticket->Requestors->UserMembersObj->First->EmailAddress;

if ($ticket->IsWatcher(Type => ‘AdminCc’, EmailAddress => $requestor)
{
return 0;
}

return ($trans->Type eq “Status” &&
$trans->NewValue eq “QA approvd”);

The action is Notify AdminCc’s

The erro I’m getting on the log is:

[Fri Aug 27 22:48:58 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1510) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:49:04 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1574) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:49:37 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1829) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1756) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1758) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1760) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1762) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:56:28 2010] [warning]: Couldn’t enable user 226
(/opt/rt3/bin/…/lib/RT/User_Overlay.pm:1143)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2318) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2320) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2322) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2324) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2326) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:59:45 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1703) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:00:47 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2108) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:02:32 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1661) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:03:17 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 2472) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:05:04 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1913) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:05:04 2010] [error]: Scrip 50899 IsApplicable failed: syntax
error at (eval 1915) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:05:58 2010] [error]: Group::HasMember was called with an
argument that isn’t an RT::Principal or id. It’s (undefined)
(/opt/rt3/bin/…/lib/RT/Group_Overlay.pm:1046)
[Fri Aug 27 23:05:58 2010] [error]: Group::HasMember was called with an
argument that isn’t an RT::Principal or id. It’s (undefined)
(/opt/rt3/bin/…/lib/RT/Group_Overlay.pm:1046)

Scrip 50899 is the scrip I’m talking about.

Now, my first real BIG question is “Why does it write out so many error
messages for the same scrip”? I mean, that’s a lot of I/O for just one
error.

I am the AdminCc of the Queue AND the Requestor for the ticket being
evaluated.

The scrip worked. No email went out because I’m in both roles. Normally,
just the requestor would get that email.

So, why doesn’t it just write out one error line?

This is just so I can understand what RT is doing in the background here.

Thanks.

Kenn
LBNL

To List,

I have a scrip that checks to see if the requestor is also the AdminCc so that duplicate
emails are not sent, The condition is:

Line 8/9 has an error

1 # Check for Ticket Status changed to “QA approvd”
2 # and cancel if Admin and Requestor is same user
3
4 my $trans = $self->TransactionObj;
5 my $ticket = $self->TicketObj;
6 my $requestor = $ticket->Requestors->UserMembersObj->First->EmailAddress;
7
8 if ($ticket->IsWatcher(Type => ‘AdminCc’, EmailAddress => $requestor)
9 {

which is what the log was telling you

Kevin,

OK. I see that. I was just wondering if there was a way to reduce the number
of error messages. I mean, I only need to see one or two error messages and
I can figure out that it needs work or whatever. But any more than that just
seems redundant. My thinking that less messages would be less I/O and
therefore faster response. Just a thought.

Thanks for your answer. I DO appreciate it!

Kenn
LBNLOn Mon, Aug 30, 2010 at 7:53 AM, Kevin Falcone falcone@bestpractical.comwrote:

On Fri, Aug 27, 2010 at 04:17:45PM -0700, Kenneth Crocker wrote:

To List,

I have a scrip that checks to see if the requestor is also the AdminCc
so that duplicate
emails are not sent, The condition is:

Line 8/9 has an error

1 # Check for Ticket Status changed to “QA approvd”
2 # and cancel if Admin and Requestor is same user
3
4 my $trans = $self->TransactionObj;
5 my $ticket = $self->TicketObj;
6 my $requestor =
$ticket->Requestors->UserMembersObj->First->EmailAddress;
7
8 if ($ticket->IsWatcher(Type => ‘AdminCc’, EmailAddress => $requestor)
9 {

which is what the log was telling you

return 0;
}

return ($trans->Type eq “Status” &&
$trans->NewValue eq “QA approvd”);

The action is Notify AdminCc’s

The erro I’m getting on the log is:

[Fri Aug 27 22:48:58 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1510) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:49:04 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1574) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:49:37 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1829) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1756) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1758) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1760) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:50:07 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1762) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:56:28 2010] [warning]: Couldn’t enable user 226
(/opt/rt3/bin/…/lib/RT/User_Overlay.pm:1143)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2318) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2320) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2322) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2324) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:58:28 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2326) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 22:59:45 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1703) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:00:47 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2108) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:02:32 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1661) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:03:17 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
2472) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:05:04 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1913) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:05:04 2010] [error]: Scrip 50899 IsApplicable failed:
syntax error at (eval
1915) line 9, near “)
{” (/opt/rt3/bin/…/lib/RT/Condition/UserDefined.pm:65)
[Fri Aug 27 23:05:58 2010] [error]: Group::HasMember was called with
an argument that isn’t an
RT::Principal or id. It’s (undefined)
(/opt/rt3/bin/…/lib/RT/Group_Overlay.pm:1046)
[Fri Aug 27 23:05:58 2010] [error]: Group::HasMember was called with
an argument that isn’t an
RT::Principal or id. It’s (undefined)
(/opt/rt3/bin/…/lib/RT/Group_Overlay.pm:1046)

Scrip 50899 is the scrip I’m talking about.

Now, my first real BIG question is “Why does it write out so many
error messages for the same
scrip”? I mean, that’s a lot of I/O for just one error.

I am the AdminCc of the Queue AND the Requestor for the ticket being
evaluated.

The scrip worked. No email went out because I’m in both roles.
Normally, just the requestor
would get that email.

So, why doesn’t it just write out one error line?

This is just so I can understand what RT is doing in the background
here.

Thanks.

Kenn
LBNL

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!

Kevin,

OK. I see that. I was just wondering if there was a way to reduce the number of error
messages. I mean, I only need to see one or two error messages and I can figure out that it
needs work or whatever. But any more than that just seems redundant. My thinking that less
messages would be less I/O and therefore faster response. Just a thought.

From the log, you’re getting one message every time your Scrip is
used. That seems totally reasonable to me.

-kevin

Kevin,

Yes. I suppose. I think that I was wondering why a condition resulting in *what
I wanted it to do was being treated as an error. There are times when I *
want
the condition to exit and that is a good thing, not an error. I guess
I just think of errors as something not working at all, blowing up, a bug. I
don’t see the natural result of a screening condition as an error. I’m
probably looking more to the efficiency of all those message lines being
written for results that are totally within expectations as being a waste of
time (I/O) when it’s doing what I want it to do. That’s a lot of log writing
for a lot of good results. That’s all. But, I guess there isn’t any way
around that.

Kenn
LBNLOn Mon, Aug 30, 2010 at 9:58 AM, Kevin Falcone falcone@bestpractical.comwrote:

On Mon, Aug 30, 2010 at 09:08:45AM -0700, Kenneth Crocker wrote:

Kevin,

OK. I see that. I was just wondering if there was a way to reduce the
number of error
messages. I mean, I only need to see one or two error messages and I
can figure out that it
needs work or whatever. But any more than that just seems redundant.
My thinking that less
messages would be less I/O and therefore faster response. Just a
thought.

From the log, you’re getting one message every time your Scrip is
used. That seems totally reasonable to me.

-kevin

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!

Yes. I suppose. I think that I was wondering why a condition resulting in what I wanted it to
do was being treated as an error. There are times when I want the condition to exit and that

Because you had a syntax error.

Line 9 was if ( ( ) {

That is not valid perl

-kevin

Kevin,

GEEZ! I didn’t see that. What a dummy. Sorry for that. Thanks. Especially
for your patience.

Kenn
LBNLOn Wed, Sep 1, 2010 at 6:43 AM, Kevin Falcone falcone@bestpractical.comwrote:

On Tue, Aug 31, 2010 at 05:53:52PM -0700, Kenneth Crocker wrote:

Yes. I suppose. I think that I was wondering why a condition resulting
in what I wanted it to
do was being treated as an error. There are times when I want the
condition to exit and that

Because you had a syntax error.

Line 9 was if ( ( ) {

That is not valid perl

-kevin

is a good thing, not an error. I guess I just think of errors as
something not working at all,
blowing up, a bug. I don’t see the natural result of a screening
condition as an error. I’m
probably looking more to the efficiency of all those message lines
being written for results
that are totally within expectations as being a waste of time (I/O)
when it’s doing what I
want it to do. That’s a lot of log writing for a lot of good results.
That’s all. But, I guess
there isn’t any way around that.

Kenn
LBNL

On Mon, Aug 30, 2010 at 9:58 AM, Kevin Falcone <[1] falcone@bestpractical.com> wrote:

 On Mon, Aug 30, 2010 at 09:08:45AM -0700, Kenneth Crocker wrote:
 > Kevin,
 >
 > OK. I see that. I was just wondering if there was a way to reduce

the number of error

 > messages. I mean, I only need to see one or two error messages and

I can figure out that

 it
 > needs work or whatever. But any more than that just seems

redundant. My thinking that less

 > messages would be less I/O and therefore faster response. Just a

thought.

 From the log, you're getting one message every time your Scrip is
 used. That seems totally reasonable to me.
 -kevin

 RT Training in Washington DC, USA on Oct 25 & 26 2010
 Last one this year -- Learn how to get the most out of RT!

References

Visible links

  1. mailto:falcone@bestpractical.com

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!

RT Training in Washington DC, USA on Oct 25 & 26 2010
Last one this year – Learn how to get the most out of RT!