Trying to run web installer at /opt/rt4/sbin/rt-server, but nothing happens


#1

I am trying to get RT running on Ubuntu 18.04.1 LTS with RT 4.4.3. I have installed MariaDB and the Apache web server.

I managed to install RT and get all the dependencies installed, as well.

I am at number 6 in the README install instructions.

Here it is, for reference:

6a) If this is a NEW installation (not an upgrade):

  As a user with permission to install RT in your chosen directory,
  type:

      make install

  To configure RT with the web installer, run:

      /opt/rt4/sbin/rt-server

  and follow the instructions.  Once completed, you should now have a
  working RT instance running with the standalone rt-server.  Press
  Ctrl-C to stop it, and proceed to Step 7 to configure a recommended
  deployment environment for production.

  To configure RT manually, you must setup etc/RT_SiteConfig.pm in
  your RT installation directory.  You'll need to add any values you
  need to change from the defaults in etc/RT_Config.pm

  As a user with permission to read RT's configuration file, type:

      make initialize-database

  If the make fails, type:

      make dropdb

  and re-run 'make initialize-database'.

When I ran the ‘make install’, it completed successfully, but it included a message at the end of it, saying I needed to configure RT_SiteConfig.pm .

  1. Is that part supposed to be taken care of in the next step, which states to run the web installer, as shown in the instructions above? Or do I need to do it manually?

  2. I then tried to run the above command, ‘/opt/rt4/sbin/rt-server’, as root, but the command line just blinks and nothing launches.

  3. Do I need to configure Apache web server manually for RT, or will the rt-server command above configure Apache, as well?

  4. I have been trying to install fcgid, since it appears FastCGI is deprecated, but I have found no instructions in the RT documentation about how to actually install the module, just a blurb about how the virtual host should be configured. That blurb does not mention, I believe, how to install fcgid or to add any needed lines to the Apache config files (blurb here: https://docs.bestpractical.com/rt/4.4.3/web_deployment.html#mod_fcgid ) When I run the command, ‘sudo a2enmod fcgid’, I get: “Module fcgid already enabled”, so is that all I need to do?

  5. Is some sort of FastCGI or fcgid module required to get RT to install/run, or will RT run (slowly) without it?

  6. What are some of the error logs I should be checking at this point?

EDIT: I got the testing RT website to come up. Great, but, can someone at least address point 2? What is the expected behavior of the web installer? Is it supposed to launch?


#2

Got the RT webpage to be accessible, but not the web installer.

Much help was found at the following page: https://suchafias.co/blog/2015/06/rt4-on-ubuntu14-04/

I was able to manually configure the RT_SiteConfig.pm. Key info is below:

Set($WebBaseURL, “http://rt4.mysite.com”);
Set($WebPath, “”);
Set($WebPort, 1005);
Set($WebDomain, ‘rt4.mysite.com’);

I was then able to set up a virtual host in the /etc/apache2/sites-available directory with the following info:

<VirtualHost *:80>
ServerName rt4.mysite.com
AddDefaultCharset UTF-8
ScriptAlias / /opt/rt4/sbin/rt-server.fcig/
DocumentRoot “/opt/rt4/share/html”

Require all granted

            Options +ExecCGI
            AddHandler fastcgi-script fcgi
    </Location>

I then entered the following info in the /etc/hosts file:

127.0.0.1 rt4.mysite.com

I then started /opt/rt4/sbin/rt-server and went to the web URL ‘http://rt4.mysite.com:1005’ and it worked to bring up the login page.

I logged in with root, tried to go to New Dashboard and ran into the following error (from the running rt-server terminal window):

Possible CSRF: the Referrer header supplied by your browser (rt4.mysite.com:1005) is not allowed by RT’s configured hostname (rt4.mysite.com:80) (/opt/rt4/sbin/…/lib/RT/Interface/Web.pm:1664)

I then added a whitelist entry to the RT_SiteConfig.pm, as below:

Set(@ReferrerWhitelist, qw(rt4.mysite,com:1005));

I just wanted to pave the way for anybody who finds this ticket and can glean some help from it. I’m still not sure if I have fcgid parameters set correctly in the VirtualHosts block, nor do I understand why RT seems to be working when there are no directories in the /var/www directory for RT.

Looking back on this, I suppose I could have tried just setting the port number on the VirtualHost block to 1005.

HOWEVER. I still don’t know why the web installer has never launched.


#3

Is there a reason why you’re using port 1005 rather than 80 (or 443 for https)?


#4

I believe I ran into some text in the setup process that recommended against setting the port number for the RT site to be 80. It might have been an erroneous error message due to my misconfiguration. I’ll try to find it and post it here.

EDIT:

The message was:

WARNING: RT couldn’t start up a web server on port 80. This is often the case if the port is already in use or you’re running rt-server as someone other than your system’s “root” user. You may also specify a temporary port with: rt-server --port

The solution in this particular case was to check and see if RT is already running. In my case, it was; I went to the web UI and was able to log in. That was my mistake, of course, but it’s also good to note that the error message doesn’t seem to be sophisticated enough to tell the user that RT might already be running. Perhaps? So, regardless, if someone receives this error message, check and see if RT is already up and running because it could be the very service that is blocking the new rt-server process from starting.