Bacula-users

Re: [Bacula-users] PostgreSQL - Could not open Catalog "MyCatalog", database "bacula"

2012-12-27 15:03:09
Subject: Re: [Bacula-users] PostgreSQL - Could not open Catalog "MyCatalog", database "bacula"
From: Dan Langille <dan AT langille DOT org>
To: Wolfgang Denk <wd AT denx DOT de>
Date: Thu, 27 Dec 2012 14:59:49 -0500
On Dec 27, 2012, at 2:51 PM, Wolfgang Denk wrote:

> Dear Dan Langille,
> 
> In message <5A6C0B9B-5B81-4C58-90F5-CA93BA43A02C AT langille DOT org> you 
> wrote:
>> 
>> As the PostgreSQL back-end author, I applaud your decision.  ;)
> 
> I'm aware that I should have dont that a long time ago, but you know
> how it is when you have a system that is basically running just fine,
> albeit eventually not as performant as possible...
> 
>> Please show us your Catalog resource from bacula-dir.conf.
>> 
>> Mine is:
>> 
>> Catalog {
>>  Name = MyCatalog
>>  dbname = bacula; dbaddress = localhost; user = bacula; password = ""
>> }
> 
> I have this:
> 
> Catalog {
>  Name = MyCatalog
>  dbdriver = "dbi:postgresql"; dbaddress = HHHH.denx.de; dbport = 5432
>  dbname = "bacula"; dbuser = "bacula"; dbpassword = "XXXXXX"
> }

With that, you're connecting to the IP address represented by HHHH etc.

With what you have now, you're connecting to localhost.  PostgreSQL
is most likely configured to listen only on localhost.

$ netstat -na | grep 5432
tcp4       0      0 10.1.1.1.5432        *.*                    LISTEN
tcp4       0      0 127.0.0.1.5432         *.*                    LISTEN
tcp6       0      0 ::1.5432               *.*                    LISTEN

In my case, I have IPv6 enabled, and listening on on other
IP address.  postgresql.conf contains this line:

listen_addresses = 'localhost, 10.1.1.1'

Hope that helps.

>> Is bacula-dir running on the same host as PostgreSQL?
> 
> Yes, both are running on host "HHHH"...
> 
> 
> Ooops...  I was just about to write that I had also tested this with
> "dbaddress = localhost" before, and it didn't work either; but that
> was probably before some other changes... Fortunately I was wise
> enough to retest it before sending this, and indeed this fixes the
> problem.

Good!  Good. 

> OK, assuming I would like to have the flexibility of running the DB
> on another host it seems I need to re-check pg_hba.conf ?


Yes, perhaps indeed.  But problems in the area of pg_hba.conf 
are probably best handled by the PostgreSQL user mailing lists.



-- 
Dan Langille - http://langille.org


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users