Installation problem with RT-3.8.1 and Postgresql 8.1.9

Hi,

I am trying to install RT 3.8.1 with Postgresql 8.1.9 for the database.

I configured RT with

./configure --with-db-type=Pg --with-db-dba=postgres

then did a ‘make testdeps’ which returned that all was OK. Next, I did
a ‘make install’, again all seemingly OK.

However, at the step ‘make initialize-database’ I get the following error:

[root@WEB rt-3.8.1]# make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba postgres
–prompt-for-dba-password
In order to create or update your RT database, this script needs to
connect to your Pg instance on localhost as postgres
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
Working with:
Type: Pg
Host: localhost
Name: rt3
User: rt_user
DBA: postgres
Failed to connect to dbi:Pg:dbname=template1;host=localhost as user
’postgres’: FATAL: Ident authentication failed for user
"postgres"make: *** [initialize-database] Error 255

If I go into Postgresql and have the postgres user info shown, there
appears to be no password set for this user, yet it seems that the
authentication fails for an empty password. I don’t know the postgres
user password, if there is one set. I could reset it but there are
other applications running on this server that use Postgresql and the
user postgres, so I don’t want to blow them away.

I have searched the mailing list archives for answers and while I can
see that other people have had problems with RT and Postgresql, I have
not found an answer to my problem yet. I have also gone through the RT
book, but didn’t find the solution in there either.

Any ideas? Thx.

Roland

This suggests that maybe your postgres isn’t configured with support for
Password authentication.

JesseOn Fri 28.Nov’08 at 15:11:32 +1100, Roland Goecke wrote:

Hi,

I am trying to install RT 3.8.1 with Postgresql 8.1.9 for the database.

I configured RT with

./configure --with-db-type=Pg --with-db-dba=postgres

then did a ‘make testdeps’ which returned that all was OK. Next, I did
a ‘make install’, again all seemingly OK.

However, at the step ‘make initialize-database’ I get the following error:

[root@WEB rt-3.8.1]# make initialize-database
/usr/bin/perl sbin/rt-setup-database --action init --dba postgres
–prompt-for-dba-password
In order to create or update your RT database, this script needs to
connect to your Pg instance on localhost as postgres
Please specify that user’s database password below. If the user has no database
password, just press return.

Password:
Working with:
Type: Pg
Host: localhost
Name: rt3
User: rt_user
DBA: postgres
Failed to connect to dbi:Pg:dbname=template1;host=localhost as user
‘postgres’: FATAL: Ident authentication failed for user
"postgres"make: *** [initialize-database] Error 255

If I go into Postgresql and have the postgres user info shown, there
appears to be no password set for this user, yet it seems that the
authentication fails for an empty password. I don’t know the postgres
user password, if there is one set. I could reset it but there are
other applications running on this server that use Postgresql and the
user postgres, so I don’t want to blow them away.

I have searched the mailing list archives for answers and while I can
see that other people have had problems with RT and Postgresql, I have
not found an answer to my problem yet. I have also gone through the RT
book, but didn’t find the solution in there either.

Any ideas? Thx.

Roland


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

I am trying to install RT 3.8.1 with Postgresql 8.1.9 for the database.

Failed to connect to dbi:Pg:dbname=template1;host=localhost as user
‘postgres’: FATAL: Ident authentication failed for user
"postgres"make: *** [initialize-database] Error 255

From Debian’s rt package :

[…]
2. Configure the database access permissions

Ensure that you can access the database server as the rtuser SQL user.

psql -d template1 -U rtuser -W

enter the password at the prompt.

If this fails (it probably will with the default Debian PostgreSQL
installation) then you probably need to change the access permissions
that you have set for your database server.

For PostgreSQL, this can be solved by editing the file
/etc/postgresql/pg_hba.conf and adding lines like these:

host template1 rtuser 127.0.0.1 255.255.255.255 password
local template1 rtuser password
host rtdb rtuser 127.0.0.1 255.255.255.255 password
local rtdb rtuser password

at the bottom of the file along with the other similar lines - but
above existing entries.

(rtdb is whatever you have configured the $DatabaseName variable to be
in the RT_SiteConfig.pm.)

Note that the order of entries in the pg_hba.conf DOES MATTER. The
first matching entry will be used and there is no fall through
mechanism if the first one fails. (See section 6.1 of the PostgreSQL
Administrator’s manual for full details). The local entries above must
be put above the default local all/all if you want to able to access
the rtdb database as the rtuser from the command line using psql.

Restart the PostgreSQL server and try again with psql. If the database
server is on a different machine from that of the RT instance you will
need to configure these lines yourself.

Note that for PostgreSQL the rt-setup-database script needs permission
to connect to the template1 database as well as the RT
database. Giving permission to connect like this does not give out
actual read/write permission so doing this for the rt user can
generally be considered safe on the local system. Once you have
created and initialised your RT database you should remove the
template1 lines as they will not be needed for any other purpose.
[…]

HTH,