Skip site navigation (1) Skip section navigation (2)

postgre socket - connection error

From: "Saurabh Shah" <saurabh(at)asianminds(dot)com>
To: <pgsql-ports(at)postgresql(dot)org>
Subject: postgre socket - connection error
Date: 2002-06-20 09:16:54
Message-ID: 000201c2183b$3aa6eb30$8a07c5cb@aadarsh (view raw or flat)
Thread:
Lists: pgsql-ports
Hello,

Problem statement: I m getting following error while connecting to
postgresql7.2.1 through DBD:Pg :


[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1]
DBI->connect(dbname=template1) failed: connectDBStart() -- socket()
failed: errno=2

[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1] No such file or
directory

[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1] Error:
<br>connectDBStart() -- socket() failed: errno=2<br>No such file or
directory<br>

[Thu Jun 20 13:15:50 2002] [error] [client 127.0.0.1] Compilation failed
in require at c:\EZPUBL~1\apache\htdocs\SQL-LE~1\admin.pl line 93.


Installed:

I have Windows 2000 os. And have postgresql7.2.1 installed on cygwin on
drive i:. Also I have active perl and apache installed on drive c:.


Details:

Now I think we have to check the problem step by step.

+--------+   +--------+       +------------+    +-----------+
| Script +-->+ DBI    +---+-->+ DBD Postgre+--->+ Postgre DB|
+--------+   +--------+       +------------+    +-----------+
A	     B	C	  D		E	   F		G


(A) Script is perfectly allright. -- no problem (if you have got any
other sample script to test connection of DBD:pg and postgresql then pls
send to me)

(B) I uninstalled DBI -- its giving me proper error that "DBI not
installed". And after I again install the error does not come. So -- no
problem

(C) dbi is installed and same as B -- no problem

(D) when I uninsalled DBD-pg it gave be these errors:

[Thu Jun 20 12:54:45 2002] [error] [client 127.0.0.1] malformed header
from script. Bad header=bin/mozilla:
c:/apache/htdocs/sql-ledger/admin.pl

[Thu Jun 20 12:54:45 2002] [error] [client 127.0.0.1] Unknown error

[Thu Jun 20 12:54:45 2002] [error] [client 127.0.0.1] Compilation failed
in require at c:\apache\htdocs\SQL-LE~1\admin.pl line 93.

In the first error again there seems to be some path problem -- u all
must be knowing better.
Again if I install dbd-pg these errors go away and the prime error (in
the very top of email) comes.
But lets keep this -- A SUSPECT


(E)DBD-Pg . Is there some setting to be done to let DBD-Pg about where
the postgre sql is (eg. Port of postgresql or the pid or the socket
'/tmp/.s.PGSQL.5432')?
Lets also keep this -- A SUSPECT

(F)Same as E -- A SUSPECT

(G)Postgresql7.2.1 has been installed. I can access template1 and can
create table through psql. --- no problem


That leaves us with three suspects:
(D) Connection from DBI to DBD-Pg
(E) DBD-Pg settings etc.
(F) Connection from DBD-Pg to postgre

Any ideas?

Thanks and regards,
saurabh



-----Original Message-----
From: sql-ledger-users-admin(at)sql-ledger(dot)org
[mailto:sql-ledger-users-admin(at)sql-ledger(dot)org] On Behalf Of Dieter
Simader
Sent: 19 June 2002 08:15
To: sql-ledger-users(at)sql-ledger(dot)org
Subject: RE: [SL] for power users a minor problem, errors while
executingadmin.pl

You don't have a template1 database. Try template0 or create a database.


Dieter Simader    http://www.sql-ledger.org   (780) 472-8161
DWS Systems Inc.     Accounting Software       Fax: 478-5281
=========== On a clear disk you can seek forever ===========



pgsql-ports by date

Next:From: Narayanaswami IyerDate: 2002-06-21 06:55:59
Subject: PostgreSQL on Windows
Previous:From: Thomas LockhartDate: 2002-06-18 16:22:53
Subject: Re: FIX: NetBSD/cobalt now compiles 7.2.1

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group