Bacula-users

Re: [Bacula-users] Bacula 5.0.1 dir is trying to connect to Postgresql as root and is driving me nuts

2010-03-27 05:26:20
Subject: Re: [Bacula-users] Bacula 5.0.1 dir is trying to connect to Postgresql as root and is driving me nuts
From: Bruno Friedmann <bruno AT ioda-net DOT ch>
To: bacula-users AT lists.sourceforge DOT net
Date: Sat, 27 Mar 2010 10:23:16 +0100
On 03/25/2010 01:35 AM, mehma sarja wrote:
> SUMMARY
> /usr/local/bacula/working/log says "SQL server not running; password
> incorrect; max_connections exceeded"
> /var/log/postgresql/postgresql-8.4-main.log says authentication for user
> bacula fails because I am trying to login as user root?
> 
> QUESTION
> What's do provided username and authenticated username mean in Bacula?
> ===
> 
> DETAILS
> Ubuntu 9.10 64 bit, compiled 5.0.1 from source. Both fd and sd run fine.
> Postgresql is running, max_connections are set to 100.
> ===
> 
> LOG1
> Here is what /usr/local/bacula/working/log says
> ==================================
> 24-Mar 17:02 bacula-dir JobId 0: Fatal error: Could not open Catalog
> "MyCatalog", database "bacula".
> 24-Mar 17:02 bacula-dir JobId 0: Fatal error: postgresql.c:227 Unable to
> connect to PostgreSQL server. Database=bacula User=bacula
> Possible causes: SQL server not running; password incorrect; max_connections
> exceeded.
> 24-Mar 17:02 bacula-dir ERROR TERMINATION
> Please correct configuration file: /usr/local/etc/bacula-dir.conf
> ===
> 
> CONF FILE
> I have set the password for user bacula in postgresql. Ok, so I look in
> bacula-dir.conf for the Catalog section and it says
> ======================================================================================
> Catalog {
>   Name = MyCatalog
> # Uncomment the following line if you want the dbi driver
> # dbdriver = "dbi:postgresql"; dbaddress = 127.0.0.1; dbport =
>   dbname = "bacula"; dbuser = "bacula"; dbpassword = "bacula"
> }
> ===
> 
> LOG2
> Here is what /var/log/postgresql/postgresql-8.4-main.log says
> ============================================
> 2010-03-24 17:10:12 PDT FATAL:  Ident authentication failed for user
> "bacula"
> 2010-03-24 17:10:17 PDT LOG:  provided username (root) and authenticated
> username (bacula) don't match
> ===
> 
> 
> Mehma
> 

Hi Mehma, just take a long breathe, and check with postgresql documentation how 
about interact pg_hba.conf and pg_ident.conf
to check manually issue a su bacula and try a psql -U bacula -d bacula type the 
password when requested and see if you can
connect. After you will have a valid connection, bacula-dir can also.

I'm thinking your are mixing normal authorization in pg_hba.conf and mapping 
users in pg_ident.conf


-- 

     Bruno Friedmann


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>