Re: [rt-users] s/mime
Am 28.07.2014 um 22:57 schrieb Alex Vandiver: What version of MIME::Parser? You can check by running perl -MMIME::Parser\ 99 root@rt:~# perl -MMIME::Parser\ 99 MIME::Parser version 99 required--this is only version 5.505. BEGIN failed--compilation aborted. Needless to say, local tests don't show doubled newlines, so determining a way to replicate this for us would be quite useful. It might be instructive to run RT's test suite and see if that passes for you. You'll need to re-run configure with --enable-developer, which did this: root@rt:/tmp/rt-4.2.6# ./configure --with-web-user=www-data --with-web-group=www-data --enable-graphviz --enable-gd --enable-smime --with-db-dba=postgres --with-db-type=Pg --enable-developer will add some additional perl dependencies for 'make testdeps' to install. ... All dependencies have been found. You'll then be able to run RT's tests: $ prove -wl t/{crypt,mail,web}/smime/*.t t/crypt/smime/attachments-in-db.t . ok t/crypt/smime/bad-recipients.t ok t/crypt/smime/status-string.t . ok t/mail/smime/incoming.t ... ok t/mail/smime/other-signed.t ... ok t/mail/smime/outgoing.t ... ok t/mail/smime/realmail.t ... ok t/mail/smime/reject_on_unencrypted.t .. ok t/web/smime/outgoing.t ok All tests successful. Files=9, Tests=720, 214 wallclock secs ( 0.40 usr 0.06 sys + 155.68 cusr 11.91 csys = 168.05 CPU) Result: PASS Did not work - first try: Bailout called. Further testing stopped: RT_DBA_USER and RT_DBA_PASSWORD environment variables need to be set in order to run 'make test' Then I set the two variables by export and got: t/crypt/smime/attachments-in-db.t . Connect Failed FATAL: Datenbank rt4test existiert nicht at /tmp/rt-4.2.6/lib/RT/Test.pm line 643. BEGIN failed--compilation aborted at t/crypt/smime/attachments-in-db.t line 4. t/crypt/smime/attachments-in-db.t . 1/? and several pages other errors ... -- MHC SoftWare GmbH Fichtera 17 96274 Itzgrund/Germany voice: +49-(0)9533-92006-0 fax: +49-(0)9533-92006-6 e-mail: i...@mhcsoftware.de HR Coburg: B2242 Geschäftsführer: Matthias Henze -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] fcgi read timeout error in 4.2.5
I have done some more digging and am unable to determine the code causing the FOR UPDATE to be issued. Does anyone have rt 4.2.x running against Oracle successfully? -- Shawn Plummer Systems Manager | SUNY Geneseo South Hall 119 | 585-245-5577 | http://www.geneseo.edu/cit On Jun 24, 2014, at 4:24 PM, Alex Vandiver ale...@bestpractical.com wrote: On 06/24/2014 04:03 PM, Shawn Plummer wrote: [snip] Please keep replies on-list. - Alex Sounds like it's indeed related to session locking. You can try switching to on-disk sessions and see if it resolves the issue: Set($WebSessionClass, Apache::Session::File”); Running this way did indeed prevent the error from occurring. We switched back to database sessions to perform more testing. However, we'd also be interested to hear what your DBA discovers about the deadlocks, as this issue may well bite other Oracle users, and we'd like to resolve it. Our DBA has been doing some research and believes FOR UPDATE in this statement is the issue SELECT a_session FROM sessions WHERE id = :p1 FOR UPDATE From Oracle Doc: How Oracle Database Locks Data Locks are mechanisms that prevent destructive interaction between transactions accessing the same resource—either user objects such as tables and rows or system objects not visible to users, such as shared data structures in memory and data dictionary rows. In all cases, Oracle Database automatically obtains necessary locks when executing SQL statements, so users need not be concerned with such details. Oracle Database automatically uses the lowest applicable level of restrictiveness to provide the highest degree of data concurrency yet also provide fail-safe data integrity. Oracle Database also allows the user to lock data manually. More details: http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm#CNCPT020 There is also a doc showing that SELECT FOR UPDATE behavior is different from 10g to 11g. Doc ID 858518.1 And further information on FOR UPDATE http://markjbobak.wordpress.com/2010/04/06/unintended-consequences/ -- Shawn Plummer Systems Manager | SUNY Geneseo South Hall 119 | 585-245-5577 | http://www.geneseo.edu/cit -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] fcgi read timeout error in 4.2.5
Doing some more research I see that RT using Oracle used to use File Sesssions and switched in 4.2 to using Oracle. Then a change was made to make sessions default to the MaxAttachment size which, from reading DBD::Oracle documentation, could trigger FOR UPDATE being used causing the locking issue. I guess the answer for me is to just use Apache Sesssion Files. I would be happy to test any solutions for using Oracle for sessions on my devel instance but don’t want to hold up my upgrade any longer. The two commits in question https://github.com/bestpractical/rt/commit/36be526fecd2efb82762bb64978e39381d4a7622 https://github.com/bestpractical/rt/commit/fd66493495acde6a321fd3e560a01002284a198b I did confirm this bug occurs against a 10g and 11g Oracle database using 4.2 -- Shawn Plummer Systems Manager | SUNY Geneseo South Hall 119 | 585-245-5577 | http://www.geneseo.edu/cit On Jul 29, 2014, at 10:49 AM, Shawn Plummer plum...@geneseo.edu wrote: I have done some more digging and am unable to determine the code causing the FOR UPDATE to be issued. Does anyone have rt 4.2.x running against Oracle successfully? -- Shawn Plummer Systems Manager | SUNY Geneseo South Hall 119 | 585-245-5577 | http://www.geneseo.edu/cit On Jun 24, 2014, at 4:24 PM, Alex Vandiver ale...@bestpractical.com wrote: On 06/24/2014 04:03 PM, Shawn Plummer wrote: [snip] Please keep replies on-list. - Alex Sounds like it's indeed related to session locking. You can try switching to on-disk sessions and see if it resolves the issue: Set($WebSessionClass, Apache::Session::File”); Running this way did indeed prevent the error from occurring. We switched back to database sessions to perform more testing. However, we'd also be interested to hear what your DBA discovers about the deadlocks, as this issue may well bite other Oracle users, and we'd like to resolve it. Our DBA has been doing some research and believes FOR UPDATE in this statement is the issue SELECT a_session FROM sessions WHERE id = :p1 FOR UPDATE From Oracle Doc: How Oracle Database Locks Data Locks are mechanisms that prevent destructive interaction between transactions accessing the same resource—either user objects such as tables and rows or system objects not visible to users, such as shared data structures in memory and data dictionary rows. In all cases, Oracle Database automatically obtains necessary locks when executing SQL statements, so users need not be concerned with such details. Oracle Database automatically uses the lowest applicable level of restrictiveness to provide the highest degree of data concurrency yet also provide fail-safe data integrity. Oracle Database also allows the user to lock data manually. More details: http://docs.oracle.com/cd/B28359_01/server.111/b28318/consist.htm#CNCPT020 There is also a doc showing that SELECT FOR UPDATE behavior is different from 10g to 11g. Doc ID 858518.1 And further information on FOR UPDATE http://markjbobak.wordpress.com/2010/04/06/unintended-consequences/ -- Shawn Plummer Systems Manager | SUNY Geneseo South Hall 119 | 585-245-5577 | http://www.geneseo.edu/cit -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] Upgrade from 4.2.2 to 4.2.6 - simple search not using sphinx when searching
Hello, I have fulltext search implemented with sphinx and mysql 5.6.15. The problem is that after upgrade, I started to get these large queries in mysql when using simple search: # Time: 140725 13:15:31 # User@Host: rt_user[rt_user] @ localhost [] Id:26 # Query_time: 10.390028 Lock_time: 0.000276 Rows_sent: 1 Rows_examined: 910059 SET timestamp=1406283331; SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions Transactions_1 ON ( Transactions_1.ObjectType = 'RT::Ticket' ) AND ( Transactions_1.ObjectId = main.id ) LEFT JOIN Attachments Attachments_2 ON ( Attachments_2.TransactionId = Transactions_1.id ) LEFT JOIN AttachmentsIndex AttachmentsIndex_3 ON ( AttachmentsIndex_3.id = Attachments_2.id ) WHERE (main.IsMerged IS NULL) AND (main.Status != 'deleted') AND (main.Type = 'ticket') AND ( ( ( main.Subject LIKE '%*word*%' OR ( AttachmentsIndex_3.query = '*word*;limit=1;maxmatches=1' AND Attachments_2.Filename IS NULL ) ) ) ); Is there any way that I could make the simple search use the sphinx engine by default for all the queries? Or any way to revert it? I also mention that the content search is still working with sphinx as before, if I write fulltext:word I can find the query in the RT_ROOT/var/sphinx/query.log [Wed Jun 25 16:41:45.057 2014] 0.002 sec 0.002 sec [all/0/rel 3 (0,1)] [rt,rtdelta] word [Wed Jun 25 16:41:45.191 2014] 0.002 sec 0.002 sec [all/0/rel 3 (0,1)] [rt,rtdelta] word [Wed Jun 25 16:41:58.256 2014] 0.002 sec 0.002 sec [all/0/rel 3 (0,1)] [rt,rtdelta] word [Wed Jun 25 16:42:36.063 2014] 0.002 sec 0.002 sec [all/0/rel 3 (0,1)] [rt,rtdelta] word Thank you! -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] how to reduce the limit of attachment
Hi, I would like to reduce the maximum size of attachments that can be added directly from the web interface. I'm using: - Debian 7.5 - mysql 5.5.37-0+wheezy1 - RT 4.2.5 I set the value max_allowed_packet to 1M in /etc/mysql/my.cnf and configure these parameters on /opt/rt4/etc/RT_SiteConfig.pm: Set($MaxAttachmentSize, 1_000_000); # 1M Set($DropLongAttachments, 1_000_000); # 1M removed the cache: rm -rf /opt/rt4/var/mason_data/obj and restarted apache apache2ctl restart ...but I can upload file that is bigger than 1M. Any suggestion ? thank you. -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] Owner field cannot be populated after upgrading to 4.2.5
Hello We just upgraded to RT 4.2.5 and the owner field no longer works. if I edit the field then it is happy to autocomplete the field and when I click save no error message is displayed but the owner files remains as Nobody in particular. Any assistance would be gratefully received. Thanks Fergus -- View this message in context: http://requesttracker.8502.n7.nabble.com/Owner-field-cannot-be-populated-after-upgrading-to-4-2-5-tp58078.html Sent from the Request Tracker - User mailing list archive at Nabble.com. -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Upgrade from 4.2.2 to 4.2.6 - simple search not using sphinx when searching
On 07/29/2014 11:24 AM, Radu Tureac wrote: I have fulltext search implemented with sphinx and mysql 5.6.15. The problem is that after upgrade, I started to get these large queries in mysql when using simple search: RT 4.2.4 and above do a full-content search with simple search if indexed full-test searching is enabled. # Time: 140725 13:15:31 # User@Host: rt_user[rt_user] @ localhost [] Id:26 # Query_time: 10.390028 Lock_time: 0.000276 Rows_sent: 1 Rows_examined: 910059 SET timestamp=1406283331; SELECT COUNT(DISTINCT main.id http://main.id) FROM Tickets main JOIN Transactions Transactions_1 ON ( Transactions_1.ObjectType = 'RT::Ticket' ) AND ( Transactions_1.ObjectId = main.id http://main.id ) LEFT JOIN Attachments Attachments_2 ON ( Attachments_2.TransactionId = Transactions_1.id ) LEFT JOIN AttachmentsIndex AttachmentsIndex_3 ON ( AttachmentsIndex_3.id = Attachments_2.id ) WHERE (main.IsMerged IS NULL) AND (main.Status != 'deleted') AND (main.Type = 'ticket') AND ( ( ( main.Subject LIKE '%*word*%' OR ( AttachmentsIndex_3.query = '*word*;limit=1;maxmatches=1' AND Attachments_2.Filename IS NULL ) ) ) ); This failure is likely a failure of the Sphinx index to be picked up correctly, and is a limitation of the Sphinx search engine. You can confirm this by showing the output of EXPLAIN on the above query. Is there any way that I could make the simple search use the sphinx engine by default for all the queries? Or any way to revert it? You likely have two options: 1. Use a local overlay to replace the HandleDefault function in lib/RT/Search/Simple.pm with the version from 4.2.3 or earlier, which only searches subject, not subject and content. 2. Try the 4.2/mysql-native-fts branch, which uses the indexed full-text search for InnoDB tables which is available in MySQL 5.6. - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] Owner field cannot be populated after upgrading to 4.2.5
On 07/29/2014 01:04 PM, fergusIxico wrote: We just upgraded to RT 4.2.5 and the owner field no longer works. What version did you upgrade from? if I edit the field then it is happy to autocomplete the field and when I click save no error message is displayed but the owner files remains as Nobody in particular. What is in RT's error logs? - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
[rt-users] search query question
Hello all, It looks like the generic search query: my $tickets = new RT::Tickets($RT::SystemUser); Only works if you introduce some limitations to it. By that I mean qualifiers like: $tickets-LimitStatus(VALUE = 'open'); Is there any way to launch it and find all the tickets? And yes, I know - this may be expensive but that is fine. Thanks in advance for any advice. Cheers, Boris. -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] fcgi read timeout error in 4.2.5
On 07/29/2014 11:14 AM, Shawn Plummer wrote: Doing some more research I see that RT using Oracle used to use File Sesssions and switched in 4.2 to using Oracle. Then a change was made to make sessions default to the MaxAttachment size which, from reading DBD::Oracle documentation, could trigger FOR UPDATE being used causing the locking issue. I guess the answer for me is to just use Apache Sesssion Files. I would be happy to test any solutions for using Oracle for sessions on my devel instance but don’t want to hold up my upgrade any longer. The two commits in question https://github.com/bestpractical/rt/commit/36be526fecd2efb82762bb64978e39381d4a7622 https://github.com/bestpractical/rt/commit/fd66493495acde6a321fd3e560a01002284a198b I did confirm this bug occurs against a 10g and 11g Oracle database using 4.2 What steps do you use to reproduce the error? If we can trigger it locally (we test against 10g), we can more easily fix the error. - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] s/mime
On 07/29/2014 08:23 AM, Matthias Henze wrote: Am 28.07.2014 um 22:57 schrieb Alex Vandiver: What version of MIME::Parser? You can check by running perl -MMIME::Parser\ 99 root@rt:~# perl -MMIME::Parser\ 99 MIME::Parser version 99 required--this is only version 5.505. BEGIN failed--compilation aborted. Hm, OK. Unfortunately, nothing particularly telling there. Bailout called. Further testing stopped: RT_DBA_USER and RT_DBA_PASSWORD environment variables need to be set in order to run 'make test' Then I set the two variables by export and got: Those two should be set to the username and password of a user which has the right to create and drop databases. The errors you show imply that it failed to create the database. - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] IR upgrade fails
On 07/28/2014 09:10 AM, Tamás, Szép wrote: [1138] [Mon Jul 28 12:55:46 2014] [critical]: Can't locate Parse/BooleanLogic.pm in @INC That says you didn't install RTIR's dependencies. - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] search query question
On 07/29/2014 03:17 PM, Boris Epstein wrote: Is there any way to launch it and find all the tickets? And yes, I know - this may be expensive but that is fine. $tickets-UnLimit; - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] how to reduce the limit of attachment
On 07/29/2014 11:37 AM, Marco Agostini wrote: I would like to reduce the maximum size of attachments that can be added directly from the web interface. I'm using: - Debian 7.5 - mysql 5.5.37-0+wheezy1 - RT 4.2.5 I set the value max_allowed_packet to 1M in /etc/mysql/my.cnf You should set it to higher than 1M. Encoding may extend the size of the object in the database, and MySQL may simply drop the connection if it gets too large a packet. Having dropped mysql connections will abort the attachment insert _and_ all sorts of other things, none of which are desirable. and configure these parameters on /opt/rt4/etc/RT_SiteConfig.pm: Set($MaxAttachmentSize, 1_000_000); # 1M Set($DropLongAttachments, 1_000_000); # 1M $DropLongAttachments is a boolean option: http://docs.bestpractical.com/RT_Config#DropLongAttachments It also only works if $TruncateLongAttachments is not set. removed the cache: rm -rf /opt/rt4/var/mason_data/obj For reference, not relevant in this case, as you've not changed any Mason files. and restarted apache apache2ctl restart ...but I can upload file that is bigger than 1M. RT will still allow you to _upload_ files larger than 1M, but will silently drop them when the correspondence is recorded. There is a branch in the final stages of review that will add an entry into the ticket transaction history when an attachment is dropped or truncated. - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] search query question
Alex, thanks! Here's another solution I just found: $tickets-LimitId(OPERATOR = '', VALUE = '0'); Boris. On Tue, Jul 29, 2014 at 3:35 PM, Alex Vandiver ale...@bestpractical.com wrote: On 07/29/2014 03:17 PM, Boris Epstein wrote: Is there any way to launch it and find all the tickets? And yes, I know - this may be expensive but that is fine. $tickets-UnLimit; - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] fcgi read timeout error in 4.2.5
On Jul 29, 2014, at 3:32 PM, Alex Vandiver ale...@bestpractical.com wrote: I did confirm this bug occurs against a 10g and 11g Oracle database using 4.2 What steps do you use to reproduce the error? If we can trigger it locally (we test against 10g), we can more easily fix the error. - Alex I didn’t need to do anything specific to reproduce it. I just upgraded to 4.2 and it started. It is somewhat intermittent though. I usually login to the main dashboard in a tab and set it to refresh every 10 minutes and it happens within about half an hour. I also can make it happen by refreshing the main page over and over. If I can provide anything else let me know. -- Shawn Plummer Systems Manager | SUNY Geneseo South Hall 119 | 585-245-5577 | http://www.geneseo.edu/cit -- RT Training - Boston, September 9-10 http://bestpractical.com/training
Re: [rt-users] fcgi read timeout error in 4.2.5
On 07/29/2014 04:29 PM, Shawn Plummer wrote: What steps do you use to reproduce the error? If we can trigger it locally (we test against 10g), we can more easily fix the error. I didn’t need to do anything specific to reproduce it. I just upgraded to 4.2 and it started. It is somewhat intermittent though. I usually login to the main dashboard in a tab and set it to refresh every 10 minutes and it happens within about half an hour. I also can make it happen by refreshing the main page over and over. If I can provide anything else let me know. I'm ideally looking for a reproduction strategy against a clean RT 4.2. Can you show the results of (filling in ... for the value of your RT session cookie): SELECT id, LENGTH(a_session) FROM sessions WHERE id = '' ...as well as the value that your $MaxAttachmentSize is set to? - Alex -- RT Training - Boston, September 9-10 http://bestpractical.com/training