Unable to get RT to run on Apache on RHEL8

When I attempt to load the RT webpage, I get the following error in /var/log/httpd/error_log:

[Mon Dec 20 18:04:32.363582 2021] [fcgid:warn] [pid 39524] (104)Connection reset by peer: [client 10.23.165.77:51873] mod_fcgid: error reading data from FastCGI server
[Mon Dec 20 18:04:32.363659 2021] [core:error] [pid 39524] [client 10.23.165.77:51873] End of script output before headers: rt-server.fcgi

I’ve done quite a bit of research:
I updated /etc/httpd/conf/httpd.conf

<IfModule mod_fcgid.c>
FcgidBusyTimeout 3600
FcgidIOTimeout 3600
</IfModule>


AddDefaultCharset UTF-8
ScriptAlias / /opt/rt5/sbin/rt-server.fcgi/
DocumentRoot “/opt/rt5/share/html”

Require all granted
Options +ExecCGI
AddHandler fcgid-script fcgi

I have updated /etc/httpd/conf.modules.d/10-fcgid.conf

LoadModule fcgid_module modules/mod_fcgid.so
FcgidMaxRequestLen 1073741824
FcgidConnectTimeout 120
FcgidIOTimeout 120
FcgidBusyTimeout 120

I’ve run make fixperms
I’m running prefork mpm

Nothing seems to change. Any suggestions?

What are the user/group rights on the RT /opt/rt5/etc files? My first guess is always Linux rights. Does the file owners match the Apache user and group?

Also make sure that SELinux isn’t getting in the way, either by looking carefully at it’s audit log or temporarily disabling it and then seeing if things work for (and then fixing it so you can turn the SELinux protection back on!).

The short answer is yes. SELinux is already disabled. I have checked the permissions as well. I had already changed RT_Config.pm & RT_SiteConfig.pm to apache:apache. However, the rest were owned by root:rt. I ran chown -R apache:apache /opt/rt5/etc with no change. The error persists and I cannot load any web pages.

[deoneill@rt ~] $ sestatus
SELinux status: disabled

[deoneill@rt ~] $ ls /opt/rt5/etc/* -ld
-r-xr-xr-- 1 apache apache 141764 Dec 19 23:07 /opt/rt5/etc/RT_Config.pm
drw-rw-r-- 2 apache apache 6 Jul 13 13:17 /opt/rt5/etc/RT_SiteConfig.d
-r-xr-xr-- 1 apache apache 1618 Dec 20 09:48 /opt/rt5/etc/RT_SiteConfig.pm
-r-----r-- 1 apache apache 27 Dec 19 22:34 /opt/rt5/etc/acl.Oracle
-r-----r-- 1 apache apache 2411 Dec 19 22:34 /opt/rt5/etc/acl.Pg
-r-----r-- 1 apache apache 708 Dec 19 22:34 /opt/rt5/etc/acl.mysql
-r-----r-- 1 apache apache 5918 Dec 19 22:34 /opt/rt5/etc/cpanfile
-r-----r-- 1 apache apache 37429 Dec 19 22:34 /opt/rt5/etc/initialdata
-r-----r-- 1 apache apache 21388 Dec 19 22:34 /opt/rt5/etc/schema.Oracle
-r-----r-- 1 apache apache 19263 Dec 19 22:34 /opt/rt5/etc/schema.Pg
-r-----r-- 1 apache apache 18344 Dec 19 22:34 /opt/rt5/etc/schema.SQLite
-r-----r-- 1 apache apache 20223 Dec 19 22:34 /opt/rt5/etc/schema.mysql
drwxr-xr-x 99 apache apache 4096 Dec 19 22:34 /opt/rt5/etc/upgrade

The long answer is more complicated. I am trying to migrate & upgrade from RHEL4 RT 3.6.4 to RHEL8 RT 5.0.1. I have run the configure and makes multiple times fixings error along the way.

Early in the process I saw in invalid user and group messages. RT was trying to install as either www or www-data I do not recall exactly but RHEL8 runs as apache:apache. I found this command fixes most of the early errors

./configure -with-web-user=apache --with-web-group=apache

Later I saw erros about permissions on RT_Config.pm, RT_SiteConfig.pm and mason_data. I found the following command fixed those errors:

chmod 554 /opt/rt5/etc/RT_SiteConfig.pm
chmod 554 /opt/rt5/etc/RT_Config.pm
chown apache:apache /opt/rt5/etc/RT_Config.pm
chown apache:apache /opt/rt5/etc/RT_SiteConfig.pm
chown apache:apache /opt/rt5/var/mason_data

I’ve also had to tweak some on the MySQL configurations to get the import and upgrade commands to work.

The final step is getting the webserver to work. This is were I am currently stuck… webpage won’t load

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

[deoneill@rt ~] $ sudo tail /var/log/httpd/error_log
RT since version 3.8 has new schema for MySQL versions after 4.1.0
Follow instructions in the UPGRADING.mysql file.

[Tue Dec 21 00:30:23.779497 2021] [fcgid:warn] [pid 41246] (104)Connection reset by peer: [client 10.23.165.77:52512] mod_fcgid: error reading data from FastCGI server
[Tue Dec 21 00:30:23.779551 2021] [core:error] [pid 41246] [client 10.23.165.77:52512] End of script output before headers: rt-server.fcgi
RT since version 3.8 has new schema for MySQL versions after 4.1.0
Follow instructions in the UPGRADING.mysql file.

[Tue Dec 21 00:30:25.472311 2021] [fcgid:warn] [pid 39522] (104)Connection reset by peer: [client 10.23.165.77:52511] mod_fcgid: error reading data from FastCGI server, referer: http://rt.cos.is.keysight.com/index.html
[Tue Dec 21 00:30:25.472384 2021] [core:error] [pid 39522] [client 10.23.165.77:52511] End of script output before headers: rt-server.fcgi, referer: http://rt.cos.is.keysight.com/index.html

This seems unrelated, you could turn off Apache and run the dev server manually to rule out Apache being the issue. You can run the web server with /opt/rt5/sbin/rt-server.

You can also configure RT to run with a different db rt_test for instance and create an empty RT make initdb (Just don’t delete your current DB!) and see if Apache serves the RT web UI. That will tell you if the issue is Apache or the upgraded DB

Thanks. I agree the MySQL statement seemed like it was only informational. But did not want to edited the apache error logs in case it pointed to a different issue,

I stopped apache using systemctl stop httpd and started /opt/rt5/sbin/rt-server . It seems to starts with this output.

[deoneill@rt ~] $ /opt/rt5/sbin/rt-server
RT since version 3.8 has new schema for MySQL versions after 4.1.0
Follow instructions in the UPGRADING.mysql file.

[deoneill@rt ~] $

But I get an error

This site can’t be reached
rt.cos.is.keysight.com refused to connect.
Try:

I cannot find the logs to see why it failed. The scripts say Log output will then go to var/access.log.
But I cannot find a file named access.log.

[deoneill@rt ~] $ sudo find /var/ -name access.log
[deoneill@rt ~] $ sudo find /opt/rt5/ -name access.log
[deoneill@rt ~] $

I no I meant the issue is almost certainly the schema warning and not necessarily to do with your webserver. What happens if you create an empty db and run the standalone server?

Looking at the code

unless ( $show_table->("Attachments") =~ /\bContent\b[^,]*BLOB/i ) {
                return (0, "RT since version 3.8 has new schema for MySQL versions after 4.1.0\n"
                    ."Follow instructions in the UPGRADING.mysql file.");
            }

Maybe your attachments table is in a weird state?

I do have a thread for that error. But no one responded.

When I go step by step through the queries.sql, I find a single SQL command that fails:

mysql> ALTER TABLE Attachments MODIFY Content LONGBLOB NULL DEFAULT NULL;
ERROR 1283 (HY000): Column ‘Content’ cannot be part of FULLTEXT index

3.X is before my time, but I thought after a search online that the issue was related to mixed content types in the table

The problem is I have no idea how to fix it… I tried using both phpmyadmin and msql commands but I cannot change content from longtext to longblog

My question is “why does Attachments have a FULLTEXT index?”
Recent fulltext indexing usually uses a modified copy of the Attachments table to filter it down to stuff that you can actually index (types text/plain and text/html mostly).
Can you drop the fulltext index, do the upgrade, and then go through the upgrade notes (other notes?) to re-enable full text searching?

Our RT server has been in used 10-15 years. I was told to perform an upgrade because it is running onRHEL4. I have not idea why it was doing a FULLTEXT index.

I dropped FULLTEXT index and it seemed to upgrade fine and I get a web login page.

mysql> ALTER TABLE Attachments MODIFY Content LONGBLOB NULL DEFAULT NULL;
Query OK, 102355 rows affected (30.12 sec)
Records: 102355 Duplicates: 0 Warnings: 0

Do I need some sort of index on the content column? If so what is the default?

THANKS!!!

I am able to login using the password on the old server and the new upgraded.
Right now my only concerns is whether removing the index will break something else.

You could try re-generating the full text index, sbin/rt-setup-fulltext-index

That defaults to creating a new table called AttachmentsIndex. Do I want to specify the existing table Attachments or create the new table AttachmentsIndex?

[deoneill@rt /opt/rt5] $ sbin/rt-setup-fulltext-index
MySQL 5.6 and above, and MariaDB 10.0 and above, support native full-text indexing.
For compatibility with earlier versions of RT, the external Sphinx indexer is
still supported only on MySQL. Select ‘mysql’ indexing if you are using MariaDB.

Which indexing solution would you prefer? {mysql|sphinx}
[mysql]:

Enter the name of a new table that will be used to store the
full-text content and indexes:
[AttachmentsIndex]:

Please enter mysql admin password:

See docs/UPGRADING-4.2 section “UPGRADING FROM 4.2.10 AND EARLIER”. (down around line 330).
Tells you why things happened and where to look for setting it up in the latest versions.

It won’t work with the current Attachments table since it needs a FULLTEXT index on it and we already know that doesn’t work. :slight_smile:
Go for the defaults in this case.