Re: Ah, yet another cause for not binding the right port.... - Mailing list pgsql-general

From Tom Lane
Subject Re: Ah, yet another cause for not binding the right port....
Date
Msg-id 20963.960589634@sss.pgh.pa.us
Whole thread Raw
In response to Ah, yet another cause for not binding the right port....  ("Steve Wolfe" <steve@iboats.com>)
List pgsql-general
"Steve Wolfe" <steve@iboats.com> writes:
>    When postgres binds to any port, it likes to write a file in /tmp, along
> the lines of ".s.PGSQL.5432".  If /tmp is not writeable by the postgres
> process, it will not be able to bind to any port.  However, it doesn't give
> you an intelligent error message like "Can't create file", it simply says
> that it can't bind the port,

I tried this and got what I thought was a fairly reasonable error
message:

FATAL: StreamServerPort: bind() failed: Permission denied
        Is another postmaster already running on that port?
        If not, remove socket node (/tmp/.s.PGSQL.5432) and retry.
postmaster: cannot create UNIX stream port

"Permission denied" is what the kernel told us, and I don't think it's
likely to be a good idea to second-guess why the kernel told us that.
But the reference to /tmp/.s.PGSQL.5432 together with that error ought
to be sufficient clue I would think...

            regards, tom lane

pgsql-general by date:

Previous
From: "Steve Wolfe"
Date:
Subject: Ah, yet another cause for not binding the right port....
Next
From: "Steve Wolfe"
Date:
Subject: Re: Ah, yet another cause for not binding the right port....