users@jersey.java.net

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

From: Tatu Saloranta <tsaloranta_at_gmail.com>
Date: Tue, 9 Jun 2009 09:09:58 -0700

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 +-