Thread: StreamServer Port : bind() failed : How to solve this problem

StreamServer Port : bind() failed : How to solve this problem

From
"shreedhar"
Date:
Hi All,

 I install Postgre database which comes with RH7.3. If I stop database with
'CTRL-c' and run database using
postmaster -i -D /usr/local/pgsql/data

i am getting following error message.

StreamServer Port : bind() failed : Address already in use.
is another postmaster already running on port 5432
If not, wait a few seonds, and retry
postmaster : cannot create INET stream port.

If halt from system and restart then only it is working.

May I know what might be the problem. Can I have to change any settings.

Regards,
Sreedhar Bhaskararaju 1,2nd Main Road, KottuGardens, Chennai - 600 085 Ph :
4475111 Email : shreedhar@lucidindia.net


Re: StreamServer Port : bind() failed : How to solve this

From
Justin Georgeson
Date:
I'm not sure what you mean you're doing when you say you stop it with
ctrl-c, but you can use the pg_ctl utility, or `service postgresql stop`
to stop it. Then you should be able to start with the command you
listed, although you probably want to use pg_ctl or `service postgresql
start` instead.

shreedhar wrote:
> Hi All,
>
>  I install Postgre database which comes with RH7.3. If I stop database with
> 'CTRL-c' and run database using
> postmaster -i -D /usr/local/pgsql/data
>
> i am getting following error message.
>
> StreamServer Port : bind() failed : Address already in use.
> is another postmaster already running on port 5432
> If not, wait a few seonds, and retry
> postmaster : cannot create INET stream port.
>
> If halt from system and restart then only it is working.
>
> May I know what might be the problem. Can I have to change any settings.
>
> Regards,
> Sreedhar Bhaskararaju 1,2nd Main Road, KottuGardens, Chennai - 600 085 Ph :
> 4475111 Email : shreedhar@lucidindia.net
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org

--
Justin Georgeson
UnBound Technologies, Inc.
http://www.unboundtech.com
Main   713.329.9330
Fax    713.460.4051
Mobile 512.789.1962

5295 Hollister Road
Houston, TX 77040
Real Applications using Real Wireless Intelligence(tm)


Re: StreamServer Port : bind() failed : How to solve this

From
Tom Lane
Date:
Justin Georgeson <jgeorgeson@unboundtech.com> writes:
> I'm not sure what you mean you're doing when you say you stop it with
> ctrl-c, but you can use the pg_ctl utility, or `service postgresql stop`
> to stop it. Then you should be able to start with the command you
> listed, although you probably want to use pg_ctl or `service postgresql
> start` instead.

> shreedhar wrote:
>> i am getting following error message.
>> StreamServer Port : bind() failed : Address already in use.
>> is another postmaster already running on port 5432
>> If not, wait a few seonds, and retry

I'm also wondering whether shreedhar has followed the advice given in
the error message: wait a bit and try again to start the postmaster.
On some Unixen it's impossible to reassign a particular listening port
number until the previous owner has been dead awhile (where "awhile"
is usually measured in "a few minutes").

            regards, tom lane