[rt-users] RT 4.2 mysql/postgres migration

2013-12-18 Thread Matthias Peplow
Hi,

I am curious if somebody already tried a mysql/postgres migration in RT 4.2.

From what I read in the docs the intended way to accomplish this task is to 
dump the mysql database using the rt-serializer command and importing the dump 
using rt-importer to a new instance.

In detail I would try the following:

apachectl stop; service fetchmaild stop

rt-validator --check  rt-serializer —clone  --directory 
path/to/export/directory

making appropriate changes to RT_SiteConfig.pm (changing Database engine from 
mysql to pgsql)

rt-importer path/to/export/directory

apachectl start

checking if everything looks as before

service fetchmaild start


Am I missing something or should the migration basically work as described?

Regards,

Matthias


Matthias Peplow
IT Director
Scholz  Friends Berlin GmbH

Tel.: +49 30/70 01 86-532
Fax: +49 30/70 01 86-599
matthias.pep...@s-f.com

Litfaß-Platz 1
10178 Berlin
Germany

Scholz  Friends
The Orchestra of Ideas
http://www.s-f.com



Re: [rt-users] Reply text box slow to load

2013-12-18 Thread Marius Flage
On 12/17/2013 08:26 PM, Kevin Falcone wrote:

 While this confirms that something is taking a long time to load,
 the consistent 15 seconds on each request is quite odd, especially
 since larger files take mere milliseconds to download.
 
 Are you using JSMin?  How is your RT configured, etc, etc. If you
 can replicate these timings on issues.bestpractical.com it would be
 interesting.

I'm not sure if I'm using JSMin.. What is it? How do I determine that?

Basically what I did was upgrade from version 4.0.7 (the version
that's included in Debian Squeeze) to 4.2.1 from source. So I then
just took the database from that Debian installation and upgraded
that. The package installed is installed system-wide and the source
code is installed in /opt/rt4 .

The web is configured with the following configuration:

FastCgiServer /opt/rt4/sbin/rt-server.fcgi -processes 5 -idle-timeout 300

VirtualHost *:80
Servername fqdn for the server
ServerAdmin webmaster@domain

AddDefaultCharset UTF-8
ScriptAlias / /opt/rt4/sbin/rt-server.fcgi/

DocumentRoot /opt/rt4/share/html
Location /
Order allow,deny
Allow from all

Options +ExecCGI
AddHandler fastcgi-script fcgi
/Location

CustomLog /var/log/apache2/fqdn_access.log combined
ErrorLog /var/log/apache2/fqdn_error.log

/VirtualHost

Here's the /opt/rt4/etc/RT_SiteConfig.pm:

Set( $Timezone, 'Europe/Oslo');
Set( $rtname, 'fqdn');
Set( $Organization, 'domain');
Set( $WebDomain, 'fqdn');
Set( $CorrespondAddress, 'primary email');
Set( $CommentAddress, 'primary comment');

Set( $WebPath, );
Set( $WebBaseURL, http://fqdn);

Set ($MessageBoxRichText, 1);

Set( $PreferRichText, true);
Set( $MaxInlineBody, 0);

Set( $DatabaseName, rtdb);
Set( $DatabaseUser, rt);
Set( $DatabasePassword, password);
Set( $DatabaseHost, localhost);

Set( %GnuPG,
Enable = 1,
);

# You must install Plugins on your own, this is only an example
# of the correct syntax to use when activating them.
# Plugin( RT::Extension::QuickDelete );
# Plugin( RT::Extension::CommandByMail );

Set(@Plugins, qw(RT::Extension::AdminConditionsAndActions));

Regarding the rest of the environment this is then running on Debian
Squeeze 6.0.7 in a virtual environment.

Do you need anything else?

- Marius


[rt-users] RTIR for RT 4.2.x

2013-12-18 Thread Alex Young
I'm assuming that the current 3.0 version of RTIR isn't compatible with RT 
4.2.x at the moment. When can we expect to see a release of RTIR compatible 
with the currently version of RT?

Thanks.


[rt-users] RTIR for RT 4.2.x

2013-12-18 Thread Alex Young
I'm assuming that the current 3.0 version of RTIR isn't compatible with RT 
4.2.x at the moment. When can we expect to see a release of RTIR compatible 
with the currently version of RT?

Thanks.


Re: [rt-users] Excessive communication between RT and postgresql

2013-12-18 Thread Jacobsson, Henrik G
We upgraded from 4.0.17.

Yes. Stopping RT stopped the WAL generation. Continued as if nothing happened 
when started up again.

The mail into the system should be quite negligible in this case since that 
would make the database grow in roughly the same pace as the WAL log 
generation, but the database has grown only 200M while there has been written 
more than 500G of WAL.

pg_xlogdump shows that more than 99% of the activity is due to inserts, deletes 
and subsequent vacuuming on rt4.sessions and corresponding toast tables.

Regards
//Henrik


--
Confidentiality Notice: This message is private and may contain confidential 
and proprietary information. If you have received this message in error, please 
notify us and remove it from your system and note that you must not copy, 
distribute or take any action in reliance on it. Any unauthorized use or 
disclosure of the contents of this message is not permitted and may be unlawful.
 
-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Alex Vandiver
Sent: den 16 december 2013 23:17
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Excessive communication between RT and postgresql

On Mon, 2013-12-16 at 13:58 +, Jacobsson, Henrik G wrote:
 After upgrading to RT 4.2.1, the postgresql database is producing
 massive volumes of WAL files around the clock with peaks during office
 hours.

And what version were you upgrading from?

 Before the upgrade – we had very limited volumes of WAL files
 produced, and nothing at all during non work hours. Now – at least
 32MB, but usually 64MB of WAL is written every minute, when the system
 is supposed to be quiet.

Does that output cease if you temporarily turn off the webserver?  What about 
if you disable your incoming MTA?

 Should there be any traffic at all between the RT server and database
 server when the system is not in use? Apart from occasional handshakes
 etc.

Depends what you mean by in use.  RT has no long-running programs aside from 
the web front-end; as such, requests to the database are only generated by 
requests to Apache, or the cron jobs.  At times when there are no Apache 
requests and no cron jobs, there should be no significant database traffic.

Bear in mind that even if no _users_ are accessing the website, incoming email 
gets POST'ed to the mail gateway endpoint, which may account for some of the 
activity when you believe the system is not in use.

It may be enlightening to examine the generated WAL logs using 
http://www.postgresql.org/docs/current/static/pgxlogdump.html
 - Alex




Re: [rt-users] RTIR for RT 4.2.x

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 11:14:50AM +, Alex Young wrote:
 I'm assuming that the current 3.0 version of RTIR isn't compatible with RT 
 4.2.x at the moment. When can we expect to see a release of RTIR compatible 
 with the currently version of RT?

This is now the third time you've sent this mail to the list.
I answered it the first time.

-kevin


pgpLxTMp9jbuh.pgp
Description: PGP signature


[rt-users] Owner mail on login page.

2013-12-18 Thread Albert Shih
Hi all, 

I would like to known how can I disable the Owner mail on login page (new
in 4.2.x)

It's very important for us because with this information 50% of the user
going to send a email directly to this address.

Regards.

JAS

-- 
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
mer 18 déc 2013 17:18:04 CET


[rt-users] RT 4.2.1 problem with Preference

2013-12-18 Thread Albert Shih
Hi,

I got a bug with preferences pages. When I go into (I have all right) I got
this message on the web interface : 

General

 Default queue
 Remember default queue Yes No Use default (No)
 Username format
 Use autocomplete to find owners? Yes No Use default (No) Replaces the
 owner dropdowns with textboxes
 Theme
 Include time in iCal feed events? Yes No Use default (No) Formats iCal
 feed events with date and time
 Search results refresh interval 


An internal RT error has occurred. Your administrator can find more details
in RT's log files.

and inside log I got this message : 

Dec 18 17:26:09 my_hostname RT: [3489] Invalid offset: FR Stack:
[/usr/local/lib/perl5/site_perl/5.16/DateTime/TimeZone/OffsetOnly.pm:27]
[/usr/local/lib/perl5/site_perl/5.16/DateTime/TimeZone.pm:64]
[/usr/local/lib/perl5/site_perl/5.16/mach/DateTime.pm:232]
[/usr/local/lib/perl5/site_perl/5.16/mach/DateTime.pm:206]
[/usr/local/lib/perl5/site_perl/5.16/RT/Date.pm:793]
[/usr/local/lib/perl5/site_perl/5.16/RT/Date.pm:637]
[/usr/local/lib/perl5/site_perl/5.16/RT/Config.pm:469]
[/usr/local/share/rt42/html/Widgets/FinalizeWidgetArguments:51]
[/usr/local/share/rt42/html/Prefs/Other.html:58]
[/usr/local/share/rt42/html/Widgets/TitleBox:56]
[/usr/local/share/rt42/html/Prefs/Other.html:67]
[/usr/local/lib/perl5/site_perl/5.16/RT/Interface/Web.pm:680]
[/usr/local/lib/perl5/site_perl/5.16/RT/Interface/Web.pm:368]
[/usr/local/share/rt42/html/autohandler:53]

I'm running RT 4.2.1 on FreeBSD upgraded from RT 4.0.18 without any error.

Regards.

JAS
-- 
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
mer 18 déc 2013 17:26:43 CET


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Kevin Falcone
On Tue, Dec 17, 2013 at 02:53:53PM -0500, Adam Hobaugh wrote:
 I just updated from 4.0.10 to 4.2.1 and it seems to be working well
 except when I am in a ticket, any page that shows a user drop down,
 ie display and people load incredible slowly. I enabled slow query
 logging and below are the two queries that appear to be causing the
 problem. I appreciate any help in resolving this. 10 second load
 times is rough. Please let me know what further information is
 needed.

The slow query logs are most helpful when you then run EXPLAIN on the
query so you know why the database is having trouble.

Since your list is short (5 rows sent) rather than 500, you're
unlikely to have the common error someone else was pointing you at
where you grant OwnTicket too widely.  RT 4.2 also has a workaround
for this case.

Do you grant your OwnTicket rights out to groups per queue, roles per
queue.  Do you assign lots of Ticket level use groups (adminccs/ccs,
etc) which then pick up OwnTicket?

-kevin

 
 # Time: 131217 14:42:38
 # User@Host: rt_user[rt_user] @ ticket.cs.pitt.edu [136.142.23.83]
 # Query_time: 9  Lock_time: 0  Rows_sent: 5  Rows_examined: 175403
 SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL ACL_3 JOIN
 Principals Principals_1  ON ( Principals_1.id = main.id ) JOIN
 CachedGroupMembers CachedGroupMembers_2  ON (
 CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN
 CachedGroupMembers CachedGroupMembers_4  ON (
 CachedGroupMembers_4.MemberId = Principals_1.id )  WHERE
 ((ACL_3.ObjectType = 'RT::Queue' AND ACL_3.ObjectId   = 3) OR
 (ACL_3.ObjectType = 'RT::System') OR (ACL_3.ObjectType = 'RT::Queue'
 AND ACL_3.ObjectId   = 3) OR (ACL_3.ObjectType = 'RT::System')) AND
 (ACL_3.PrincipalId = CachedGroupMembers_4.GroupId) AND
 (ACL_3.PrincipalType = 'Group') AND (ACL_3.RightName = 'OwnTicket'
 OR ACL_3.RightName = 'SuperUser') AND (CachedGroupMembers_2.Disabled
 = '0') AND (CachedGroupMembers_2.GroupId = '4') AND
 (CachedGroupMembers_4.Disabled = '0') AND (Principals_1.Disabled =
 '0') AND (Principals_1.PrincipalType = 'User') AND (Principals_1.id
 != '1')  ORDER BY main.Name ASC;
 # Time: 131217 14:42:48
 # User@Host: rt_user[rt_user] @ ticket.cs.pitt.edu [136.142.23.83]
 # Query_time: 8  Lock_time: 0  Rows_sent: 5  Rows_examined: 175403
 SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL ACL_3 JOIN
 Principals Principals_1  ON ( Principals_1.id = main.id ) JOIN
 CachedGroupMembers CachedGroupMembers_2  ON (
 CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN
 CachedGroupMembers CachedGroupMembers_4  ON (
 CachedGroupMembers_4.MemberId = Principals_1.id )  WHERE
 ((ACL_3.ObjectType = 'RT::Ticket' AND ACL_3.ObjectId   = 35402) OR
 (ACL_3.ObjectType = 'RT::Queue' AND ACL_3.ObjectId   = 3) OR
 (ACL_3.ObjectType = 'RT::System') OR (ACL_3.ObjectType =
 'RT::Ticket' AND ACL_3.ObjectId   = 35402) OR (ACL_3.ObjectType =
 'RT::Queue' AND ACL_3.ObjectId   = 3) OR (ACL_3.ObjectType =
 'RT::System')) AND (ACL_3.PrincipalId =
 CachedGroupMembers_4.GroupId) AND (ACL_3.PrincipalType = 'Group')
 AND (ACL_3.RightName = 'OwnTicket' OR ACL_3.RightName = 'SuperUser')
 AND (CachedGroupMembers_2.Disabled = '0') AND
 (CachedGroupMembers_2.GroupId = '4') AND
 (CachedGroupMembers_4.Disabled = '0') AND (Principals_1.Disabled =
 '0') AND (Principals_1.PrincipalType = 'User') AND (Principals_1.id
 != '1')  ORDER BY main.Name ASC;
 


pgpxrlrab1s73.pgp
Description: PGP signature


Re: [rt-users] ExecuteCode by Queue AdminCc groups on RT::System

2013-12-18 Thread Kevin Falcone
On Tue, Dec 17, 2013 at 11:00:35PM +0100, Kai Storbeck wrote:
 My production system contains a few ACL's that do not dump correctly
 using rt-dump-metadata. They end up multiple times in our dump as:
 
   {
  Right : ExecuteCode,
  GroupDomain : RT::System-Role,
  GroupType : AdminCc
   },
 
 (In JSON for readability)
 
 These are in reality applied to the AdminCC group principal of queues.
 
 What is the bug here?
 
 Is it that I should be able to see such a right in the Global rights
 page, or should the right not have been granted since the upgrade step
 (3.9.1 iirc)?
 (It is a bit of a weird delegation of rights, but a few of our AdminCc
 groups have indeed the right to edit templates).

Looking briefly in the ACL dumping code, it says this:

elsif ( /^RT::Group$/ ) {
# No support for RT::Group ACLs in RT::Handle yet.
next OBJECT;
}

which implies to me that it has no idea how to handle your rights.

-kevin


pgphMoMh5KY3H.pgp
Description: PGP signature


Re: [rt-users] installing rt tracker with a screen reader

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 03:54:23PM -0800, Marvin Hunkin wrote:
And using this software.
 
And using the jaws for windows screen reader from 
 [1]http://www.freedomscientific.com
 
Now.
 
How do I install this software and then configure.
 
Using windows 7 pro 32 bit, firefox 25, and internet explorer 11.

You cannot install RT using just a web browser.
The RT README in the tarball and available on the web here cover basic
installation instructions.  
http://bestpractical.com/docs/rt/latest/README.html

Your screen reader will need to be
compatible with the terminal emulator you choose to use to connect to
your installation source (RT does not install onto Windows).

-kevin


pgpzjQzu8fyda.pgp
Description: PGP signature


Re: [rt-users] rt 4.2.1 error: Internal Server Error

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 02:15:05AM -0500, supp...@pureview.com wrote:
 Any one can help me to find the issues here.
 
 RH6
 Oracle as DB
 fastcgi

Does RT_Config.pm exist in /opt/rt4/etc
Is it readable by the web user (su to the web user and try to read it)
Do you have anything like SELinux which would prevent reading of the
file.

-kevin

 Can't locate RT_Config.pm in @INC (@INC contains: /opt/rt4/local/etc
 /opt/rt4/etc /opt/rt4/sbin/../local/lib /opt/rt4/sbin/../lib
 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl
 /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at
 /opt/rt4/sbin/../lib/RT/Config.pm line 1063.


pgpN3jeNpg2QI.pgp
Description: PGP signature


Re: [rt-users] Chart and Show Results not showing correct query

2013-12-18 Thread Kevin Falcone
On Tue, Dec 17, 2013 at 09:12:17PM +, Richard McMahon wrote:
 
 I have been using the Chart option in RT 3.8. When I click on Show
 Results a different query is shown e.g. the most recent other saved
 query.

RT 3.8 is no longer receiving anything other than security bugfixes.
You also don't specify which version of 3.8 you're running, but it's
quite likely that some of your complaints have been addressed in the
new charting in 4.2.

If you can replicate these bugs on 4.2, please let us know.

-kevin

 Also, it would be useful if the Total result in the table on the
 Chart executed the full query. See attached chart.
 
 Related to the above is the ability to edit the query than creates
 a chart. I get inconsistent results so it looks like the query
 linked to a saved Chart might be a clone of the query run when the
 Chart is saved.
 
 thanks Richard
 




pgpzEULhpBC9g.pgp
Description: PGP signature


Re: [rt-users] How to create a new condition through the web gui

2013-12-18 Thread Kevin Falcone
On Tue, Dec 17, 2013 at 10:49:49PM +0100, Marius Flage wrote:
 Den 17.12.2013 20:19, skrev Kevin Falcone:
 
 You may find it easier to use the new extension we blogged about,
 instead of User Defined scrips/actions
 
 http://blog.bestpractical.com/2013/12/new-web-ui-for-rt-actions-and-conditions.html
 
 This extension looks very nice and shiny and I just added it to my
 RT, but I still have no idea how to use it :) And especially not for
 my example. The example I found uses raw perl code that returns 0/1
 depending on some variables, but recreating this using just the five
 text input fields provided by the extension seems impossible.. ?

If you wish to be able to copy/paste the code you found, you'll use a
User Defined condition as explained by someone else in this thread.

If you want to use this extension, you'll need to review the blog post
and the documentation of the extension.

-kevin

 What should I enter for Condition Module, Parameters to Pass and
 Applicable Transaction Types? The Perl snippet seems to first
 check TransactionObj if the transaction type is Create, if not
 it'll return 0. Then it will check if it's the first transaction and
 finally it'll check for a header Received. Replicating this in 5
 text input fields seems impossible :)


pgp3mk6gYiQTR.pgp
Description: PGP signature


Re: [rt-users] RT 4.2 mysql/postgres migration

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 09:03:37AM +0100, Matthias Peplow wrote:
 Hi,
 
 I am curious if somebody already tried a mysql/postgres migration in RT 4.2.
 
 From what I read in the docs the intended way to accomplish this task is to 
 dump the mysql database using the rt-serializer command and importing the 
 dump using rt-importer to a new instance.
 
 In detail I would try the following:
 
 apachectl stop; service fetchmaild stop
 
 rt-validator --check  rt-serializer —clone  --directory 
 path/to/export/directory

You may also need to rt-validator --check --resolve if it finds
anything.

 making appropriate changes to RT_SiteConfig.pm (changing Database engine from 
 mysql to pgsql)
 
 rt-importer path/to/export/directory
 
 apachectl start
 
 checking if everything looks as before
 
 service fetchmaild start

I've made a number of bug fixes which we are in the process of
merging.  I suspect that the tip of 4.2 trunk and/or 4.2.2 will
perform better and deal with potentially bad data lurking in your
MySQL database better than the Migrator available in 4.2.1 right now.

We do have reports of people successfully running it, but you may run
into bugs I've already fixed.

-kevin


pgpyBHIj9ou4Y.pgp
Description: PGP signature


Re: [rt-users] RT 4.2.1 problem with Preference

2013-12-18 Thread Albert Shih
 Le 18/12/2013 à 17:29:07+0100, Albert Shih a écrit
 Hi,
 
 I got a bug with preferences pages. When I go into (I have all right) I got
 this message on the web interface : 
 
 General
 
  Default queue
  Remember default queue Yes No Use default (No)
  Username format
  Use autocomplete to find owners? Yes No Use default (No) Replaces the
  owner dropdowns with textboxes
  Theme
  Include time in iCal feed events? Yes No Use default (No) Formats iCal
  feed events with date and time
  Search results refresh interval 
 
 
 An internal RT error has occurred. Your administrator can find more 
 details
 in RT's log files.
 
 and inside log I got this message : 
 
 Dec 18 17:26:09 my_hostname RT: [3489] Invalid offset: FR Stack:
 [/usr/local/lib/perl5/site_perl/5.16/DateTime/TimeZone/OffsetOnly.pm:27]
 [/usr/local/lib/perl5/site_perl/5.16/DateTime/TimeZone.pm:64]
 [/usr/local/lib/perl5/site_perl/5.16/mach/DateTime.pm:232]
 [/usr/local/lib/perl5/site_perl/5.16/mach/DateTime.pm:206]
 [/usr/local/lib/perl5/site_perl/5.16/RT/Date.pm:793]
 [/usr/local/lib/perl5/site_perl/5.16/RT/Date.pm:637]
 [/usr/local/lib/perl5/site_perl/5.16/RT/Config.pm:469]
 [/usr/local/share/rt42/html/Widgets/FinalizeWidgetArguments:51]
 [/usr/local/share/rt42/html/Prefs/Other.html:58]
 [/usr/local/share/rt42/html/Widgets/TitleBox:56]
 [/usr/local/share/rt42/html/Prefs/Other.html:67]
 [/usr/local/lib/perl5/site_perl/5.16/RT/Interface/Web.pm:680]
 [/usr/local/lib/perl5/site_perl/5.16/RT/Interface/Web.pm:368]
 [/usr/local/share/rt42/html/autohandler:53]
 
 I'm running RT 4.2.1 on FreeBSD upgraded from RT 4.0.18 without any error.
 

Find the problem, 

It's because I use old configuration of RT (4.0.18) and 

Set($Timezone , 'FR');

is not correct. 

It should be (maybe since the begining) :

Set($Timezone , 'CET');

Regards.
-- 
Albert SHIH
DIO bâtiment 15
Observatoire de Paris
5 Place Jules Janssen
92195 Meudon Cedex
France
Téléphone : +33 1 45 07 76 26/+33 6 86 69 95 71
xmpp: j...@obspm.fr
Heure local/Local time:
mer 18 déc 2013 18:11:33 CET


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Adam Hobaugh

On 12/18/2013 11:43 AM, Kevin Falcone wrote:

On Tue, Dec 17, 2013 at 02:53:53PM -0500, Adam Hobaugh wrote:

I just updated from 4.0.10 to 4.2.1 and it seems to be working well
except when I am in a ticket, any page that shows a user drop down,
ie display and people load incredible slowly. I enabled slow query
logging and below are the two queries that appear to be causing the
problem. I appreciate any help in resolving this. 10 second load
times is rough. Please let me know what further information is
needed.

The slow query logs are most helpful when you then run EXPLAIN on the
query so you know why the database is having trouble.

Here is the EXPLAIN for the two queries.

mysql EXPLAIN SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL 
ACL_3 JOIN Principals Principals_1  ON ( Principals_1.id = main.id ) 
JOIN CachedGroupMembers CachedGroupMembers_2  ON ( 
CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN 
CachedGroupMembers CachedGroupMembers_4  ON ( 
CachedGroupMembers_4.MemberId = Principals_1.id )  WHERE 
((ACL_3.ObjectType = 'RT::Queue' AND ACL_3.ObjectId   = 3) OR 
(ACL_3.ObjectType = 'RT::System') OR (ACL_3.ObjectType = 'RT::Queue' AND 
ACL_3.ObjectId   = 3) OR (ACL_3.ObjectType = 'RT::System')) AND 
(ACL_3.PrincipalId = CachedGroupMembers_4.GroupId) AND 
(ACL_3.PrincipalType = 'Group') AND (ACL_3.RightName = 'OwnTicket' OR 
ACL_3.RightName = 'SuperUser') AND (CachedGroupMembers_2.Disabled = '0') 
AND (CachedGroupMembers_2.GroupId = '4') AND 
(CachedGroupMembers_4.Disabled = '0') AND (Principals_1.Disabled = '0') 
AND (Principals_1.PrincipalType = 'User') AND (Principals_1.id != '1')  
ORDER BY main.Name ASC;

++-+--+++-+-+---+--+---+
| id | select_type | table| type   | 
possible_keys  | key 
| key_len | ref   | rows | 
Extra |

++-+--+++-+-+---+--+---+
|  1 | SIMPLE  | CachedGroupMembers_2 | range  | 
DisGrouMem,CachedGroupMembers3,cachedgroupmembers1 | DisGrouMem  
| 10  | NULL  |  264 | Using where; 
Using index; Using temporary; Using filesort |
|  1 | SIMPLE  | main | eq_ref | 
PRIMARY| PRIMARY 
| 4   | rt4_2_1.CachedGroupMembers_2.MemberId |1 
|   |
|  1 | SIMPLE  | Principals_1 | eq_ref | 
PRIMARY| PRIMARY 
| 4   | rt4_2_1.main.id   |1 | Using where; 
Distinct |
|  1 | SIMPLE  | CachedGroupMembers_4 | ref| 
DisGrouMem,CachedGroupMembers3,cachedgroupmembers1 | CachedGroupMembers3 
| 5   | rt4_2_1.CachedGroupMembers_2.MemberId |1 | Using where; 
Distinct |
|  1 | SIMPLE  | ACL_3| range  | 
ACL1   | ACL1
| 85  | NULL  |   13 | Using where; 
Using index; Distinct|

++-+--+++-+-+---+--+---+
5 rows in set (0.01 sec)

mysql EXPLAIN SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL 
ACL_3 JOIN Principals Principals_1  ON ( Principals_1.id = main.id ) 
JOIN CachedGroupMembers CachedGroupMembers_2  ON ( 
CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN 
CachedGroupMembers CachedGroupMembers_4  ON ( 
CachedGroupMembers_4.MemberId = Principals_1.id )  WHERE 
((ACL_3.ObjectType = 'RT::Ticket' AND ACL_3.ObjectId   = 35402) OR 
(ACL_3.ObjectType = 'RT::Queue' AND ACL_3.ObjectId   = 3) OR 
(ACL_3.ObjectType = 'RT::System') OR (ACL_3.ObjectType = 'RT::Ticket' 
AND ACL_3.ObjectId   = 35402) OR (ACL_3.ObjectType = 'RT::Queue' AND 
ACL_3.ObjectId   = 3) OR (ACL_3.ObjectType = 'RT::System')) AND 
(ACL_3.PrincipalId = CachedGroupMembers_4.GroupId) AND 
(ACL_3.PrincipalType = 'Group') AND (ACL_3.RightName = 'OwnTicket' OR 
ACL_3.RightName = 'SuperUser') AND (CachedGroupMembers_2.Disabled = '0') 
AND (CachedGroupMembers_2.GroupId = '4') AND 
(CachedGroupMembers_4.Disabled = '0') AND (Principals_1.Disabled = '0') 
AND (Principals_1.PrincipalType = 'User') AND (Principals_1.id != '1')  
ORDER BY 

Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 12:29:05PM -0500, Adam Hobaugh wrote:
 The slow query logs are most helpful when you then run EXPLAIN on the
 query so you know why the database is having trouble.
 Here is the EXPLAIN for the two queries.
 
 mysql EXPLAIN SELECT DISTINCT main.* FROM Users main CROSS JOIN ACL
 ACL_3 JOIN Principals Principals_1  ON ( Principals_1.id = main.id )
 JOIN CachedGroupMembers CachedGroupMembers_2  ON (
 CachedGroupMembers_2.MemberId = Principals_1.id ) JOIN
 CachedGroupMembers CachedGroupMembers_4  ON (
 CachedGroupMembers_4.MemberId = Principals_1.id )  WHERE
 ((ACL_3.ObjectType = 'RT::Queue' AND ACL_3.ObjectId   = 3) OR
 (ACL_3.ObjectType = 'RT::System') OR (ACL_3.ObjectType = 'RT::Queue'
 AND ACL_3.ObjectId   = 3) OR (ACL_3.ObjectType = 'RT::System')) AND
 (ACL_3.PrincipalId = CachedGroupMembers_4.GroupId) AND
 (ACL_3.PrincipalType = 'Group') AND (ACL_3.RightName = 'OwnTicket'
 OR ACL_3.RightName = 'SuperUser') AND (CachedGroupMembers_2.Disabled
 = '0') AND (CachedGroupMembers_2.GroupId = '4') AND
 (CachedGroupMembers_4.Disabled = '0') AND (Principals_1.Disabled =
 '0') AND (Principals_1.PrincipalType = 'User') AND (Principals_1.id
 != '1')  ORDER BY main.Name ASC;
 ++-+--+++-+-+---+--+---+
 | id | select_type | table| type   | possible_keys
 | key | key_len | ref
 | rows | Extra |
 ++-+--+++-+-+---+--+---+
 |  1 | SIMPLE  | CachedGroupMembers_2 | range  |
 DisGrouMem,CachedGroupMembers3,cachedgroupmembers1 | DisGrouMem
 | 10  | NULL  |  264 | Using
 where; Using index; Using temporary; Using filesort |
 |  1 | SIMPLE  | main | eq_ref | PRIMARY
 | PRIMARY | 4   |
 rt4_2_1.CachedGroupMembers_2.MemberId |1 |
 |
 |  1 | SIMPLE  | Principals_1 | eq_ref | PRIMARY
 | PRIMARY | 4   | rt4_2_1.main.id
 |1 | Using where; Distinct |
 |  1 | SIMPLE  | CachedGroupMembers_4 | ref|
 DisGrouMem,CachedGroupMembers3,cachedgroupmembers1 |
 CachedGroupMembers3 | 5   |
 rt4_2_1.CachedGroupMembers_2.MemberId |1 | Using where; Distinct
 |
 |  1 | SIMPLE  | ACL_3| range  | ACL1
 | ACL1| 85  | NULL
 |   13 | Using where; Using index; Distinct|
 ++-+--+++-+-+---+--+---+
 5 rows in set (0.01 sec)

Your query here says that MySQL is looking at a pretty tiny dataset
and running the same query on multiple databases here shows a wildly
different explain and very quick results.  This usually points to you
having some enormous tables (although the explain doesn't indicate
that) or a badly tuned mysql.

Can you download and run http://mysqltuner.pl on your database.

It would also be interesting to see
SELECT TABLE_ROWS, TABLE_NAME
FROM information_schema.tables
WHERE TABLE_SCHEMA = 'rt4';
changing your database name where needed.

-kevin


pgpwhbzre2ZKc.pgp
Description: PGP signature


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Landon Stewart
On 18 December 2013 10:07, Kevin Falcone falc...@bestpractical.com wrote:

 Can you download and run http://mysqltuner.pl on your database.


Fun tip.  You can download that with just “wget mysqltuner.pl”.  There’s
some redirection magic that makes it work with just that command.

-- 
Landon Stewart :: lstew...@iweb.com
Lead Specialist, Abuse and Security Management
Spécialiste principal, gestion des abus et sécurité
http://iweb.com :: +1 (888) 909-4932


[rt-users] RT-Extension-Assets link

2013-12-18 Thread JZ
I am trying to figure out the best way to get a link created to an 
asset at the time a ticket is created.  I am using RT-Extension-Assets 
in RT 4.2, and am having trouble finding information regarding this 
extension and doing what I want to do.  I am having trouble making the 
connection from the requester to the asset.  I am hoping somebody can 
give me an idea how to proceed.



jgz



Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Adam Hobaugh

On 12/18/2013 01:07 PM, Kevin Falcone wrote:

Your query here says that MySQL is looking at a pretty tiny dataset
and running the same query on multiple databases here shows a wildly
different explain and very quick results.  This usually points to you
having some enormous tables (although the explain doesn't indicate
that) or a badly tuned mysql.

Can you download and run http://mysqltuner.pl on your database.
I will have to go through this script and consult with a colleague 
before running that as our database contains more than just our ticket 
system.

It would also be interesting to see
 SELECT TABLE_ROWS, TABLE_NAME
 FROM information_schema.tables
 WHERE TABLE_SCHEMA = 'rt4';
changing your database name where needed.

mysql SELECT TABLE_ROWS, TABLE_NAME
- FROM information_schema.tables
- WHERE TABLE_SCHEMA = 'rt4_2_1';
++-+
| TABLE_ROWS | TABLE_NAME  |
++-+
|579 | ACL |
|  0 | Articles|
|1436268 | Attachments |
|   5708 | Attributes  |
| 353565 | CachedGroupMembers  |
|  0 | Classes |
| 36 | CustomFieldValues   |
|  4 | CustomFields|
| 107281 | GroupMembers|
| 157020 | Groups  |
|   1579 | Links   |
|  0 | ObjectClasses   |
|  14357 | ObjectCustomFieldValues |
|  4 | ObjectCustomFields  |
| 45 | ObjectScrips|
|  0 | ObjectTopics|
| 162308 | Principals  |
| 16 | Queues  |
| 21 | ScripActions|
| 22 | ScripConditions |
| 45 | Scrips  |
| 35 | Templates   |
|  35232 | Tickets |
|  0 | Topics  |
| 578000 | Transactions|
|  10340 | Users   |
|   4518 | sessions|
++-+
27 rows in set, 1 warning (0.43 sec)

Thanks!
//adam


Re: [rt-users] Owner mail on login page.

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 05:19:16PM +0100, Albert Shih wrote:
 I would like to known how can I disable the Owner mail on login page (new
 in 4.2.x)
 
 It's very important for us because with this information 50% of the user
 going to send a email directly to this address.

Hide it with css (the div has a class of login-help) or make a small
mason overlay of share/html/Elements/LoginHelp

-kevin


pgpvv_LiIimRo.pgp
Description: PGP signature


Re: [rt-users] any page showing a user drop down in a ticket is loading slow

2013-12-18 Thread Kevin Falcone
On Wed, Dec 18, 2013 at 02:15:06PM -0500, Adam Hobaugh wrote:
 On 12/18/2013 01:07 PM, Kevin Falcone wrote:
 Your query here says that MySQL is looking at a pretty tiny dataset
 and running the same query on multiple databases here shows a wildly
 different explain and very quick results.  This usually points to you
 having some enormous tables (although the explain doesn't indicate
 that) or a badly tuned mysql.
 
 Can you download and run http://mysqltuner.pl on your database.
 I will have to go through this script and consult with a colleague
 before running that as our database contains more than just our
 ticket system.

We'll see what it returns.
Nothing in your data set is particularly large, which points more and
more to MySQL problems.

-kevin

 It would also be interesting to see
  SELECT TABLE_ROWS, TABLE_NAME
  FROM information_schema.tables
  WHERE TABLE_SCHEMA = 'rt4';
 changing your database name where needed.
 mysql SELECT TABLE_ROWS, TABLE_NAME
 - FROM information_schema.tables
 - WHERE TABLE_SCHEMA = 'rt4_2_1';
 ++-+
 | TABLE_ROWS | TABLE_NAME  |
 ++-+
 |579 | ACL |
 |  0 | Articles|
 |1436268 | Attachments |
 |   5708 | Attributes  |
 | 353565 | CachedGroupMembers  |
 |  0 | Classes |
 | 36 | CustomFieldValues   |
 |  4 | CustomFields|
 | 107281 | GroupMembers|
 | 157020 | Groups  |
 |   1579 | Links   |
 |  0 | ObjectClasses   |
 |  14357 | ObjectCustomFieldValues |
 |  4 | ObjectCustomFields  |
 | 45 | ObjectScrips|
 |  0 | ObjectTopics|
 | 162308 | Principals  |
 | 16 | Queues  |
 | 21 | ScripActions|
 | 22 | ScripConditions |
 | 45 | Scrips  |
 | 35 | Templates   |
 |  35232 | Tickets |
 |  0 | Topics  |
 | 578000 | Transactions|
 |  10340 | Users   |
 |   4518 | sessions|
 ++-+
 27 rows in set, 1 warning (0.43 sec)


pgpkzJgoGvsK2.pgp
Description: PGP signature


[rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Tim Gustafson
I've upgraded from RT 4.0.16 to 4.2 on a FreeBSD 9.2 system.  I'm
using Perl 5.16.3.  When I try to start Apache, it segfaults with the
following information in /var/log/httpd-error.log:

[Tue Dec 17 11:42:38 2013] [error] [client 128.114.49.22] Can't locate
RT/Action/SendEmail.pm in @INC (you may need to install the
RT::Action::SendEmail module) (@INC contains:
/usr/local/share/rt40/lib
/usr/local/share/rt40/plugins/RT-Authen-ExternalAuth/lib
/usr/local/share/rt40/plugins/RT-Extension-MergeUsers/lib
/usr/local/lib/perl5/site_perl/5.18 /usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/5.18/mach /usr/local/lib/perl5/5.18 . /usr/local)
at /usr/local/lib/perl5/site_perl/5.18/RT/Interface/Web/Handler.pm
line 181.\n

[Tue Dec 17 11:42:38 2013] [error] [client 128.114.49.22] Can't locate
RT/Action/SendEmail.pm in @INC (you may need to install the
RT::Action::SendEmail module) (@INC contains:
/usr/local/share/rt40/lib
/usr/local/share/rt40/plugins/RT-Authen-ExternalAuth/lib
/usr/local/share/rt40/plugins/RT-Extension-MergeUsers/lib
/usr/local/lib/perl5/site_perl/5.18 /usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/5.18/mach /usr/local/lib/perl5/5.18 . /usr/local)
at /usr/local/lib/perl5/site_perl/5.18/RT/Interface/Web/Handler.pm
line 181.\n

[Wed Dec 18 13:26:02 2013] [error] [client 128.114.49.22] Can't locate
URI/_foreign.pm in @INC (you may need to install the URI::_foreign
module) (@INC contains: /usr/local/share/rt40/lib
/usr/local/share/rt40/plugins/RT-Authen-ExternalAuth/lib
/usr/local/share/rt40/plugins/RT-Extension-MergeUsers/lib
/usr/local/lib/perl5/site_perl/5.18 /usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/5.18/mach /usr/local/lib/perl5/5.18 . /usr/local)
at /usr/local/lib/perl5/site_perl/5.18/URI.pm line 60.\n

[Wed Dec 18 13:26:02 2013] [error] [client 128.114.49.22] Can't locate
URI/_foreign.pm in @INC (you may need to install the URI::_foreign
module) (@INC contains: /usr/local/share/rt40/lib
/usr/local/share/rt40/plugins/RT-Authen-ExternalAuth/lib
/usr/local/share/rt40/plugins/RT-Extension-MergeUsers/lib
/usr/local/lib/perl5/site_perl/5.18 /usr/local/lib/perl5/5.18/BSDPAN
/usr/local/lib/perl5/site_perl/5.18/mach
/usr/local/lib/perl5/5.18/mach /usr/local/lib/perl5/5.18 . /usr/local)
at /usr/local/lib/perl5/site_perl/5.18/URI.pm line 60.\n

I've confirmed that those files do exist for Perl 5.16:

r...@rt-dev.soe.ucsc.edu: locate RT/Action/SendEmail.pm
/usr/local/lib/perl5/site_perl/5.16/RT/Action/SendEmail.pm
r...@rt-dev.soe.ucsc.edu: locate RT/Action/SendEmail.pm
/usr/local/lib/perl5/site_perl/5.16/RT/Action/SendEmail.pm
r...@rt-dev.soe.ucsc.edu: locate URI/_foreign.pm
/usr/local/lib/perl5/site_perl/5.16/URI/_foreign.pm
r...@rt-dev.soe.ucsc.edu: locate URI/_foreign.pm
/usr/local/lib/perl5/site_perl/5.16/URI/_foreign.pm

Why is RT looking for them in a non-existant 5.18 folder?  Should I
just create a symlink for now to get past this?

-- 

Tim Gustafson
t...@ucsc.edu
831-459-5354
Baskin Engineering, Room 313A



Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Tim Gustafson
 Can you show what’s in /etc/make.conf?

WRKDIRPREFIX=/var/ports
DISTDIR=/var/ports/distfiles
PACKAGES=/var/ports/packages

 Perl 5.16 should be the default.

 http://svnweb.freebsd.org/ports/head/Mk/bsd.default-versions.mk?view=log

 Where did your modules come from?

I installed everything from FreeBSD's /usr/ports

-- 

Tim Gustafson
t...@ucsc.edu
831-459-5354
Baskin Engineering, Room 313A


Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Rainer Duffner
 
 Why is RT looking for them in a non-existant 5.18 folder?  Should I
 just create a symlink for now to get past this?




Can you show what’s in /etc/make.conf
?


Perl 5.16 should be the default.

http://svnweb.freebsd.org/ports/head/Mk/bsd.default-versions.mk?view=log

Where did your modules come from?

Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Rainer Duffner

Am 19.12.2013 um 00:38 schrieb Tim Gustafson t...@ucsc.edu:

 Can you show what’s in /etc/make.conf?
 
 WRKDIRPREFIX=/var/ports
 DISTDIR=/var/ports/distfiles
 PACKAGES=/var/ports/packages


So, it’s a jail.


Did you actually install perl?


pkg_info |grep ^perl

or
pkg info |grep ^perl

(in case you are already using pkgng).



 
 Perl 5.16 should be the default.
 
 http://svnweb.freebsd.org/ports/head/Mk/bsd.default-versions.mk?view=log
 
 Where did your modules come from?
 
 I installed everything from FreeBSD's /usr/ports


At this point, I would advise anybody who is on a semi-recent version of 
FreeBSD to use poudriere and build one’s own packages (preferably from a 
„frozen“ ports-tree).

But it’s OK, if reproducibility is not an issue.






Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Tim Gustafson
 So, it’s a jail.

Yes, sorry, I forgot to mention that.

 Did you actually install perl?

Of course, it's a dependency of RT:

r...@rt-dev.soe.ucsc.edu: pkg_info |grep ^perl
perl5-5.16.3_4  Practical Extraction and Report Language

 But it’s OK, if reproducibility is not an issue.

For what it's worth, I originally tried to do this as an upgrade from
4.0.16 to 4.2, but that failed with this same error, so I uninstalled
Perl, and all its dependencies, removed everything from /var/db/ports/
to make sure that all the default options were used while building,
and then re-installed 4.2.

If it helps, I can kill the whole jail and install a totally clean one
and then try again.

-- 

Tim Gustafson
t...@ucsc.edu
831-459-5354
Baskin Engineering, Room 313A


Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Rainer Duffner

Am 19.12.2013 um 01:00 schrieb Tim Gustafson t...@ucsc.edu:

 So, it’s a jail.
 
 Yes, sorry, I forgot to mention that.
 
 Did you actually install perl?
 
 Of course, it's a dependency of RT:
 
 r...@rt-dev.soe.ucsc.edu: pkg_info |grep ^perl
 perl5-5.16.3_4  Practical Extraction and Report Language
 
 But it’s OK, if reproducibility is not an issue.
 
 For what it's worth, I originally tried to do this as an upgrade from
 4.0.16 to 4.2, but that failed with this same error, so I uninstalled
 Perl, and all its dependencies, removed everything from /var/db/ports/
 to make sure that all the default options were used while building,
 and then re-installed 4.2.
 
 If it helps, I can kill the whole jail and install a totally clean one
 and then try again.
 


That is really strange.
I recently did a test-install (of 4.0.x) - with packages from my own repository 
(which is unfortunately not public) and that did work.
Didn’t get around trying 4.2 yet.

Do you actually have a 5.18 site_perl directory?





Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Rainer Duffner

 
 Do you actually have a 5.18 site_perl directory?


Ah, sorry.
You answered that before.

I missed it.

Something thinks you have perl 5.18.
Is the perl outside the jail also 5.16?



Re: [rt-users] RT 4.2 Segfaults on FreeBSD 9.2

2013-12-18 Thread Tim Gustafson
 Something thinks you have perl 5.18.
 Is the perl outside the jail also 5.16?

I believe its 5.16, but what difference should that make?  The jail
has no access to view any aspect of the root system.

-- 

Tim Gustafson
t...@ucsc.edu
831-459-5354
Baskin Engineering, Room 313A