Обсуждение: psql: could not connect to server: Bad file descriptor

Поиск
Список
Период
Сортировка

psql: could not connect to server: Bad file descriptor

От
Eliza Ochoa
Дата:
Hi,
 
I installed postgresql 7.3.2 with cygwin, following exactly what was in the readme.   The only deviation I made was I added the user postgres and set its right to log on as service before even installing cygwin.  This does not matter, does it?
 
The installation went fine, but my postgres could not be run by any other user except user "postgres".  I get the following error:
 
# psql template1
psql: could not connect to server: Bad file descriptor
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
 
I checked the file permissions for /tmp/.s.PGSQL.5432 and they seem to be correct:
srwx------    1 postgres None            /tmp/.s.PGSQL.5432
 
I later tried to change the file permissions and managed to change it though CYGWIN's faq said chmod doesn't work.  So I had:
srwxrwxrwt    1 postgres None            /tmp/.s.PGSQL.5432
 
And I still get the same error.  Worse, now my postgres user couldn't run psql either.  And when I wanted to change the file permissions back, chmod won't work anymore.
 
Could anyone tell me how to solve this problem?
 
Thanks,
Tiffany
 


Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!

Re: psql: could not connect to server: Bad file descriptor

От
Jason Tishler
Дата:
Tiffany,

On Wed, Jun 25, 2003 at 07:03:08PM -0700, Eliza Ochoa wrote:
> Could anyone tell me how to solve this problem?

This is known problem with Cygwin 1.3.22-1.  The workarounds are use a
recent Cygwin snapshot or connect to the postmaster via TCP/IP sockets
instead of AF_UNIX sockets.

Jason

--
PGP/GPG Key: http://www.tishler.net/jason/pubkey.asc or key servers
Fingerprint: 7A73 1405 7F2B E669 C19D  8784 1AFD E4CC ECF4 8EF6

Re: psql: could not connect to server: Bad file descriptor

От
denis@coralindia.com
Дата:
Hi Eliza

I also came across the similar problem.. I just deleted these files from
/tmp directory and also deleted the .pid file.

Then restarted the postmaster and it worked fine.

You can give it a try.

Denis

----- Original Message -----
From: Eliza Ochoa
To: pgsql-cygwin@postgresql.org
Sent: Thursday, June 26, 2003 7:33 AM
Subject: [CYGWIN] psql: could not connect to server: Bad file descriptor


Hi,

I installed postgresql 7.3.2 with cygwin, following exactly what was in the
readme.   The only deviation I made was I added the user postgres and set
its right to log on as service before even installing cygwin.  This does not
matter, does it?

The installation went fine, but my postgres could not be run by any other
user except user "postgres".  I get the following error:

# psql template1
psql: could not connect to server: Bad file descriptor
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?


I checked the file permissions for /tmp/.s.PGSQL.5432 and they seem to be
correct:
srwx------    1 postgres None            /tmp/.s.PGSQL.5432

I later tried to change the file permissions and managed to change it though
CYGWIN's faq said chmod doesn't work.  So I had:
srwxrwxrwt    1 postgres None            /tmp/.s.PGSQL.5432

And I still get the same error.  Worse, now my postgres user couldn't run
psql either.  And when I wanted to change the file permissions back, chmod
won't work anymore.

Could anyone tell me how to solve this problem?

Thanks,
Tiffany




Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!