LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 11-22-2006, 06:56 PM   #1
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Rep: Reputation: 16
Unhappy Bugzilla and PostgreSQL unhappy :-( [RESOLVED]


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.

Last edited by LaughingBoy; 11-23-2006 at 12:55 AM. Reason: Problem fixed!
 
Old 11-23-2006, 12:51 AM   #2
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Original Poster
Rep: Reputation: 16
Ahhh.... problem fixed.

Turns out by looking at the Postgres log files (found under /var/lib/pgsql/data/pg_log ) I saw the following (more helpful) information:
Quote:
Originally Posted by postgresql-Thu.log
LOG: could not connect to Ident server at address "::1", port 113: Connection refused
FATAL: Ident authentication failed for user "bugs"
This told me that it was trying to talk via IPv6 ( ::1 means "localhost" in version 6 of the I.P. protocol)

Re-checking the pg_hba.conf file told me I didn't have something to handle IPv6 on localhost. I added a line that read:
Code:
host	all		  all		::1/128 trust
Then as the postgres user (su - --> su - postgres) I told postgres to re read configuration files:
Code:
pg_ctl reload
Then the checksetup.pl script was able to run to completion and the Bugzilla webpage loaded just fine.
 
Old 11-23-2006, 07:34 PM   #3
LaughingBoy
Member
 
Registered: May 2006
Location: Adelaide, South Australia
Distribution: Fedora 6-17 x64 / Ubuntu 10.x x64
Posts: 95

Original Poster
Rep: Reputation: 16
I have a strange feeling it's due to Fedora's /etc/hosts file having an IPv6 address for localhost. Trouble is, the host name has also been inserted into the localhost (::1) line, so a lookup for "localhost" resolves to an IPv6 address...
 
  


Reply

Tags
bugzilla, hosts, ipv6, postgresql


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bugzilla Chiabert Linux - Newbie 1 11-22-2006 07:17 PM
UDMA unhappy on via vt82c686a in Debian testing chrisdw Linux - Hardware 0 07-14-2004 10:31 AM
Changing from Exim to QMail makes package manager unhappy bonf Debian 3 11-17-2003 05:23 AM
Unhappy with Redhat 9.0 Whitehat Linux - General 15 09-10-2003 02:35 AM
postgresql -odbc & postgresql-jdbc installation kjsubbu Linux - Software 0 06-19-2003 03:50 AM


All times are GMT -5. The time now is 06:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration