Thread: PostgreSQL on Win/2K

PostgreSQL on Win/2K

From
Kian Parsee
Date:
Hi Everybody.  I'm trying to run Postgres7.1.2 on a
Win/2K machine with Cygwin1.3.2-1.  I'm having no luck
whatsoever.  I get the same result when I use the
already built version that comes with cygwin, and when
I build it myself.  The following commands all seem to
work fine:

ipc-daemon &
initdb -D /usr/local/pgsql/data
postmaster -i -D /usr/local/pgsql/data &

However, when I try createdb, or psql, I get the
following error:

pq_flush: send() failed: Invalid argument
pq_recvbuf: recv() failed: The descriptor is a file,
not a socket
psql: pqReadData() -- backend closed the channel
unexpectedly.
        This probably means the backend terminated
abnormally
        before or while processing the request.



Now, I've got postgres working on a Win/NT machine
with no problem.  Does anybody have any clue why I'm
getting the above error on a Win/2K machine?

Your help would be very appreciated.

Thanks,
Kian




__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

RE: PostgreSQL on Win/2K

From
Dave Page
Date:

> -----Original Message-----
> From: Kian Parsee [mailto:kparsee@yahoo.com]
> Sent: 11 July 2001 14:58
> To: pgsql-cygwin@postgresql.org
> Subject: [CYGWIN] PostgreSQL on Win/2K
>
>
> Hi Everybody.  I'm trying to run Postgres7.1.2 on a
> Win/2K machine with Cygwin1.3.2-1.  I'm having no luck
> whatsoever.  I get the same result when I use the already
> built version that comes with cygwin, and when I build it
> myself.  The following commands all seem to work fine:
>
> ipc-daemon &
> initdb -D /usr/local/pgsql/data
> postmaster -i -D /usr/local/pgsql/data &
>
> However, when I try createdb, or psql, I get the
> following error:
>
> pq_flush: send() failed: Invalid argument
> pq_recvbuf: recv() failed: The descriptor is a file,
> not a socket
> psql: pqReadData() -- backend closed the channel
> unexpectedly.
>         This probably means the backend terminated
> abnormally
>         before or while processing the request.
>
>
>
> Now, I've got postgres working on a Win/NT machine
> with no problem.  Does anybody have any clue why I'm
> getting the above error on a Win/2K machine?
>
> Your help would be very appreciated.

Try setting the environment variable PGHOST=localhost or try using psql (or
createdb) with a command line like:

psql -h localhost template1

Either of these methods should make the client apps use tcp/ip rather than
Unix sockets.

hth, Regards, Dave.

RE: PostgreSQL on Win/2K

From
Kian Parsee
Date:
I tried both, and I'm still getting the same error
message.
--- Dave Page <dpage@vale-housing.co.uk> wrote:
>
>
> > -----Original Message-----
> > From: Kian Parsee [mailto:kparsee@yahoo.com]
> > Sent: 11 July 2001 14:58
> > To: pgsql-cygwin@postgresql.org
> > Subject: [CYGWIN] PostgreSQL on Win/2K
> >
> >
> > Hi Everybody.  I'm trying to run Postgres7.1.2 on
> a
> > Win/2K machine with Cygwin1.3.2-1.  I'm having no
> luck
> > whatsoever.  I get the same result when I use the
> already
> > built version that comes with cygwin, and when I
> build it
> > myself.  The following commands all seem to work
> fine:
> >
> > ipc-daemon &
> > initdb -D /usr/local/pgsql/data
> > postmaster -i -D /usr/local/pgsql/data &
> >
> > However, when I try createdb, or psql, I get the
> > following error:
> >
> > pq_flush: send() failed: Invalid argument
> > pq_recvbuf: recv() failed: The descriptor is a
> file,
> > not a socket
> > psql: pqReadData() -- backend closed the channel
> > unexpectedly.
> >         This probably means the backend terminated
> > abnormally
> >         before or while processing the request.
> >
> >
> >
> > Now, I've got postgres working on a Win/NT machine
> > with no problem.  Does anybody have any clue why
> I'm
> > getting the above error on a Win/2K machine?
> >
> > Your help would be very appreciated.
>
> Try setting the environment variable
> PGHOST=localhost or try using psql (or
> createdb) with a command line like:
>
> psql -h localhost template1
>
> Either of these methods should make the client apps
> use tcp/ip rather than
> Unix sockets.
>
> hth, Regards, Dave.


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

RE: PostgreSQL on Win/2K

From
Kian Parsee
Date:
localhost seems to be defined correctly.  psql-h
127.0.0.1 template1 gives me the same error:

kparsee@BFTTDEMO /usr/local/pgsql/bin
$ psql -h 127.0.0.1 template1
pq_flush: send() failed: Invalid argument
pq_recvbuf: recv() failed: The descriptor is a file,
not a socket
psql: pqReadData() -- backend closed the channel
unexpectedly.
        This probably means the backend terminated
abnormally
        before or while processing the request.

kparsee@BFTTDEMO /usr/local/pgsql/bin


and port 5432 seems to be listening when I look at it
using netstat -a.

Thanks,
Kian
--- "Henshall, Stuart - WCP"
<SHenshall@westcountrypublications.co.uk> wrote:
> Is localhost correctly referenced? Does psql -h
> 127.0.0.1 template1 work?
> You could try having a look at port 5432 with a port
> scanner to see if its
> open.
> Maybe try shuting postgresql down and deleting
> /tmp/.s.PGSQL.5432 and
> /tmp/.s.PGSQL.5432.lock file.
> As a side note, has any one else had their text come
> out backwards in the
> cygwin BASH while PostgreSQL has been heavily busy?
> - Stuart
>
> > -----Original Message-----
> > From:    Kian Parsee [SMTP:kparsee@yahoo.com]
> > Sent:    Wednesday, July 11, 2001 3:58 PM
> > To:    Dave Page; pgsql-cygwin@postgresql.org
> > Subject:    RE: [CYGWIN] PostgreSQL on Win/2K
> >
> > I tried both, and I'm still getting the same error
> > message.
> > --- Dave Page <dpage@vale-housing.co.uk> wrote:
> > >
> > >
> > > > -----Original Message-----
> > > > From: Kian Parsee [mailto:kparsee@yahoo.com]
> > > > Sent: 11 July 2001 14:58
> > > > To: pgsql-cygwin@postgresql.org
> > > > Subject: [CYGWIN] PostgreSQL on Win/2K
> > > >
> > > >
> > > > Hi Everybody.  I'm trying to run Postgres7.1.2
> on
> > > a
> > > > Win/2K machine with Cygwin1.3.2-1.  I'm having
> no
> > > luck
> > > > whatsoever.  I get the same result when I use
> the
> > > already
> > > > built version that comes with cygwin, and when
> I
> > > build it
> > > > myself.  The following commands all seem to
> work
> > > fine:
> > > >
> > > > ipc-daemon &
> > > > initdb -D /usr/local/pgsql/data
> > > > postmaster -i -D /usr/local/pgsql/data &
> > > >
> > > > However, when I try createdb, or psql, I get
> the
> > > > following error:
> > > >
> > > > pq_flush: send() failed: Invalid argument
> > > > pq_recvbuf: recv() failed: The descriptor is a
> > > file,
> > > > not a socket
> > > > psql: pqReadData() -- backend closed the
> channel
> > > > unexpectedly.
> > > >         This probably means the backend
> terminated
> > > > abnormally
> > > >         before or while processing the
> request.
> > > >
> > > >
> > > >
> > > > Now, I've got postgres working on a Win/NT
> machine
> > > > with no problem.  Does anybody have any clue
> why
> > > I'm
> > > > getting the above error on a Win/2K machine?
> > > >
> > > > Your help would be very appreciated.
> > >
> > > Try setting the environment variable
> > > PGHOST=localhost or try using psql (or
> > > createdb) with a command line like:
> > >
> > > psql -h localhost template1
> > >
> > > Either of these methods should make the client
> apps
> > > use tcp/ip rather than
> > > Unix sockets.
> > >
> > > hth, Regards, Dave.
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Get personalized email addresses from Yahoo! Mail
> > http://personal.mail.yahoo.com/
> >
> > ---------------------------(end of
> broadcast)---------------------------
> > TIP 3: if posting/reading through Usenet, please
> send an appropriate
> > subscribe-nomail command to
> majordomo@postgresql.org so that your
> > message can get through to the mailing list
cleanly


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

RE: PostgreSQL on Win/2K

From
"Henshall, Stuart - WCP"
Date:
Is localhost correctly referenced? Does psql -h 127.0.0.1 template1 work?
You could try having a look at port 5432 with a port scanner to see if its
open.
Maybe try shuting postgresql down and deleting /tmp/.s.PGSQL.5432 and
/tmp/.s.PGSQL.5432.lock file.
As a side note, has any one else had their text come out backwards in the
cygwin BASH while PostgreSQL has been heavily busy?
- Stuart

> -----Original Message-----
> From:    Kian Parsee [SMTP:kparsee@yahoo.com]
> Sent:    Wednesday, July 11, 2001 3:58 PM
> To:    Dave Page; pgsql-cygwin@postgresql.org
> Subject:    RE: [CYGWIN] PostgreSQL on Win/2K
>
> I tried both, and I'm still getting the same error
> message.
> --- Dave Page <dpage@vale-housing.co.uk> wrote:
> >
> >
> > > -----Original Message-----
> > > From: Kian Parsee [mailto:kparsee@yahoo.com]
> > > Sent: 11 July 2001 14:58
> > > To: pgsql-cygwin@postgresql.org
> > > Subject: [CYGWIN] PostgreSQL on Win/2K
> > >
> > >
> > > Hi Everybody.  I'm trying to run Postgres7.1.2 on
> > a
> > > Win/2K machine with Cygwin1.3.2-1.  I'm having no
> > luck
> > > whatsoever.  I get the same result when I use the
> > already
> > > built version that comes with cygwin, and when I
> > build it
> > > myself.  The following commands all seem to work
> > fine:
> > >
> > > ipc-daemon &
> > > initdb -D /usr/local/pgsql/data
> > > postmaster -i -D /usr/local/pgsql/data &
> > >
> > > However, when I try createdb, or psql, I get the
> > > following error:
> > >
> > > pq_flush: send() failed: Invalid argument
> > > pq_recvbuf: recv() failed: The descriptor is a
> > file,
> > > not a socket
> > > psql: pqReadData() -- backend closed the channel
> > > unexpectedly.
> > >         This probably means the backend terminated
> > > abnormally
> > >         before or while processing the request.
> > >
> > >
> > >
> > > Now, I've got postgres working on a Win/NT machine
> > > with no problem.  Does anybody have any clue why
> > I'm
> > > getting the above error on a Win/2K machine?
> > >
> > > Your help would be very appreciated.
> >
> > Try setting the environment variable
> > PGHOST=localhost or try using psql (or
> > createdb) with a command line like:
> >
> > psql -h localhost template1
> >
> > Either of these methods should make the client apps
> > use tcp/ip rather than
> > Unix sockets.
> >
> > hth, Regards, Dave.
>
>
> __________________________________________________
> Do You Yahoo!?
> Get personalized email addresses from Yahoo! Mail
> http://personal.mail.yahoo.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly

Re: PostgreSQL on Win/2K

From
Jason Tishler
Date:
On Wed, Jul 11, 2001 at 04:11:09PM +0100, Henshall, Stuart - WCP wrote:
> As a side note, has any one else had their text come out backwards in the
> cygwin BASH while PostgreSQL has been heavily busy?

There were some posting regarding the above on the Cygwin list a few
months ago.  This problem is suppose to be fixed...

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL on Win/2K

From
Jason Tishler
Date:
Dave,

On Wed, Jul 11, 2001 at 03:10:51PM +0100, Dave Page wrote:
> Either of these methods should make the client apps use tcp/ip rather than
> Unix sockets.

Just a FYI, but under Cygwin Unix domain sockets are implemented as
TCP/IP sockets.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL on Win/2K

From
Jason Tishler
Date:
Kian,

On Wed, Jul 11, 2001 at 08:12:27AM -0700, Kian Parsee wrote:
> localhost seems to be defined correctly.  psql-h
> 127.0.0.1 template1 gives me the same error:
>
> kparsee@BFTTDEMO /usr/local/pgsql/bin
> $ psql -h 127.0.0.1 template1
> pq_flush: send() failed: Invalid argument
> pq_recvbuf: recv() failed: The descriptor is a file,
> not a socket
> psql: pqReadData() -- backend closed the channel
> unexpectedly.
>         This probably means the backend terminated
> abnormally
>         before or while processing the request.

For some reason Cygwin's recv() is returning ENOTSOCK.  Try using strace
to glean more information:

    $ strace -o psql.log psql -h 127.0.0.1 template1

Is there anything interesting in psql.log?

BTW, which Windows 2000 service pack are you using?

Some other suggestions:

    1. Try another machine (I have never seen this problem on various NT
       4.0 and 2000 machines)
    2. Try a Cygwin DLL snapshot

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL on Win/2K

From
Jason Tishler
Date:
Kian,

On Wed, Jul 11, 2001 at 10:37:22AM -0700, Kian Parsee wrote:
> I don't see anything interesting in the log file
> except for the winsock error.... Where can I get the
> Cygwin DLL snapshot?

http://www.cygwin.com/snapshots/

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL on Win/2K

From
Kian Parsee
Date:
With the latest cygwin1.dll snapshot, I still have the
same problem.  Do you have any other ideas?

Thanks,
Kian Parsee
--- Jason Tishler <Jason.Tishler@dothill.com> wrote:
> Kian,
>
> On Wed, Jul 11, 2001 at 10:37:22AM -0700, Kian
> Parsee wrote:
> > I don't see anything interesting in the log file
> > except for the winsock error.... Where can I get
> the
> > Cygwin DLL snapshot?
>
> http://www.cygwin.com/snapshots/
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone:
> 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:
> 732.264.8798
> 82 Bethany Road, Suite 7             Email:
> Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:
> http://www.dothill.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please
> send an appropriate
> subscribe-nomail command to majordomo@postgresql.org
> so that your
> message can get through to the mailing list cleanly


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Re: PostgreSQL on Win/2K

From
s0lao@netscape.net (S. L.)
Date:
[...]
> same problem.  Do you have any other ideas?

Yes.

1. Do you use some, let's call them strange, network utilities on your box? (e.g. vpn :) There are MS problems with
tcp/ip,when such things are not properly installed/executed. The ICS is also such an utility. 

2. Have you checked your pg_hba.conf, located where your -D or PGDATA points at? You could add another workstation
there,copy your psql+cygwin1.dll+pq.dll (maybe ncurses.dll) to c:\pg on that workstation, and try psql from there. 

            SLao
__________________________________________________________________
Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/

Re: PostgreSQL on Win/2K

From
Jason Tishler
Date:
Kian,

On Wed, Jul 11, 2001 at 12:24:04PM -0700, Kian Parsee wrote:
> With the latest cygwin1.dll snapshot, I still have the
> same problem.  Do you have any other ideas?

Here are some suggestions to help isolate the problem:

1. Try the exact same Cygwin PostgreSQL setup on another Windows 2000 machine.
2. Try a different Windows 2000 service pack.
3. Try connecting a Cygwin psql to a non-Cygwin postmaster.
4. Try connecting a non-Cygwin psql to Cygwin postmaster.
5. Try exercising sockets via a non-PostgreSQL application.
6. Try search the Cygwin archives for other ideas -- I have seen other
   "not a socket" related entries.

Sorry, I can't be of more help.  Unfortunately, I can't reproduce your
problem.

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL on Win/2K

From
Kian Parsee
Date:
Jason,

I don't see anything interesting in the log file
except for the winsock error.... Where can I get the
Cygwin DLL snapshot?

Thanks,
Kian
--- Jason Tishler <Jason.Tishler@dothill.com> wrote:
> Kian,
>
> On Wed, Jul 11, 2001 at 08:12:27AM -0700, Kian
> Parsee wrote:
> > localhost seems to be defined correctly.  psql-h
> > 127.0.0.1 template1 gives me the same error:
> >
> > kparsee@BFTTDEMO /usr/local/pgsql/bin
> > $ psql -h 127.0.0.1 template1
> > pq_flush: send() failed: Invalid argument
> > pq_recvbuf: recv() failed: The descriptor is a
> file,
> > not a socket
> > psql: pqReadData() -- backend closed the channel
> > unexpectedly.
> >         This probably means the backend terminated
> > abnormally
> >         before or while processing the request.
>
> For some reason Cygwin's recv() is returning
> ENOTSOCK.  Try using strace
> to glean more information:
>
>     $ strace -o psql.log psql -h 127.0.0.1 template1
>
> Is there anything interesting in psql.log?
>
> BTW, which Windows 2000 service pack are you using?
>
> Some other suggestions:
>
>     1. Try another machine (I have never seen this
> problem on various NT
>        4.0 and 2000 machines)
>     2. Try a Cygwin DLL snapshot
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone:
> 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:
> 732.264.8798
> 82 Bethany Road, Suite 7             Email:
> Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:
http://www.dothill.com


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Attachment

Re: PostgreSQL on Win/2K

From
Jason Tishler
Date:
Kian,

On Wed, Jul 11, 2001 at 10:37:22AM -0700, Kian Parsee wrote:
> I don't see anything interesting in the log file
> except for the winsock error.... Where can I get the
> Cygwin DLL snapshot?

I just received this today.  Is the mailing list stuttering?

Jason

--
Jason Tishler
Director, Software Engineering       Phone: 732.264.8770 x235
Dot Hill Systems Corp.               Fax:   732.264.8798
82 Bethany Road, Suite 7             Email: Jason.Tishler@dothill.com
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com

Re: PostgreSQL on Win/2K

From
Kian Parsee
Date:
That's strange... I sent you that message a while ago.
--- Jason Tishler <Jason.Tishler@dothill.com> wrote:
> Kian,
>
> On Wed, Jul 11, 2001 at 10:37:22AM -0700, Kian
> Parsee wrote:
> > I don't see anything interesting in the log file
> > except for the winsock error.... Where can I get
> the
> > Cygwin DLL snapshot?
>
> I just received this today.  Is the mailing list
> stuttering?
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone:
> 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:
> 732.264.8798
> 82 Bethany Road, Suite 7             Email:
> Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:
> http://www.dothill.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Re: PostgreSQL on Win/2K

From
Kian Parsee
Date:
Well, we finally figured out what the problem was.  We
had the Aventail VPN installed on our machines, and
its dlls were being picked up for socket connections.
After uninstalling Aventail postgres works with no
problems.

Thanks everybody for your help....

Kian.
--- Jason Tishler <Jason.Tishler@dothill.com> wrote:
> Kian,
>
> On Wed, Jul 11, 2001 at 10:37:22AM -0700, Kian
> Parsee wrote:
> > I don't see anything interesting in the log file
> > except for the winsock error.... Where can I get
> the
> > Cygwin DLL snapshot?
>
> I just received this today.  Is the mailing list
> stuttering?
>
> Jason
>
> --
> Jason Tishler
> Director, Software Engineering       Phone:
> 732.264.8770 x235
> Dot Hill Systems Corp.               Fax:
> 732.264.8798
> 82 Bethany Road, Suite 7             Email:
> Jason.Tishler@dothill.com
> Hazlet, NJ 07730 USA                 WWW:
> http://www.dothill.com
>
> ---------------------------(end of
> broadcast)---------------------------
> TIP 2: you can get off all lists at once with the
> unregister command
>     (send "unregister YourEmailAddressHere" to
majordomo@postgresql.org)


__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/