pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mark Tessier <mt@open2web.com>
To: Nick Fankhauser <nickf@ontko.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: db connection fails
Date: Tue, 2 Jul 2002 14:27:16 -0400
Message-ID: <20020702142716.689d3948.mt@open2web.com> (raw)
In-Reply-To: <NEBBLAAHGLEEPCGOBHDGEEPDFDAA.nickf@ontko.com>
References: <20020701152946.347c987c.mt@open2web.com>
	<NEBBLAAHGLEEPCGOBHDGEEPDFDAA.nickf@ontko.com>

> > > 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





view thread (5+ messages)  latest in thread

Message-ID: <20020702142716.689d3948.mt@open2web.com>
Permalink:  ../20020702142716.689d3948.mt@open2web.com/
Also on:    postgresql.org/message-id/20020702142716.689d3948.mt@open2web.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mt@open2web.com, nickf@ontko.com
  Subject: Re: db connection fails
  In-Reply-To: <20020702142716.689d3948.mt@open2web.com>
  References: <20020701152946.347c987c.mt@open2web.com> <NEBBLAAHGLEEPCGOBHDGEEPDFDAA.nickf@ontko.com> <20020702142716.689d3948.mt@open2web.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox