"rt-fulltext-indexer is already running" problem on solaris (flock)

Hi everybody,

we setup a new rt 4.2.12 system and tried to follow the instructions for
the native mysql full text search [1], but I failed always with the following
command:

/opt/rt4/sbin/rt-fulltext-indexer
/opt/rt4/sbin/rt-fulltext-indexer is already running; aborting silently, as requested (/opt/rt4/sbin/rt-fulltext-indexer:93)

The code [2] does not work for our solaris [3]. It’s because perl@solaris handle ‘flock’ in an unusual way [5] (you can ask google…)

So, after unsuccessfully trying to fix solaris/perl,
we patched rt-fulltext-indexer [4]. Now the fulltext search works fine.

Maybe somebody will help this information in the future.

best regards
Danny

[1] https://www.bestpractical.com/docs/rt/4.2.12/full_text_indexing.html#Native-MySQL
[2] rt-fulltext-indexer:91
if ( !flock main::DATA, LOCK_EX | LOCK_NB ) {
[3] SunOS z-rt4app-a 5.11 11.2 sun4v sparc sun4v
[4] patch
root@z-rt4app-a: # diff rt-fulltext-indexer.org.20151202 rt-fulltext-indexer
91c91,93
< if ( !flock main::DATA, LOCK_EX | LOCK_NB ) {
> open SELF, “+> /tmp/rt-fulltext-indexer.lock” or die ;
> unless (flock SELF, LOCK_EX | LOCK_NB) {
> #if ( !flock main::DATA, LOCK_EX | LOCK_NB ) {

[5] http://www.perlmonks.org/bare/?node_id=256020
http://www.nntp.perl.org/group/perl.perl5.porters/2006/01/msg108851.html

best regards
Danny

smime.p7s (2.23 KB)

Hello everybody,

suddenly, when someone replys to an existing ticket, the reply opens a
new ticket instead of merging the reply.

A few days ago, this worked perfectly.

I already googled, and checked differernt things, but as I did not had
changed anything, I don’t know what I could do.

In my logfiles, I discovered

Dec 16 18:47:50 rt RT: [19265] Impossible to assign the ticket to 6223:
That user may not own tickets in that queue
Dec 16 18:47:50 rt RT: [19265] Rollback and commit are mixed while
escaping nested transaction at
/usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 845.

No rights were changed, though. It seems like RT cannot assign the
ticket to an ad hoc user (here: 6223, although this user cannot be found
in RT). This user number is increased with every ticket.

Does anyone have a clue where I could start my error search?

Any help is appreciated.

Thanks in advance and regards, Patrick

Hello,

partly resolved.

The issue “Impossible to assign the ticket…” came from a scrip “Auto
set Owner” on create.

It was

| # get actor ID
| my $Actor = $self->TransactionObj->Creator;
|
| # if actor is RT_SystemUser then get out of here
| return 1 if $Actor == $RT::SystemUser->id;
|
| # get out unless ticket owner is nobody
| return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
|
| # ok, try to change owner
| $RT::Logger->info(“Auto assign ticket #”. $self->TicketObj->id ." to
user #". $Actor );
| my ($status, $msg) = $self->TicketObj->SetOwner( $Actor );
| unless( $status ) {
| $RT::Logger->error( “Impossible to assign the ticket to $Actor:
$msg” );
| return undef;
| }
| return 1;

and the error was triggered. It needed

| return 1 unless $self->TransactionObj->CreatorObj->Privileged;

to get out if the owner is unprivileged.

It worked without that earlier. Anyway.

The main problem had nothing to do with that. Trial and error, I
discovered that when removing the subject mark for a queue, replys to
existing tickets were merged into the ticket.
When the subjet mark was set after that, it worked also.

So: The subject tag removal fixed the error, but re-adding the subject
tag did not re-add the error.

Regards, pgsAm 16.12.2015 um 18:57 schrieb Patrick G. Stoesser:

Hello everybody,

suddenly, when someone replys to an existing ticket, the reply opens a
new ticket instead of merging the reply.

A few days ago, this worked perfectly.

I already googled, and checked differernt things, but as I did not had
changed anything, I don’t know what I could do.

In my logfiles, I discovered

Dec 16 18:47:50 rt RT: [19265] Impossible to assign the ticket to 6223:
That user may not own tickets in that queue
Dec 16 18:47:50 rt RT: [19265] Rollback and commit are mixed while
escaping nested transaction at
/usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 845.

No rights were changed, though. It seems like RT cannot assign the
ticket to an ad hoc user (here: 6223, although this user cannot be found
in RT). This user number is increased with every ticket.

Does anyone have a clue where I could start my error search?

Any help is appreciated.

Thanks in advance and regards, Patrick

And: My thread here was not intended as a reply to Daniel Schwagers
message. Unfortunately, I did not compose a new message from scratch…
Sorry for that.

mfg, pgsAm 16.12.2015 um 21:16 schrieb Patrick G. Stoesser:

Hello,

partly resolved.

The issue “Impossible to assign the ticket…” came from a scrip “Auto
set Owner” on create.

It was

| # get actor ID
| my $Actor = $self->TransactionObj->Creator;
|
| # if actor is RT_SystemUser then get out of here
| return 1 if $Actor == $RT::SystemUser->id;
|
| # get out unless ticket owner is nobody
| return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
|
| # ok, try to change owner
| $RT::Logger->info(“Auto assign ticket #”. $self->TicketObj->id ." to
user #". $Actor );
| my ($status, $msg) = $self->TicketObj->SetOwner( $Actor );
| unless( $status ) {
| $RT::Logger->error( “Impossible to assign the ticket to $Actor:
$msg” );
| return undef;
| }
| return 1;

and the error was triggered. It needed

| return 1 unless $self->TransactionObj->CreatorObj->Privileged;

to get out if the owner is unprivileged.

It worked without that earlier. Anyway.

The main problem had nothing to do with that. Trial and error, I
discovered that when removing the subject mark for a queue, replys to
existing tickets were merged into the ticket.
When the subjet mark was set after that, it worked also.

So: The subject tag removal fixed the error, but re-adding the subject
tag did not re-add the error.

Regards, pgs

Am 16.12.2015 um 18:57 schrieb Patrick G. Stoesser:

Hello everybody,

suddenly, when someone replys to an existing ticket, the reply opens a
new ticket instead of merging the reply.

A few days ago, this worked perfectly.

I already googled, and checked differernt things, but as I did not had
changed anything, I don’t know what I could do.

In my logfiles, I discovered

Dec 16 18:47:50 rt RT: [19265] Impossible to assign the ticket to 6223:
That user may not own tickets in that queue
Dec 16 18:47:50 rt RT: [19265] Rollback and commit are mixed while
escaping nested transaction at
/usr/share/perl5/DBIx/SearchBuilder/Handle.pm line 845.

No rights were changed, though. It seems like RT cannot assign the
ticket to an ad hoc user (here: 6223, although this user cannot be found
in RT). This user number is increased with every ticket.

Does anyone have a clue where I could start my error search?

Any help is appreciated.

Thanks in advance and regards, Patrick