Why RT_SiteConfig.pm locked?

Hi,

Please help me. I have RT4 on Debian squeeze with Apache2/mod_perl &
PostgreSQL. After any reboot i can’t enter to RT. On the start page i see
message about locked file RT_SiteConfig.pm. But after i reload apache site
begin work correct. What locked my config file and how i can avoid it?
Best regards,
Arkady Glazov
http://globster.ru

Hi,

Please help me. I have RT4 on Debian squeeze with Apache2/mod_perl &
PostgreSQL. After any reboot i can’t enter to RT. On the start page i
see message about locked file RT_SiteConfig.pm. But after i reload
apache site begin work correct. What locked my config file and how i can
avoid it?

Best regards,
Arkady Glazov
http://globster.ru

The problem is that Apache starts before PostgreSQL.
You can fix this the same way that it is fixed in the Debian RT package:
http://anonscm.debian.org/gitweb/?p=pkg-request-tracker/request-tracker4.git;a=blob;f=debian/request-tracker4.init;h=22f9bc951f8a673c769a010bd97b97882716cfb5;hb=HEAD

Safe this as /etc/init.d/request-tracker4 and run
update-rc.d request-tracker4 defaults

Chris

Hi all.
I know this is a very old thread, but as this just happened to me I’d like to find a permanent fix.
Unfortunately the link posted by @Loos_Christian does not work anymore.
Is there someone that can point me to a current resource?
Thank you in advance
Cris

A quick fix could be adding this to the end of crontab:

@reboot /usr/sbin/service postfix stop && /usr/sbin/service apache stop
@reboot sleep 5 && /usr/sbin/service postgresql restart && rm -fr /opt/rt4/var/mason_data/obj && /usr/sbin/service apache start && chown www-data.www-data /opt/rt4/var/mason_data/obj && /usr/sbin/service postfix start

This stops mailserver because you don’t want to accept any email when apache (RT application) is not working, then stop apache and start all components in correct order. You can make a script for that.

@Guadagnino_Cristiano, that file now lives at debian/request-tracker4.init · master · Request Tracker Packaging / request-tracker4 · GitLab

That (apparently) dummy script serves to synchronize them so that databases start before apache.

Thank you @Petr_Hanousek and @Angel for your replies.
Unfortunately both replies assume that the database resides on the same server where Apache runs, but we have a two-server setup, with mysql running on a different (back-end) server with respect to the HTTP server.
I’ll have to cook up a way to sync the two servers.
Suggestions are obviously very welcome :slight_smile:

So the reason is different than an Apache is running prior the database as the database runs always, right? According to this I assume there is a database connection error. I also assume you have set in RT_SiteConfig.{pm|d} the connection config:

Set($DatabaseUser , 'rt_database_user');
Set($DatabasePassword , 'rt_database_user_password');
Set($DatabaseName , 'rt_database');

So any firewalls in the path?

BTW now we found, during introducing shibboleth as authentication system, that RT behave like this when system users ‘RT_System’ and ‘Nobody’ users are not found. This was because we accidentaly renamed them to ‘RT_System@organization.cz’ to be compatible with shibboleth. Don’t do it for system users :slight_smile:

1 Like