Problems installing rt4 on Ubuntu 11.11

Hi folks,

I have an Ubuntu 11.11 system that I want to install RT onto, but the MySQL
database is on another system. And this seems to be an issue even though
the installer seems to think it can do this.

I found this recent thread but the OP did not report back as to how he got
it to work
http://lists.bestpractical.com/pipermail/rt-users/2012-January/074770.html

So what did I do?

I installed the packages via apt-get

apt-get install request-tracker4 rt4-apache2 rt4-clients rt4-db-mysql

and then as part of that, it prompted me for a number of things. When it
came to the part where it said it wants to configure the database, I told
it I would do it manually because silly me I did not think it would deal
with having the DB on a separate system. So when the install was done I
went over to my other system and created a DB and user for RT, and gave the
user the proper permissions for the DB. I verified the permissions were
good by doing the DB creation from the RT system. I did this :

mysql --user-rt4 --password=rtticket --host=10.246.159.43
–database=requesttracker4 < /usr/share/request-tracker4/etc/schema.mysql

Where the IP shown is not my RT system, it is the system with the MySQL DB.
This command worked well and so I then went about finding all the files
where I had to make changes for this to work. I thought I had found them,
but when I tried to start Apache I got this :

—snip—
apachectl restart
[Tue Mar 6 21:07:39 2012] [warning]: Use of uninitialized value in
concatenation (.) or string at /usr/share/request-tracker4/lib/RT/Handle.pm
line 242. (/usr/share/request-tracker4/lib/RT/Handle.pm:241)

RT couldn’t connect to the database where tickets are stored.
If this is a new installation of RT, you should visit the URL below
to configure RT and initialize your database.

If this is an existing RT installation, this may indicate a database
connectivity problem.

The error RT got back when trying to connect to your database was:

Couldn’t find RT_System user in the DB ‘’
—snip—

And when I went to the URL for it on my RT system, I got this :

—snip—
Permission denied at /usr/share/request-tracker4/html/Install/index.html
line 98.
—snip—

Then after mucking about a bit more I discovered the
Ubuntu dpkg-reconfigure command, which let me re-do the installation and
this time around I told it to go ahead and configure the database for me.
I answered the questions as best I could and it went ahead to try to do
something useful for me, but I ended back up where I began above. See
below, where I have replaced the actual with the text “FQDN”. I
then went over to my database and created a user “root@FQDN” and gave it
full permissions to the database for RT.

I suspect what my problem is, is that this root@FQDN user needs to have
full permission over my entire MySQL database in order to do a database
creation. But that makes me nervous as heck on my live database! Maybe
someone can confirm this?

Thanks for any help you can give me. I’d be happy with being able to
complete the ‘dpkg-reconfigure’ or with doing it manually. I thought I
had gotten all the manual stuff in place properly the first time around but
that error on line 98 is what completely stumped me. It was still lacking
this “RT_System” user best I could tell, and I could find nowhere to tell
me how to set that up manually.

—snip—
root@bioinfoadmin:/etc/request-tracker4# dpkg-reconfigure
request-tracker4WARNING
WARNING If you are using mod_perl or any form of persistent perl
WARNING process such as FastCGI, you will need to restart your
WARNING web server and any persistent processes now.
WARNING
dbconfig-common: writing config to
/etc/dbconfig-common/request-tracker4.conf
ERROR 1045 (28000): Access denied for user ‘root’@‘FQDN’ (using password:
YES).
unable to connect to mysql server.
error encountered creating user:
ERROR 1045 (28000): Access denied for user ‘root’@‘FQDN’ (using password:
YES)
dbconfig-common: request-tracker4 configure: trying again.
dbconfig-common: writing config to
/etc/dbconfig-common/request-tracker4.conf
dbconfig-common: flushing administrative password
root@bioinfoadmin:/etc/request-tracker4# !apa
apachectl restart
[Tue Mar 6 21:07:39 2012] [warning]: Use of uninitialized value in
concatenation (.) or string at /usr/share/request-tracker4/lib/RT/Handle.pm
line 242. (/usr/share/request-tracker4/lib/RT/Handle.pm:241)

RT couldn’t connect to the database where tickets are stored.
If this is a new installation of RT, you should visit the URL below
to configure RT and initialize your database.

If this is an existing RT installation, this may indicate a database
connectivity problem.

The error RT got back when trying to connect to your database was:

Couldn’t find RT_System user in the DB ‘’

apache2: Could not reliably determine the server’s fully qualified domain
name, using 127.0.1.1 for ServerName
—snip—

Oh and one final note, I found this apache config in the Ubuntu package,
and linked it in properly :

cat /etc/apache2/sites-enabled/rtticket

To use RT together with mod_perl2, available in the

libapache2-mod-perl2 package, include this file with:

Include /etc/request-tracker4/apache2-modperl2.conf

into your Apache configuration file, in a virtual host section.

You will need to enable the Apache modules: perl, actions

The best place for this in the Debian Apache2 default situation is

near the end of the VirtualHost section in the file

/etc/apache2/sites-available/default.

You might want to enable this line

AddDefaultCharset UTF-8

PerlSetEnv RT_SITE_CONFIG /etc/request-tracker4/RT_SiteConfig.pm

You might need to alter references to /rt in this file (there are

three) to match whatever base URL you are using for your RT site

Alias /tickets /usr/share/request-tracker4/html

<Location /tickets>
SetHandler modperl
PerlResponseHandler Plack::Handler::Apache2
PerlSetVar psgi_app /usr/share/request-tracker4/libexec/rt-server

Limit mail gateway access to localhost by default

<Location /tickets/REST/1.0/NoAuth>
Order Allow,Deny
Allow from 127.0.0.1

use Plack::Handler::Apache2;

Plack::Handler::Apache2->preload(“/usr/share/request-tracker4/libexec/rt-server”);

Hi folks,

I have an Ubuntu 11.11 system that I want to install RT onto, but the MySQL
database is on another system. And this seems to be an issue even though
the installer seems to think it can do this.

I found this recent thread but the OP did not report back as to how he got
it to work
[rt-users] Help installing RT4 on Ubuntu

So what did I do?

I installed the packages via apt-get

apt-get install request-tracker4 rt4-apache2 rt4-clients rt4-db-mysql

and then as part of that, it prompted me for a number of things. When it
came to the part where it said it wants to configure the database, I told
it I would do it manually because silly me I did not think it would deal
with having the DB on a separate system. So when the install was done I
went over to my other system and created a DB and user for RT, and gave the
user the proper permissions for the DB. I verified the permissions were
good by doing the DB creation from the RT system. I did this :

mysql --user-rt4 --password=rtticket --host=10.246.159.43
–database=requesttracker4 < /usr/share/request-tracker4/etc/schema.mysql

Where the IP shown is not my RT system, it is the system with the MySQL DB.
This command worked well and so I then went about finding all the files
where I had to make changes for this to work. I thought I had found them,
but when I tried to start Apache I got this :

—snip—
apachectl restart
[Tue Mar 6 21:07:39 2012] [warning]: Use of uninitialized value in
concatenation (.) or string at /usr/share/request-tracker4/lib/RT/Handle.pm
line 242. (/usr/share/request-tracker4/lib/RT/Handle.pm:241)

RT couldn’t connect to the database where tickets are stored.
If this is a new installation of RT, you should visit the URL below
to configure RT and initialize your database.

If this is an existing RT installation, this may indicate a database
connectivity problem.

The error RT got back when trying to connect to your database was:

Couldn’t find RT_System user in the DB ‘’
—snip—

And when I went to the URL for it on my RT system, I got this :

—snip—
Permission denied at /usr/share/request-tracker4/html/Install/index.html
line 98.
—snip—

Then after mucking about a bit more I discovered the
Ubuntu dpkg-reconfigure command, which let me re-do the installation and
this time around I told it to go ahead and configure the database for me.

While I can’t answer questions about the Ubuntu process (but the
packager may chime in with answers) your problem is that while you did
part of the RT database install process, RT doesn’t expect an empty
database, it expects one with a number of existing pieces of data (hence
your error).

You’ll want to review the rt-setup-database --help output.
You could use the --skip-create option to let RT handle the schema and
data pieces, but since you already have the schema in place, you’ll
need to run with --action coredata and with --action insert --datafile
/patch/to/where/ubuntu/puts/our/initialdata file.

-kevin

rt-setup-database --help

OK this is bizarre - when I run that program it mores the source code.
Does not make any sense at all to me. Permissions are fine

-rwxr-xr-x 1 root root 17698 2011-06-28 06:45 /usr/sbin/rt-setup-database-4

But when I type /usr/sbin/rt-setup-database-4 it more’s the source code of
the program instead of running it.

But when I type /usr/sbin/rt-setup-database-4 it more’s the source code of
the program instead of running it.

OK, that seems to be because I was missing perl-doc. Got that installed
and was able to use this program to help me figure things out.

The basic problem seems to be this : when you “GRANT ALL” in MySQL, it does
not actually grant all!!! You get all privs except for the “GRANT” priv -
I had to then manually give the root@RT_HOST user the GRANT priv and then
the database creation went smoothly and I now seem to be running.