One more time, Upgrading RT from ancient version to current

One year ago I tried to upgrade our RT installation of 3.2.2 to 3.8.7. I ran back then into the same problem I am running into now.

http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg24723.html

On our main overview page I guess I run into the same, but also when I click on any queue, I get:

RT::ticket::TimeLeftAsString Unimplemented in HTML::Mason::Commands. (/home/rt/share/html/Elements/RT__Ticket/ColumnMap line 165)

I followed the UPGRADING, UPGRADING.mysql and README instructions, several times even, to make sure I follow it all.

Can anyone give me hints how to debug this? Look at what tables? At what piece of code?

Ulf.

One year ago I tried to upgrade our RT installation of 3.2.2 to 3.8.7. I ran back then into the same problem I am running into now.

http://www.mail-archive.com/rt-users@lists.bestpractical.com/msg24723.html

On our main overview page I guess I run into the same, but also when I click on any queue, I get:

RT::ticket::TimeLeftAsString Unimplemented in HTML::Mason::Commands. (/home/rt/share/html/Elements/RT__Ticket/ColumnMap line 165)

I followed the UPGRADING, UPGRADING.mysql and README instructions, several times even, to make sure I follow it all.

Can anyone give me hints how to debug this? Look at what tables? At what piece of code?

What is in /home/rt/local ?

You should also enable LogStackTrace in your config

-kevin

One year ago I tried to upgrade our RT installation of 3.2.2 to 3.8.7. I ran
back then into the same problem I am running into now.

http://www.mail-archive.com/rt-
users@lists.bestpractical.com/msg24723.html

On our main overview page I guess I run into the same, but also when I click
on any queue, I get:

RT::ticket::TimeLeftAsString Unimplemented in HTML::Mason::Commands.
(/home/rt/share/html/Elements/RT__Ticket/ColumnMap line 165)

I followed the UPGRADING, UPGRADING.mysql and README instructions,
several times even, to make sure I follow it all.

Can anyone give me hints how to debug this? Look at what tables? At what
piece of code?

What is in /home/rt/local ?

You should also enable LogStackTrace in your config

-kevin

rtapp01 root /home/rt # ll local/
total 28K
4K drwxrwxr-x 7 root root 4096 Dec 20 2004 .
4K drwxr-xr-x 9 root root 4096 Jul 17 2007 …
4K drwxr-xr-x 2 root root 4096 Dec 20 2004 etc
4K drwxr-xr-x 4 root bin 4096 Jan 19 2005 html
4K drwxr-xr-x 3 root root 4096 Jan 13 2005 lib
4K drwxr-xr-x 2 root root 4096 Mar 22 04:57 plugins
4K drwxr-xr-x 2 root root 4096 Dec 20 2004 po

Etc, plugins and po are empty, html has Elements and Ticket directories in it. Lib has a Ticket_Overlay.pm in it. As far I remember we did have someone hire someone to add something to our RT installation. I am trying to find out more about it.

One year ago I tried to upgrade our RT installation of 3.2.2 to 3.8.7. I ran
back then into the same problem I am running into now.

http://www.mail-archive.com/rt-
users@lists.bestpractical.com/msg24723.html

On our main overview page I guess I run into the same, but also when I
click
on any queue, I get:

RT::ticket::TimeLeftAsString Unimplemented in
HTML::Mason::Commands.
(/home/rt/share/html/Elements/RT__Ticket/ColumnMap line 165)

I followed the UPGRADING, UPGRADING.mysql and README
instructions,
several times even, to make sure I follow it all.

Can anyone give me hints how to debug this? Look at what tables? At
what
piece of code?

What is in /home/rt/local ?

You should also enable LogStackTrace in your config

-kevin

rtapp01 root /home/rt # ll local/
total 28K
4K drwxrwxr-x 7 root root 4096 Dec 20 2004 .
4K drwxr-xr-x 9 root root 4096 Jul 17 2007 …
4K drwxr-xr-x 2 root root 4096 Dec 20 2004 etc
4K drwxr-xr-x 4 root bin 4096 Jan 19 2005 html
4K drwxr-xr-x 3 root root 4096 Jan 13 2005 lib
4K drwxr-xr-x 2 root root 4096 Mar 22 04:57 plugins
4K drwxr-xr-x 2 root root 4096 Dec 20 2004 po

Etc, plugins and po are empty, html has Elements and Ticket directories in it.
Lib has a Ticket_Overlay.pm in it. As far I remember we did have someone
hire someone to add something to our RT installation. I am trying to find out
more about it.

I also set:

Set($LogToFile , ‘debug’);
Set($LogDir, ‘/home/rt/var/log’);
Set($LogToFileNamed , “rt.log”); #log to rt.log
Set($LogStackTraces, ‘debug’);

But only get in rt.log:

[Tue Mar 22 18:34:48 2011] [warning]: We opened /dev/null to protect FD #1, but descriptor #1 is already occupied at /home/rt/bin/webmux.pl line 78. (/home/rt/bin/webmux.pl:78)
Trace begun at /home/rt/bin/…/lib/RT.pm line 291
Log::Dispatch::log(undef, ‘level’, ‘warning’, ‘message’, ‘We opened /dev/null to protect FD #1, but descriptor #1 is already occupied at /home/rt/bin/webmux.pl line 78.^J’) called at /home/rt/bin/webmux.pl line 78
RT::Mason::handler(‘Apache2::RequestRec=SCALAR(0x4bd67d0)’) called at -e line 0
eval {…} at -e line 0

Etc, plugins and po are empty, html has Elements and Ticket
directories in it. Lib has a Ticket_Overlay.pm in it. As far I
remember we did have someone hire someone to add something to our RT
installation. I am trying to find out more about it.

There’s your problem.

Your Ticket_Overlay.pm is killing RT’s Ticket_Overlay.pm

Remove it until you can restore it as a proper extension using either
Ticket_Local.pm or normal extensions.

-kevin

What’s the proper steps for upgrading very old RT to up-to-date version?

I am looking at upgrading RT from 3.2.3 to 3.8.9.

SimonOn Tue, Mar 22, 2011 at 12:01 PM, Kevin Falcone falcone@bestpractical.comwrote:

Etc, plugins and po are empty, html has Elements and Ticket
directories in it. Lib has a Ticket_Overlay.pm in it. As far I
remember we did have someone hire someone to add something to our RT
installation. I am trying to find out more about it.

There’s your problem.

Your Ticket_Overlay.pm is killing RT’s Ticket_Overlay.pm

Remove it until you can restore it as a proper extension using either
Ticket_Local.pm or normal extensions.

-kevin

What’s the proper steps for upgrading very old RT to up-to-date version?

Read README and UPGRADING documents five times.

local directory may cotain files that override things in the core and
such customizations may hide new code. This is what happened in Ulf’s
case.

I am looking at upgrading RT from 3.2.3 to 3.8.9.

Simon

Etc, plugins and po are empty, html has Elements and Ticket
directories in it. Lib has a Ticket_Overlay.pm in it. As far I
remember we did have someone hire someone to add something to our RT
installation. I am trying to find out more about it.

There’s your problem.

Your Ticket_Overlay.pm is killing RT’s Ticket_Overlay.pm

Remove it until you can restore it as a proper extension using either
Ticket_Local.pm or normal extensions.

-kevin

Best regards, Ruslan.

Thanks. I am not going to do in-place upgrade. I will migrate RT from 3.2.3
on one server to 3.8.9 on another server. In this scenarios, how does
upgrade doc apply?

Here is what I like to do:

  1. Dump database off RT 3.2.3.
  2. Install and configure RT 3.8.9 on a new server
  3. Import RT database into RT 3.8.9

For this upgrade path, what are the RT and MySQL upgrades I should perform
after step 3?

SimonOn Tue, Mar 22, 2011 at 1:59 PM, Ruslan Zakirov ruz@bestpractical.comwrote:

On Tue, Mar 22, 2011 at 10:56 PM, Simon Gao simon.gao@schrodinger.com wrote:

What’s the proper steps for upgrading very old RT to up-to-date version?

Read README and UPGRADING documents five times.

local directory may cotain files that override things in the core and
such customizations may hide new code. This is what happened in Ulf’s
case.

I am looking at upgrading RT from 3.2.3 to 3.8.9.

Simon

On Tue, Mar 22, 2011 at 12:01 PM, Kevin Falcone < falcone@bestpractical.com> wrote:

Etc, plugins and po are empty, html has Elements and Ticket
directories in it. Lib has a Ticket_Overlay.pm in it. As far I
remember we did have someone hire someone to add something to our RT
installation. I am trying to find out more about it.

There’s your problem.

Your Ticket_Overlay.pm is killing RT’s Ticket_Overlay.pm

Remove it until you can restore it as a proper extension using either
Ticket_Local.pm or normal extensions.

-kevin


Best regards, Ruslan.

Hi,

  1. Install 3.8.9 on a new server, test it with clean DB, make sure it works.

  2. Migrate database with user for RT.

  3. Configure 3.8.9 to connect to migrated DB.

  4. Follow instructions on upgrading database data and schema.On Wed, Mar 23, 2011 at 12:32 AM, Simon Gao simon.gao@schrodinger.com wrote:

Thanks. I am not going to do in-place upgrade. I will migrate RT from 3.2.3
on one server to 3.8.9 on another server. In this scenarios, how does
upgrade doc apply?

Here is what I like to do:

  1. Dump database off RT 3.2.3.
  2. Install and configure RT 3.8.9 on a new server
  3. Import RT database into RT 3.8.9

For this upgrade path, what are the RT and MySQL upgrades I should perform
after step 3?

Simon

On Tue, Mar 22, 2011 at 1:59 PM, Ruslan Zakirov ruz@bestpractical.com wrote:

On Tue, Mar 22, 2011 at 10:56 PM, Simon Gao simon.gao@schrodinger.com wrote:

What’s the proper steps for upgrading very old RT to up-to-date version?

Read README and UPGRADING documents five times.

local directory may cotain files that override things in the core and
such customizations may hide new code. This is what happened in Ulf’s
case.

I am looking at upgrading RT from 3.2.3 to 3.8.9.

Simon

On Tue, Mar 22, 2011 at 12:01 PM, Kevin Falcone falcone@bestpractical.com wrote:

Etc, plugins and po are empty, html has Elements and Ticket
directories in it. Lib has a Ticket_Overlay.pm in it. As far I
remember we did have someone hire someone to add something to our RT
installation. I am trying to find out more about it.

There’s your problem.

Your Ticket_Overlay.pm is killing RT’s Ticket_Overlay.pm

Remove it until you can restore it as a proper extension using either
Ticket_Local.pm or normal extensions.

-kevin


Best regards, Ruslan.

Best regards, Ruslan.

Thanks. I am not going to do in-place upgrade. I will migrate RT from 3.2.3 on one server to
3.8.9 on another server. In this scenarios, how does upgrade doc apply?

Here is what I like to do:

  1. Dump database off RT 3.2.3.
  2. Install and configure RT 3.8.9 on a new server
  3. Import RT database into RT 3.8.9

For this upgrade path, what are the RT and MySQL upgrades I should perform after step 3?

Everything in UPGRADING.mysql and UPGRADING related to the database.
Luckily, you can use rt-setup-database --action upgrade these days to
automate things, but as Ruslan said, you should really be reviewing
all of the doc.

-kevin

Thanks for all the suggestions. I will try read upgrade and upgrade.mysql a
few more times.

I tried command rt-setup-database for upgrading MySQL database, but had
following error.

/opt/rt3/sbin/rt-setup-database --dba root --prompt-for-dba-password

–action upgrade
In order to create or update your RT database, this script needs to connect
to your mysql instance on localhost as root
Please specify that user’s database password below. If the user has no
database
password, just press return.

Password:
Working with:
Type: mysql
Host: localhost
Name: rt3
User: rt_user
DBA: root
Enter RT version you’re upgrading from: 3.2.3

Going to apply following upgrades:

  • 3.3.0
  • 3.3.11
  • 3.5.1
  • 3.7.1
  • 3.7.3
  • 3.7.10
  • 3.7.15
  • 3.7.19
  • 3.7.81
  • 3.7.82
  • 3.7.85
  • 3.7.86
  • 3.7.87
  • 3.8.0
  • 3.8.1
  • 3.8.2
  • 3.8.3
  • 3.8.4
  • 3.8.6
  • 3.8.8
  • 3.8.9

Enter RT version if you want to stop upgrade at some point,
or leave it blank if you want apply above upgrades:

IT’S VERY IMPORTANT TO BACK UP BEFORE THIS STEP

Proceed [y/N]:y
Processing 3.3.0
Now populating database schema.
DBD::mysql::st execute failed: Duplicate column name ‘ObjectType’ at
/wstore/www/rt3/sbin/…/lib/RT/Handle.pm line 515.

Do I really need to start from RT version 3.2.3? How do I find out certain
columns are already in the database?

Simon

Now populating database schema.
DBD::mysql::st execute failed: Duplicate column name ‘ObjectType’ at
/wstore/www/rt3/sbin/…/lib/RT/Handle.pm line 515.

I suspect that upgrade scrip tries to create a column in a table, but
it’s already there. First line etc/upgrade/3.3.0/schema.mysql.

Several variants:

  1. your RT is not 3.2.3 actually
  2. you’re trying to upgrade 3.8.9’s DB by mistake in configuration
  3. you attempted upgrade earlier and now your DB is somewhere between
    versions 3.2.3 and 3.8.9, but you’re still running 3.2.3 code on top
    of it. In this case community can not help you much. You need custom
    upgrade scripts, custom integrity checks and overall database audit.
    Especially if you have no full logs for previouse upgrade attempt.

Do I really need to start from RT version 3.2.3?

Yes, you do if old version is 3.2.3. All updates should be applied
incrementally starting from version you’re upgrading from.

How do I find out certain columns are already in the database?

SHOW FIELDS FROM TableName;

Best regards, Ruslan.

Thanks for help from you all.

I figured out what was going on. I created a new RT database using “make
initialize-database” during installation. Importing old RT database dump
into this new database caused the upgrade script to fail. The fix is after
testing basic setting working, deleting the new database, then importing the
old database.

Simon

Etc, plugins and po are empty, html has Elements and Ticket
directories in it. Lib has a Ticket_Overlay.pm in it. As far I
remember we did have someone hire someone to add something to our
RT
installation. I am trying to find out more about it.

There’s your problem.

Your Ticket_Overlay.pm is killing RT’s Ticket_Overlay.pm

Remove it until you can restore it as a proper extension using either
Ticket_Local.pm or normal extensions.

-kevin

Yep, the custom modifications were the problem. We removed them on the test upgrade system and investigating how far we actually need those modifcations.