[rt-users] Debian setup: postgres problem?

Jens Porup jens at cyber.com.au
Sun Jun 27 22:07:49 EDT 2004


On Fri, Jun 25, 2004 at 01:31:32PM +0100, Stephen Quinney wrote:
> On Fri, Jun 25, 2004 at 04:48:03PM +1000, Jens Porup wrote:
> > 
> > G'day,
> > 
> > I am trying to install Request Tracker on Debian testing.
> > 
> 
> Have you read all the information in the README.Debian.gz and
> INSTALL.Debian.gz located in the /usr/share/doc/request-tracker3/?
> 
> They are the best place to start and may well already answer your
> questions.
> 
> Stephen Quinney
> 

Yes!

I have read, re-read, and re-read INSTALL.Debian and README.Debian
backwards, forwards, and upside down, and I still can't get RT
installed!

To recap my troubles:

I can successfully connect to the freshly installed postgres
installation like so:

        root at request-tracker:~# psql -d template1 -U rtuser -W
        Password:
        Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

        Type:  \copyright for distribution terms
        \h for help with SQL commands
        \? for help on internal slash commands
        \g or terminate with semicolon to execute query
        \q to quit

        template1=> \q

But when I try and run the RT setup script for the RT database, I get:

        root at request-tracker:~# /usr/sbin/rt-setup-database --action init --dba rtuser
        --prompt-for-dba-password
        In order to create a new database and grant RT access to that database,
        this script needs to connect to your Pg instance on localhost as rtuser.
        Please specify that user's database password below. If the user has no database
        password, just press return.

        Password: DBI connect('dbname=template1;host=localhost','rtuser',...) failed:
        could not connect to server: Connection refused at /usr/sbin/rt-setup-database
        line 110
        Failed to connect to dbi:Pg:dbname=template1;host=localhost as rtuser: could not
        connect to server: Connection refused at /usr/sbin/rt-setup-database line 110,
        <STDIN> line 1.

So let's make sure postgres is running:

        root at request-tracker:~# /etc/init.d/postgresql restart
        Stopping PostgreSQL database server: autovacuumNo pg_autovacuum found running;
        none killed.
        postmaster.
        Starting PostgreSQL database server: postmaster autovacuum.
        root at request-tracker:~#

But if I tail the logs during the server restart, this line pops up just after
the restart finishes:

        root at request-tracker:~# tail -f /var/log/postgresql/postgres.log
        ...<snip>...
        LOG:  unexpected EOF on client connection

But a simple Perl script connects to the database without dying, like so:

        use DBI;
        my $dsn = "dbi:Pg:dbname=template1";

        ###
        ### But this dsn fails!!
        ### my $dsn = "dbi:Pg:dbname=template1:host:localhost";

		###
		### For some reason adding host:localhost makes everything die!!!

        my $dbh = DBI->connect($dsn, "rtuser", "wibble") or die "doh!\n";

And yes, I do have the correct lines in my /etc/postgresql/pg_hba.conf
-- except for that didn't work, for some reason postgres was actually
reading my /var/lib/postgres/data/pg_hba.conf instead, so I've symlinked
the /etc conf file to the /var/lib file.

Please, please. I HAVE rtfm'ed, and I'm absolutely stumped on this one. A
thoughtful ponder of what's wrong would be very, very much appreciated.

Thanks,

Jens



More information about the rt-users mailing list