Installation fails at point 6a)

Hello, I’m installing RT on Centos 7 following https://docs.bestpractical.com/rt/4.4.3/README.html.
I get to the point 6a)

  To configure RT with the web installer, run:

      /opt/rt4/sbin/rt-server

If I try to access the server, it crashes:

[root@localhost etc]# /opt/rt4/sbin/rt-server

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=rt4;host=1.1.1.1’

HTTP::Server::PSGI: Accepting connections at http://0:80/
[3591] [Fri Oct 12 07:35:58 2018] [critical]: Something went wrong while trying to run RT’s standalone web server:
Undefined subroutine &RT::ObjectCustomFieldValues::ClearOCFVCache called at /opt/rt4/sbin/…/lib/RT/Interface/Web/Handler.pm line 202. (/opt/rt4/sbin/…/lib/RT.pm:408)
Something went wrong while trying to run RT’s standalone web server:
Undefined subroutine &RT::ObjectCustomFieldValues::ClearOCFVCache called at /opt/rt4/sbin/…/lib/RT/Interface/Web/Handler.pm line 202.

Any suggestions?
Thanks.

Hello,

I have the same problem on Ubuntu 16.04.
Did you succeeded to solve it?

Thanks!

Did you try the manual configuration (the second part of 6a)?

Its simple enough to just edit the config file by hand instead of use the web installer.

That error reads to me like RT is trying to do stuff that assumes configuration is complete, but you’re trying to run the web installer. I didn’t try it so I’m probably wrong, but thats the next thing to try anyways.

Finally I commented out the line no. 202 in file lib/RT/Interface/Web/Handler.pm, like:
#RT::ObjectCustomFieldValues::ClearOCFVCache();
As I can see it is a new thing in 4.4.3 that’s why I dare to comment it out :slight_smile:
After that it works with web installation.
I think it is a bug.

@BALINT_Bekeny I did same as you (commenting out the Handler.pm line)but while the Web interface setup now works, still no joy since i get * Failed to connect to database: FATAL: Ident authentication failed for user “postgres”.

I’m sure of the password since i can login locally from the command line successfully.

vim /var/lib/pgsql/data/pg_hba.conf contains:

local all all md5
host all all 127.0.0.1/32 ident
host all all ::1/128 ident

I tried to change the 127.0.0.1/32 line to “md5” and restarted postgresql, same result. I’m used to debug systems but now i’m a bit lost… Code bug? Don’t know. Here are the infos about my VM:

cat /etc/redhat-release
CentOS Linux release 7.6.1810 (Core)

rpm -qa |grep postgres
postgresql-9.2.24-1.el7_5.x86_64
postgresql-libs-9.2.24-1.el7_5.x86_64
postgresql-devel-9.2.24-1.el7_5.x86_64
postgresql-server-9.2.24-1.el7_5.x86_64

perl-5.16.3-294.el7_6.x86_64

SELinux and the firewall are disabled. /etc/hosts is filled with FQDN and short server name. DNS entry is OK and resolve to the right IP address.

@gboisvert Sorry I can’t help you. I usually use MariaDB to install RT. I think you are searching for the solution at the right place (pg_hba.conf), but I don’t know what you should modify in that file. At first I would try “trust”, “peer” or “password” instead of md5, just to know if it helps or not.

Hey,

Usually the postgres database user doesn’t have a password associated with it.

Often times you would set up a local admin database account:

  • $ su - postgres
  • $ createuser -s -P new_local_admin
  • <type password here>

And then modify your pg_hba.conf to allow access to new_local_admin

Then you have an admin account that has a password.

Alternatively you can set a password for your database user, “postgres”.

Once you get psql to work with your database, then RT should also be able to also connect to your database.

$ psql -U new_local_admin -W -h 127.0.0.1 template1

I just read a wiki page for Pg:

https://wiki.postgresql.org/wiki/Don't_Do_This#Don.27t_use_psql_-W_or_--password

So… don’t use the ‘-W’ in the psql connection.