<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=UpgradingFrom3011To344OnSolaris9</id>
	<title>UpgradingFrom3011To344OnSolaris9 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://rt-wiki.bestpractical.com/index.php?action=history&amp;feed=atom&amp;title=UpgradingFrom3011To344OnSolaris9"/>
	<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=UpgradingFrom3011To344OnSolaris9&amp;action=history"/>
	<updated>2026-08-22T12:27:28Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>https://rt-wiki.bestpractical.com/index.php?title=UpgradingFrom3011To344OnSolaris9&amp;diff=4077&amp;oldid=prev</id>
		<title>Admin: 2 revisions imported</title>
		<link rel="alternate" type="text/html" href="https://rt-wiki.bestpractical.com/index.php?title=UpgradingFrom3011To344OnSolaris9&amp;diff=4077&amp;oldid=prev"/>
		<updated>2016-04-06T20:39:38Z</updated>

		<summary type="html">&lt;p&gt;2 revisions imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=== Oct 21 2005 14:06:42 ===&lt;br /&gt;
&lt;br /&gt;
This is a description of my experience upgrading from RT 3.0.11 to 3.4.4&lt;br /&gt;
&lt;br /&gt;
All went well! err... just kidding ;-)&lt;br /&gt;
&lt;br /&gt;
==== Some Issues ====&lt;br /&gt;
&lt;br /&gt;
* Solaris Issues&lt;br /&gt;
* Upgrading existing custom written scripts&lt;br /&gt;
* Installed version 5.8.5 of perl&lt;br /&gt;
* That is straightforward enough.&lt;br /&gt;
* Performance problems&lt;br /&gt;
&lt;br /&gt;
==== Used Software ====&lt;br /&gt;
&lt;br /&gt;
* apache 1.3.27&lt;br /&gt;
* mod_perl 1.29&lt;br /&gt;
* mod_ssl 2.3.14-1.3.27&lt;br /&gt;
* mysql 4.0.18&lt;br /&gt;
&lt;br /&gt;
==== configuring CPAN ====&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;perl -MCPAN -e shell&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* asks to configure CPAN&lt;br /&gt;
* manually done according to&lt;br /&gt;
&lt;br /&gt;
http://www.sun.com/bigadmin/features/articles/req_track_1.html&lt;br /&gt;
&lt;br /&gt;
Thanks Amy! :-)&lt;br /&gt;
&lt;br /&gt;
* CPAN command &amp;#039;look&amp;#039; goes to unix shell -&amp;amp;gt; &amp;#039;exit&amp;#039; to get back out.&lt;br /&gt;
* When installing from the cpan prompt we can use &amp;#039;look &amp;quot;package&amp;quot;&amp;#039; to get to a shell prompt within that directory.&lt;br /&gt;
* carry out the make etc. commands and return to the cpan prompt with &amp;#039;exit&amp;#039;&lt;br /&gt;
* This will allows us to install modules manually&lt;br /&gt;
&lt;br /&gt;
==== compiling apache ====&lt;br /&gt;
&lt;br /&gt;
* I compiled apache with static modules mod_perl and mod_ssl&lt;br /&gt;
* The instructions for this were from mod_perl-1.29&lt;br /&gt;
** the file INSTALL.simple.mod_ssl under the mod_perl tree&lt;br /&gt;
* there was a problem in a &amp;#039;.c&amp;#039; file where:&lt;br /&gt;
** &amp;quot;I have to edit the .c files of any app that makes a call to&lt;br /&gt;
&lt;br /&gt;
 PEM_F_DEF_CALLBACK&lt;br /&gt;
&lt;br /&gt;
* and replace that line with&lt;br /&gt;
&lt;br /&gt;
 PEM_F_PEM_DEF_CALLBACK.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
* This turned out to be in the file:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;&amp;#039;apache_1.3.27/src/modules/ssl/ssl_engine_pphrase.c&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* Then from the mod_perl subdirectory I did:&lt;br /&gt;
&lt;br /&gt;
 perl Makefile.PL USE_APACI=1 EVERYTHING=1 SSL_BASE=/usr/local/openssl \&lt;br /&gt;
 APACI_ARGS=--prefix=/usr/local/apache,--enable-module=ssl,--enable-module=rewrite&lt;br /&gt;
&lt;br /&gt;
* That compiled perfectly.&lt;br /&gt;
&lt;br /&gt;
==== ACTUAL UPGRADE ====&lt;br /&gt;
&lt;br /&gt;
* The main reason for this upgrade was the fact that &amp;#039;update.html&amp;#039; loaded very slowly.&lt;br /&gt;
* The database was taking a long time to process the query. More about the query later.&lt;br /&gt;
* The &amp;#039;update.html&amp;#039; file (the file that invokes the query) is the file you request when you go to comment on a ticket.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* I started with a 3.0.11 install&lt;br /&gt;
* This setup has a database of about 5.6Gig (the size of the dump file)&lt;br /&gt;
* This install had the usual stuff with dependencies.&lt;br /&gt;
** That is, there were some problems with perl module dependencies that I had to solve manually.&lt;br /&gt;
* So the 3.0.11 install was working well except for the above mentioned problem namely:&lt;br /&gt;
* slow when executing a particular query&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== ACTIONS ===&lt;br /&gt;
&lt;br /&gt;
==== PREPARATION ====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* tar up the existing rt3 directory and place the &amp;#039;.tar&amp;#039; file somewhere safe.&lt;br /&gt;
** (This will save the whole tree including modifications, and config for easy rollback if upgrade don&amp;#039;t work)&lt;br /&gt;
&lt;br /&gt;
* shutdown apache (webserver)&lt;br /&gt;
** make absolutely sure that the backup file is OK.&lt;br /&gt;
** Test for restorability.&lt;br /&gt;
&lt;br /&gt;
* backup existing database with dumputility&lt;br /&gt;
&lt;br /&gt;
* rename existing rt3 directory to rt3011&lt;br /&gt;
&lt;br /&gt;
* unzip and untar newly downloaded rt-3.4.4.tar.gz&lt;br /&gt;
&lt;br /&gt;
==== INSTALLATION ====&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* configure and test for all modules&lt;br /&gt;
&lt;br /&gt;
 ./configure --with-db-rt-pass=&amp;#039;dadada&amp;#039; --prefix=/usr/local/rt3&lt;br /&gt;
 perl sbin/rt-test-dependencies --with-mysql --with-modperl1&lt;br /&gt;
 &lt;br /&gt;
 make upgrade&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* run rt-setup-database on several directories&lt;br /&gt;
&lt;br /&gt;
 /usr/local/rt3/sbin/rt-setup-database --dba root --prompt-for-dba-password \&lt;br /&gt;
 --action schema --datadir /your/rt/sourcedir/rt-3.4.4/etc/upgrade/&amp;amp;lt;version&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
* where version is each one of&lt;br /&gt;
&lt;br /&gt;
 3.1.0&lt;br /&gt;
 3.1.15&lt;br /&gt;
 3.1.17&lt;br /&gt;
 3.3.0&lt;br /&gt;
 3.3.11&lt;br /&gt;
&lt;br /&gt;
* 3.1.0 went quickly&lt;br /&gt;
* 3.1.15 had no sql statements and said just that namely:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;Couldn&amp;#039;t find schema file for mysql&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* 3.1.17 same&lt;br /&gt;
* 3.3.0 took considerably longer:&lt;br /&gt;
&lt;br /&gt;
 started at 11:37 - ended: 12:17 -- 34 minutes&lt;br /&gt;
 (depending on the speed of your machine and size of your database)&lt;br /&gt;
&lt;br /&gt;
* 3.3.11 started at 12:18 ended 12:18&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* make changes to the [[RT SiteConfig|RT_SiteConfig]].pm file.&lt;br /&gt;
* I kept getting this error:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;*error:*  no connection to syslog available at&lt;br /&gt;
 /webhosting/stow/perl-5.8.5/perl5/lib/site_perl/5.8.5/Log/Dispatch/Syslog.pm line 77&amp;#039;&lt;br /&gt;
&lt;br /&gt;
* to deal with that read [[NoConnectionToSyslog]]&lt;br /&gt;
* I had to also make sure that the $organisation variable was set correctly&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* make changes to apache&amp;#039;s httpd.conf file.&lt;br /&gt;
* in this installation that meant changing the &amp;#039;[[DocumentRoot]]&amp;#039; and any other entries that refer to the rt3 directory.&lt;br /&gt;
* if you&amp;#039;ve installed the new RT version to a directory of the same name as the old, then you don&amp;#039;t need to change anything&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
* apply any modifications that you may have made to your previous version.&lt;br /&gt;
* this may mean that some things are broken.&lt;br /&gt;
* in my case I need to change a few things, mainly where &amp;#039;Ticket&amp;#039; became &amp;#039;Object&amp;#039;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== DEALING WITH PERFORMANCE PROBLEM ===&lt;br /&gt;
&lt;br /&gt;
* As stated above, I need to do this upgrade because of speed/performance problems.&lt;br /&gt;
* This manifested itself mainly through the use of the &amp;#039;comment&amp;#039; page.&lt;br /&gt;
* The following SQL query is the culprit:&lt;br /&gt;
&lt;br /&gt;
 SELECT DISTINCT main.* FROM Users main , Principals Principals_1, ACL ACL_2, Groups Groups_3, \&lt;br /&gt;
 CachedGroupMembers CachedGroupMembers_4  WHERE ((ACL_2.RightName = &amp;#039;OwnTicket&amp;#039;)) AND \&lt;br /&gt;
 ((CachedGroupMembers_4.MemberId = Principals_1.id)) \&lt;br /&gt;
 AND ((Groups_3.id = CachedGroupMembers_4.GroupId)) \&lt;br /&gt;
 AND ((Principals_1.Disabled = &amp;#039;0&amp;#039;)or(Principals_1.Disabled = &amp;#039;0&amp;#039;)) \&lt;br /&gt;
 AND ((Principals_1.id != &amp;#039;1&amp;#039;)) AND ((main.id = Principals_1.id)) \&lt;br /&gt;
 AND  ( (    ACL_2.PrincipalId = Groups_3.id AND ACL_2.PrincipalType = &amp;#039;Group&amp;#039; \&lt;br /&gt;
 AND (   Groups_3.Domain = &amp;#039;SystemInternal&amp;#039; OR Groups_3.Domain = &amp;#039;UserDefined&amp;#039; \&lt;br /&gt;
 OR Groups_3.Domain = &amp;#039;ACLEquivalence&amp;#039;)) \&lt;br /&gt;
 OR ( ( (Groups_3.Domain = &amp;#039;RT::Queue-Role&amp;#039; AND Groups_3.Instance = 23)  \&lt;br /&gt;
 OR ( Groups_3.Domain = &amp;#039;RT::Ticket-Role&amp;#039; AND Groups_3.Instance = 238803)  ) \&lt;br /&gt;
 AND Groups_3.Type = ACL_2.PrincipalType) ) \&lt;br /&gt;
 AND (ACL_2.ObjectType = &amp;#039;RT::System&amp;#039; OR  (ACL_2.ObjectType = &amp;#039;RT::Queue&amp;#039; \&lt;br /&gt;
 AND ACL_2.ObjectId = 23) )    ORDER BY main.Name ASC;&lt;br /&gt;
&lt;br /&gt;
* I tried many things including:&lt;br /&gt;
** dropping all indexes on the Groups table and creating new indexes according to this article:&lt;br /&gt;
** http://issues.bestpractical.com/Ticket/Display.html?id=6624&lt;br /&gt;
** doing &amp;#039;optimize&amp;#039; and &amp;#039;analyze&amp;#039; tables in mysql:&lt;br /&gt;
** &amp;#039;optimize table Users, Principals, ACL, Groups, [[CachedGroupMembers]];&amp;#039;&lt;br /&gt;
** &amp;#039;analyze table Users, Principals, ACL, Groups, [[CachedGroupMembers]];&amp;#039;&lt;br /&gt;
* The optimize actually includes the analyze if I understand the mysql documentation correctly.&lt;br /&gt;
* The optimize made some difference in query speeds but on the whole, all of the above gave me no improvement.&lt;br /&gt;
&lt;br /&gt;
* After a fairly intensive email exchange, which can be view on the rt-users mailing list starting on 25Oct2005.&lt;br /&gt;
* The thread is titled &amp;#039;Huge Attachments table in 3.4.4&amp;#039;&lt;br /&gt;
* Jesse offered me some patches.&lt;br /&gt;
* 2 files named: &amp;#039;clone.patch&amp;#039; and &amp;#039;rights.patch&amp;#039;&lt;br /&gt;
* The &amp;#039;rights.patch&amp;#039; file contains changes to the way SQL queries are formulated and includes changes to:&lt;br /&gt;
&lt;br /&gt;
 Groups_Overlay.pm&lt;br /&gt;
 Principals_Overlay.pm&lt;br /&gt;
 Users_Overlay.pm&lt;br /&gt;
&lt;br /&gt;
* The clone.patch file contains a change to the [[SearchBuilder]].pm file.&lt;br /&gt;
** For this to work, the [[DBIx]]::[[SearchBuilder]] package needs to be recompiled.&lt;br /&gt;
** To do that, I wanted to remove the existing [[DBIx]]::[[SearchBuilder]] package.&lt;br /&gt;
** Since that isn&amp;#039;t the easiest thing to do in the Perl Module world, I wrote this mini script that does it.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;#!/usr/bin/perl&lt;br /&gt;
 &lt;br /&gt;
 use ExtUtils::Install;&lt;br /&gt;
 # you&amp;#039;ll need to adjust the path to you .packlist file for that module&lt;br /&gt;
 $packlist = &amp;#039;/webhosting/stow/perl-5.8.5/perl5/lib/site_perl/5.8.5/sun4-solaris/auto/DBIx/SearchBuilder/.packlist&amp;#039;;&lt;br /&gt;
 &lt;br /&gt;
 #print $packlist;&lt;br /&gt;
 &lt;br /&gt;
 uninstall($packlist);&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* then I used cpan to download the [[DBIx]]::[[SearchBuilder]] package&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;perl -MCPAN -e shell&amp;#039;&lt;br /&gt;
 cpan&amp;amp;gt; get DBIx::SearchBuilder&lt;br /&gt;
 cpan&amp;amp;gt; look DBIx::SearchBuilder&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
* then I modified the code in [[SearchBuilder]].pm&lt;br /&gt;
* the compilation complained&lt;br /&gt;
* I needed to install Clone&lt;br /&gt;
&lt;br /&gt;
 cpan&amp;amp;gt; install Clone&lt;br /&gt;
&lt;br /&gt;
* Everything compiled nicely&lt;br /&gt;
&lt;br /&gt;
* So now I reloaded the application by stopping.... and starting apache&lt;br /&gt;
* and....... the speed problem was solved&lt;br /&gt;
&lt;br /&gt;
* However I found a problem probably caused by the patches, namely&lt;br /&gt;
* Members of groups were not showing up.&lt;br /&gt;
* I used mysqladmin -v processlist to find that it was the following query:&lt;br /&gt;
&lt;br /&gt;
 SELECT DISTINCT main.* FROM Groups main , Principals Principals_1 \&lt;br /&gt;
 WHERE ((Principals_1.Disabled = &amp;#039;0&amp;#039;)) AND  ((main.Domain = &amp;#039;UserDefined&amp;#039;)) \&lt;br /&gt;
 AND ((main.id = Principals_1.id)or(main.id != &amp;#039;2552&amp;#039;))    ORDER BY main.Name ASC&lt;br /&gt;
&lt;br /&gt;
* Since there were no indexes on Principals.Disabled and Groups.Domain, I created those 2 indexes:&lt;br /&gt;
&lt;br /&gt;
 create index Principals4 on Principals(Disabled);&lt;br /&gt;
 create index Groups5 on Groups(Domain);&lt;br /&gt;
&lt;br /&gt;
* This seemed to have done the trick!&lt;br /&gt;
* I could no longer fault that page load.&lt;br /&gt;
&lt;br /&gt;
=== THAT&amp;#039;S ABOUT IT ===&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>