Hi all,
This is a rather specific problem, and one that is perplexing me considerably. I've googled without success, and have hovered around the postgres FAQs hoping for an answer - all without success.
The problem:
Type in localhost/bugzilla in a browser:
Code:
Software error:
Can't connect to the database.
Error: FATAL: Ident authentication failed for user "bugs"
Is your database installed and up and running?
Do you have the correct username and password selected in localconfig?
Other Symptoms:
Code:
[root@localhost bugzilla]# pwd
/usr/share/bugzilla
[root@localhost bugzilla]# ./checksetup.pl
Checking perl modules ...
Checking for AppConfig (v1.52) ok: found v1.63
Checking for CGI (v2.93) ok: found v3.15
Checking for Data::Dumper (any) ok: found v2.121_08
Checking for Date::Format (v2.21) ok: found v2.22
Checking for DBI (v1.38) ok: found v1.52
Checking for File::Spec (v0.84) ok: found v3.12
Checking for File::Temp (any) ok: found v0.16
Checking for Template (v2.10) ok: found v2.15
Checking for Text::Wrap (v2001.0131) ok: found v2005.082401
Checking for Mail::Mailer (v1.67) ok: found v1.74
Checking for MIME::Base64 (v3.01) ok: found v3.07
Checking for MIME::Parser (v5.406) ok: found v5.420
Checking for Storable (any) ok: found v2.15
The following Perl modules are optional:
Checking for GD (v1.20) ok: found v2.35
Checking for Template::Plugin::GD::Image (any) not found
Checking for Chart::Base (v1.0) ok: found v2.4.1
Checking for XML::Twig (any) ok: found v3.26
Checking for GD::Graph (any) ok: found v1.4308
Checking for GD::Text::Align (any) ok: found v1.18
Checking for PatchReader (v0.9.4) ok: found v0.9.5
Checking for Image::Magick (any) ok: found v6.2.8
Checking for HTML::Parser (v3.40) ok: found v3.55
Checking for HTML::Scrubber (any) ok: found v0.08
If you you want to see graphical bug reports (bar, pie and line charts of
current data), you should install libgd and the following Perl modules:
Template::Plugin::GD: /usr/bin/perl -MCPAN -e 'install "Template::Plugin::GD"'
Checking user setup ...
Removing existing compiled templates ...
Precompiling templates ...
Can't connect to the database.
Error: FATAL: Ident authentication failed for user "bugs"
Is your database installed and up and running?
Do you have the correct username and password selected in localconfig?
So, let's have a look in localconfig:
Code:
[root@localhost bugzilla]# pwd
/etc/bugzilla
[root@localhost bugzilla]# grep -v "#" localconfig | egrep "[:space:]"
$index_html = 0;
$cvsbin = "/usr/bin/cvs";
$interdiffbin = "/usr/bin/interdiff";
$diffpath = "/usr/bin";
$create_htaccess = 1;
$webservergroup = "apache";
$db_driver = "Pg";
$db_port = 0;
$db_sock = '';
$db_check = 1;
$db_host = 'localhost';
$db_name = 'bugs';
$db_user = 'bugs';
$db_pass = 'bugs';
Note how I've told bugzilla I'm using PostgreSQL by changing the default db_driver to Pg, instead of MySQL.
(Yes, the password will be changed once this is resolved.) How do I know if the account was setup correclty? Let's try logging in directly:
Code:
[laughingboy@localhost ~]$ psql bugs bugs
Password for user bugs:
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
Type: \copyright for distribution terms
\h for help with SQL commands
\? for help with psql commands
\g or terminate with semicolon to execute query
\q to quit
bugs=> \q
It seems that it can connect to the database "bugs" with the username "bugs" and it even asks for the password. When I enter "bugs" it let's me in. Thus, I'm assuming the PostgreSQL side of things is setup correctly. But, let's check the
pg_hba.conf file:
As the postgres user, I've tried with both of the following configurations:
Code:
-bash-3.1$ pwd
/var/lib/pgsql/data
-bash-3.1$ grep "bugs" pg_hba.conf
local bugs bugs password
and
Code:
-bash-3.1$ grep "bugs" pg_hba.conf
host bugs bugs 127.0.0.1 255.255.255.255 md5
I've been told it finds the first match and goes with that, so these lines were above all other "rules".
So, this leaves me with a perplexed look on my face - why can I get in directly from the command line, but not from Bugzilla?
Anyone? PLEASE!
P.S. I suppsose I should provide some versioning information...
O.S.: FC6
Kernel: 2.6.18-1.2798.fc6 #1 SMP
bugzilla: bugzilla-2.22-7.fc6
postgresql: postgresql-8.1.4-1.1
apache: Apache/2.2.3
All non-standard packages were done using yumex...
If there's any more information you'd like, please respond.