White dot for spacing only
The Dice Project

Tips for RT

Restoring a database ; Changing the root password; Connect failed (rt_user); webmux.pl problem;
Connect failed (mysql.sock); rt-mailgate not working; Where was the rpm built ?; Where are the logs ?;
Limiting the tickets that users can see; SSH keys Clear Mason Cache

Restoring a database

mysql <database_name> - u root -p < <dumpfile>

	e.g. mysql rt3 -u root -p < /tmp/rt-dump-Fri.sql

     You may also need to update RT's database.  To find out, type:

       ls etc/upgrade

     For each item in that directory whose name is greater than
     your previously installed RT version, run:

       /opt/rt3/sbin/rt-setup-database --action schema \
           --datadir etc/upgrade/version
       /opt/rt3/sbin/rt-setup-database --action acl \
           --datadir etc/upgrade/version
       /opt/rt3/sbin/rt-setup-database --action insert \
            --datadir etc/upgrade/version

     Clear mason cache dir:

       rm -fr /opt/rt3/var/mason_data/obj

     Stop and start web-server.

Changing the root password.

This should only need to be done once for each new installation. Check in the RT installation documentation to see where the initial password is kept.

[sykes]root: mysql -u root --password
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 18 to server version: 3.23.58

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> UPDATE mysql.user SET Password=PASSWORD('********') WHERE User='root';
Query OK, 2 rows affected (0.00 sec)
Rows matched: 2   Changed: 2  Warnings:  0

Query OK,  0 rows affected (0.00 sec)

mysql> exit

Connect failed Access denied for user: 'rt_user@localhost'

GRANT ALL PRIVILEGES ON rt3.* to 'rt_user'@'localhost' IDENTIFIED BY 'rt_pass';

webmux.pl problem


	system("touch $RT::MasonDataDir/obj/fake_file");

just before the offending line:

	rmtree([ bsd_glob)"$RT::MasonDataDir/obj/*") ], 0, 1);

Connect Failed Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock'

Check that the file exists. Sometimes it doesn't - so stop/start mysql and try again. Check that the permissions are correct. The mysql directory should look like:

drwxr-xr-x     5  rt	  mysql    4096 Dec  7 12:24 mysql

Sometimes om mysql stop appears to work but it still leaves a mysqld process running. If this happens, use kill to remove it and then start mysql again.

Tickets are created OK within RT but the rt-mailgate doesn't work

We had to add the following to the httpd.conf.rt file:

<Directory  /opt/rt3/share/html/REST>
      AllowOverRide None
      Satisfy Any

Also check that rt-mailgate is executable.

Also, in rt's procmailrc, change

/usr/bin/ssh rt3.inf.ed.ac.uk \


/usr/bin/ssh rt3.inf.ed.ac.uk 2>/dev/null\

(This gets rid of a warning message about X forwarding from the ssh command which confuses rt-mailgate!)

Where was the 308 rpm built?

The rpm was built on london/ The rt and rt.orig directories are under /disk/scratch. The rt3.inf.linux.patch file was made from the 'diff' of these 2 directories.

	diff -Naur rt-3.0.8.orig rt-3.0.8 > rt3.inf.linux.patch

So, where are the logs?

On the rt server, the file /tmp/error_log will show apache things. Another file to search is /opt/rt/var/log/rt.log.

On the mail server, in rt's home directory, there is a log file - log-file - for mail stuff. Mail is also copied to Incoming.copy in the Mail directory.

Limiting users to see tickets after September 2004.

This is done, rather crudely, by only showing tickets with an id greater than 12844. So, in Display.html, we added:

	unless ( $id > 12844 ) {
    	   $m->comp( 'Error.html',
                     Why => loc("No permission to display that ticket") );

Setting up the keys for mailgate.

On the mail server, as rt user in their home directory:

	ssh-keygen -t -dsa
	cd ~/.ssh
	copy id_dsa.pub to rt server
	ssh to the rt server
	as rt user, cat id_dsa.pub >> ~/.ssh/authorized_keys

To test it, make sure that from the mail server, you can do:

	ssh rt3.inf.ed.ac.uk w
without being prompted for a password.

Clearing Mason Cache.

If you make any changes in share/html or local/html, then you need to clear mason cache for the changes to take effect. To do this run:

rm -rf /opt/rt3/var/mason_data/obj/*

 : Units : User_support 

Mini Informatics Logo - Link to Main Informatics Page
Please contact us with any comments or corrections.
Unless explicitly stated otherwise, all material is copyright The University of Edinburgh
Spacing Line