Page 1 of 1

Problem updating from 1.1.8 to 1.2.0 (PostgreSQL)

Posted: 10 Jul 2010, 06:35
by nomikon
I'm attempting to upgrade our current 1.1.8 installation to 1.2.0. When is comes to Database upgrade, I set the DB details (username and pasword). After clicking the upgrade button I get the following page:

Database Parameters
Upgrade Options
Admin username and password
Setting Database Hostname GOOD
Setting Database Type GOOD
Checking PHP support for database type GOOD
Setting Database Username GOOD
Setting Database Password GOOD
Setting Database Name GOOD
Setting Admin Username GOOD
Setting Admin Password GOOD
Attempting to connect to database as admin BAD
Does administrative user have access to the database? ( Database connection failed )

Looking at the PostgreSQL log, it seems that the upgrading process is attempting to connect to 'template1' database, instead of 'mantis' database, as it should do:

Jul 10 08:19:30 agora postgres[41626]: [2-1] LOG: received connection: host=127.0.0.1 port=55536
Jul 10 08:19:30 agora postgres[41626]: [3-1] LOG: authorized connection: usuario=mantis database=template1
Jul 10 08:19:30 agora postgres[41626]: [4-1] FATAL: permission denied to database <<template1>>
Jul 10 08:19:30 agora postgres[41626]: [4-2] DETAIL: User has no connection privileges.

(Using PostgreSQL 8.4.4, PHP 5.2.12, on FreeBSD 8.0)

Any help?
NK.

Re: Problem updating from 1.1.8 to 1.2.0 (PostgreSQL)

Posted: 29 Jul 2011, 21:26
by maxxemm
Just to clarify, I am not upgrading but installing fresh version 1.2.0. However the problem seems to be the same for both fresh install and upgrade.

I have granted mantis admin user privileges to template1. The problem still existed but it was actually complaining about about connection refused:
could not connect to Ident server at address "::1", port 113: connection refused.
So I changed in pg_hba.conf file connections from ::1/128 to be "trust" instead of "ident sameuser", restarted postgres and it worked.

Probably granting an access to mantis admin user to template1 is not a good idea, but this was my first idea before I changed the pg_hba.conf. Just didn't feel like testing it again. If any of you tried the second solution first and it works, post it here, it would be a good hint for everyone.

Running postgres 8.3.5 on Suse ES 11 x64 and a php 5.3.0.