Received: from localhost.localdomain (postgresql.org [64.49.215.8]) by localhost (Postfix) with ESMTP id 4AEF847632F for ; Tue, 2 Jul 2002 14:40:09 -0400 (EDT) Mailbox-Line: From nickf@ontko.com Tue Jul 2 14:40:09 2002 Received: from avocet.mail.pas.earthlink.net (avocet.mail.pas.earthlink.net [207.217.120.50]) by postgresql.org (Postfix) with ESMTP id F303D476300 for ; Tue, 2 Jul 2002 14:40:07 -0400 (EDT) Received: from 1cust14.tnt1.richmond.in.da.uu.net ([63.27.103.14] helo=nick) by avocet.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 17PSZK-0004cr-00; Tue, 02 Jul 2002 14:40:07 -0400 Reply-To: From: "Nick Fankhauser" To: "Mark Tessier" Cc: Subject: Re: db connection fails Date: Tue, 2 Jul 2002 13:43:25 -0500 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200 Importance: Normal In-Reply-To: <20020702142716.689d3948.mt@open2web.com> X-Spam-Status: No, hits=0.5 required=5.0 tests=IN_REP_TO,KNOWN_BAD_DIALUPS,RCVD_IN_OSIRUSOFT_COM version=2.30 X-Spam-Level: X-Archive-Number: 200207/34 X-Sequence-Number: 4720 Mark- If you're on version 7.1 or higher, the proffered way to turn on tcp/ip is to add "tcpip_socket=true" to postgresql.conf in the data directory. (Then restart.) Details are here: http://www.postgresql.org/idocs/index.php?runtime-config.html Regards, -Nick > -----Original Message----- > From: Mark Tessier [mailto:mt@open2web.com] > Sent: Tuesday, July 02, 2002 1:27 PM > To: Nick Fankhauser > Cc: pgsql-admin@postgresql.org > Subject: Re: [ADMIN] db connection fails > > > > > > 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 >