Re: db connection fails

From: Mark Tessier <mt(at)open2web(dot)com>
To: "Nick Fankhauser" <nickf(at)ontko(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: db connection fails
Date: 2002-07-02 18:27:16
Message-ID: 20020702142716.689d3948.mt@open2web.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

> > > Have you tried doing a network connection with your "apache" user? (su -
> > > apache; psql -h localhost group3.)
> >
> > Yes, I've tried it and get the following:
> >
> > psql: could not connect to server: Connection refused
> > Is the server running on host 192.168.1.2 and accepting
> > TCP/IP connections on port 5432?

> This is a useful clue. It suggests that your code may be fine and that the
> problem is in the networking or authentication setup. (You're using TCP/IP
> even if you are on the same box.)
>
> If you haven't already done so, take a look at your pg_hba.conf file. Info
> on how to set it up can be found here:
>
I've done so and find the following:

# TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT

local all trust
host all 127.0.0.1 255.255.255.255 trust

This means I should already be able to connect, although it's stated that "TCP/IP connections are completely disabled unless the server is started with the -i switch or the equivalent configuration parameter is set."

So, how do I restart postgres with the -i switch set, and is there a conf file to modify so that postgres starts up with the -i switch set when I turn on the machine? Normally I restart postgres like this

/etc/rc.d/init.d/postgresql restart

--
Thanks,

Mark

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Nick Fankhauser 2002-07-02 18:43:25 Re: db connection fails
Previous Message Simeone, Mario 2002-07-02 17:29:18 unsubscribe