users@jersey.java.net

Re: [Jersey] Weird exception: java.lang.BindException: Address already in use.

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Wed, 10 Jun 2009 06:28:50 +0200

On Jun 9, 2009, at 7:28 PM, Gehl, Pascal wrote:

> Thanks for the answer.
>
> But this exception occurs in my already running instance on the client
> side when the client API tries to send a HTTP post, not at startup.
>

I misunderstood your original email, when you were describing the
similarity.

I see the exception occurs when the client is attempting to open the
connection, even before any bytes are written.

Are you saying this only occurs with a POST request? if so what about
a GET request?

How many requests do you make for this to occur?


It is indeed an odd exception on the client side. I have never
observed this before (we have some tests that start embedded servers
and use the client API). It is not clear to me if the error message is
being sent from the server to the client, i would presume it would be
since this is really associated with the server side, implying some
issue with the server side configuration as Tatu suggests.

Paul.

> Pascal
>
> -----Original Message-----
> From: Tatu Saloranta [mailto:tsaloranta_at_gmail.com]
> Sent: Tuesday, June 09, 2009 12:10 PM
> To: users_at_jersey.dev.java.net
> Subject: Re: [Jersey] Weird exception: java.lang.BindException:
> Address
> already in use.
>
> On Tue, Jun 9, 2009 at 8:32 AM, Gehl, Pascal<Pascal.Gehl_at_nuance.com>
> wrote:
>> I don't have 2 servers listening on the same port on the same
>> machine.
>
> I wouldn't be so sure. Exception basically says that yes, there is
> already a process that listens to the port.
>
> The most common case is that you already have a running instance --
> possibly one that has not cleanly shut down when it should have -- and
> try to start a new one. It could be due to startup script not ensuring
> previous instance is not properly shut down, or not waiting for that
> to occur.
>
> Btw, this is a general web server startup problem, and quite possibly
> not specific to Jersey. You can try googling for it, or check out your
> servlet container's FAQ, since it is a very common issue.
>
> Hope this helps,
>
> -+ Tatu +-
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>