5.0.3 RT Install on Ubuntu 20.04.5 LTS RT-Server Start Issue

I’m attempting an install on an Azure VM running Ubuntu 20.04.5 and am having a hard time getting things working.

Using the manual installation doc, I’m at the part where you sudo systemctl enable --now rt-server.socket, and then modify your apache2 config (in my case).

I have an apache default page appearing on both ports 80 and 443. I attempt to start my rt-server service and it appears to work. I get Loaded and Active, but that only lasts for about 15 to 20 seconds and then it goes inactive.

Here’s what the start looks like:

sudo systemctl status rt-server
● rt-server.service - RT FCGI server
Loaded: loaded (/etc/systemd/system/rt-server.service; static; vendor preset: enabled)
Active: active (running) since Tue 2022-11-01 20:41:07 UTC; 2s ago
TriggeredBy: ● rt-server.socket
Main PID: 177298 (multiwatch)
Tasks: 4 (limit: 9443)
Memory: 467.6M
CGroup: /system.slice/rt-server.service
├─177298 /usr/bin/multiwatch --forks=3 --signal=TERM – /opt/rt5/sbin/rt-server.fcgi
├─177313 perl -I/opt/rt5/local/lib/perl5 -w /opt/rt5/sbin/rt-server.fcgi
├─177314 perl -I/opt/rt5/local/lib/perl5 -w /opt/rt5/sbin/rt-server.fcgi
└─177315 perl -I/opt/rt5/local/lib/perl5 -w /opt/rt5/sbin/rt-server.fcgi

Nov 01 20:41:07 hrutil02 systemd[1]: Started RT FCGI server.

And then here’s what happens next:

sudo systemctl status rt-server
● rt-server.service - RT FCGI server
Loaded: loaded (/etc/systemd/system/rt-server.service; static; vendor preset: enabled)
Active: inactive (dead) since Tue 2022-11-01 20:41:24 UTC; 28s ago
TriggeredBy: ● rt-server.socket
Process: 177298 ExecStart=/usr/bin/multiwatch --forks=3 --signal=TERM – /opt/rt5/sbin/rt-server.fcgi (code=exited, status=0/SUCCESS)
Main PID: 177298 (code=exited, status=0/SUCCESS)

Nov 01 20:41:07 hrutil02 systemd[1]: Started RT FCGI server.
Nov 01 20:41:24 hrutil02 systemd[1]: rt-server.service: Succeeded.

I suspect a database connection error but my rt_user / password combination works fine on the command line. I’m stumped. Any help would be greatly appreciated!

Update:

I’ve run the following and got this output below - Seems to confirm database connectivity issues, but it’s confusing as the config pages say after, supplying the db usernames and passwords confirms connectivity.

perl -I/opt/rt5/local/lib/perl5 -w /opt/rt5/sbin/rt-server.fcgi

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 ‘dbi:mysql:dbname=rt5;host=localhost’

HTTP::Server::PSGI: Accepting connections at http://0:443/
[218087] [Wed Nov 2 17:27:49 2022] [warning]: The requested host (172.22.129.32) does NOT match the configured WebDomain (hrsupport.corp.nexient.com). Perhaps you should Set($WebDomain, ‘172.22.129.32’); in RT_SiteConfig.pm, otherwise your internal hyperlinks may be broken. (/opt/rt5/sbin/…/lib/RT/Interface/Web.pm:1442)
[218087] [Wed Nov 2 17:36:21 2022] [warning]: DBD::mysql::st execute failed: Access denied for user ‘rt_admin’@‘localhost’ to database ‘mysql’ at /opt/rt5/sbin/…/lib/RT/Handle.pm line 475. (/opt/rt5/sbin/…/lib/RT/Handle.pm:475)
[218087] [Wed Nov 2 17:36:21 2022] [error]: DBD::mysql::st execute failed: Access denied for user ‘rt_admin’@‘localhost’ to database ‘mysql’ at /opt/rt5/sbin/…/lib/RT/Handle.pm line 475.

Stack:
[/opt/rt5/sbin/…/lib/RT/Handle.pm:475]
[/opt/rt5/share/html/Install/Initialize.html:120]
[/opt/rt5/share/html/Install/autohandler:60] (/opt/rt5/sbin/…/lib/RT/Interface/Web/Handler.pm:216)

You need to make sure that the MySQL settings that you’ve given RT let it connect to the database server. That error is telling you that isn’t the case.

I’ve rebuilt with PostgreSQL and have gotten the rt-server service to start and stay running. Now I’m fighting with Apache2. I think we can call this one solved. Thanks for the reply.

Hi Charles,
are you running a self hosted PG instance or do you use PG as a Service? I’m running RT on Azure since a few years and using PG as a Service. But I always had to patch core files to accept the user for login. PG requires you to login as user@servername. In case you use PG as a service, let me know and I will provide you the parts I had to change. This is not an issue if you have Postgres running selfhosted on a VM.
Regards,
Manuel

Thank you Manuel_Lauk

In our case it’s self hosted and we didn’t have any problems with PG once the rebuild was done. Seems like something was still stuck on MySQL which was causing the problem. Dust and rebuild solved that. :slight_smile:

FWIW, RT 5.0.3 is a massive regression with broken search functionality that appears to also provide a path to SQL Injection. I’ve brought this up everywhere I can think of, but I haven’t seen any traction. I’m stuck on 5.0.2 until it’s fixed.

Hi. I setup RT 5.0.3 and have problems with incoming e-mail parsing for some of emails.
There is my post: Ticket create error DBD::Pg::st execute failed: ERROR: invalid input

That can be related to what you mention about broken functions in 5.0.3?

Hi Girts - I’m afraid not - This ticket is out of date - I was able to get rt-server service to start and login to the RT instance via the web and it looks OK.

I have two issues now:

  1. Getting wsgetmail to work. I’m doing a wsgetmail --debug --dry-run --config=/wsgetmail.json

It’s getting the mail from Graph API, and I’m getting a response email but it still errors out

failed to run command “/opt/rt5/bin/rt-mailgate --url=https://myrtserver.corp.company.com/ --queue=General --action=comment” for file /tmp/tayrLkmMHu.mime : 19200 at /usr/local/share/perl/5.30.0/App/wsgetmail/MDA.pm line 204.

My /var/log/apache2/error.log throws the following error:

[Tue Nov 15 21:35:24.625644 2022] [proxy_fcgi:error] [pid 1018:tid 140243885872896] [client 172.22.129.32:52010] AH01067: Failed to read FastCGI header
[Tue Nov 15 21:35:24.625749 2022] [proxy_fcgi:error] [pid 1018:tid 140243885872896] (70014)End of file found: [client 172.22.129.32:52010] AH01075: Error dispatching request to :

  1. I need to get LDAP configured. My old RT 4x was setup for LDAP and allows us to login with our domain credentials but this newer version is different enough that I can’t copy the old configs and I don’t know how to set this up.

If you have gotten past these issues, I’d appreciate any advice / help you can give.

Has anyone setup wsgetmail and got it working? I’m stuck :slight_smile: