You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by Vamsavardhana Reddy <c1...@gmail.com> on 2008/02/01 14:08:33 UTC

How to figure what port is in use from a BindException

Very often I run into Geronimo startup failure with a BindException since
some port or the other is in use.  Then I change the PortOffset to get
going.  How do I figure which port/address is resulting in the exception?

Re: How to figure what port is in use from a BindException

Posted by Donald Woods <dw...@apache.org>.
Just a quick look at the JavaDocs, it seems that it's up to the code 
creating the exception to call new BindException(String) to provide the 
port in an exception message, instead of using BindException() with no 
details.

You could always start/attach to the server in Eclipse and add that 
exception as a breakpoint and inspect the code for the port being used....


-Donald

Vamsavardhana Reddy wrote:
> I am wondering if there is anyway to find out the exact port number 
> resulting in the exception from the exception itself.
> 
> ++Vamsi
> 
> On Feb 1, 2008 7:30 PM, Upul Godage <upulg.dev@gmail.com 
> <ma...@gmail.com>> wrote:
> 
>     You can use a tool like netstat to check which ports programs are
>     listening on at the moment and unusable by the server instance.
>     netstat -anb
>     You can find which ports the server instance will use by the
>     config.substitutions.properties entries.
> 
>     Upul
> 
> 
> 
>     On Feb 1, 2008 6:38 PM, Vamsavardhana Reddy <c1vamsi1c@gmail.com
>     <ma...@gmail.com>> wrote:
> 
>         Very often I run into Geronimo startup failure with a
>         BindException since some port or the other is in use.  Then I
>         change the PortOffset to get going.  How do I figure which
>         port/address is resulting in the exception?
> 
> 
> 

Re: How to figure what port is in use from a BindException

Posted by Vamsavardhana Reddy <c1...@gmail.com>.
I am wondering if there is anyway to find out the exact port number
resulting in the exception from the exception itself.

++Vamsi

On Feb 1, 2008 7:30 PM, Upul Godage <up...@gmail.com> wrote:

> You can use a tool like netstat to check which ports programs are
> listening on at the moment and unusable by the server instance.
> netstat -anb
> You can find which ports the server instance will use by the
> config.substitutions.properties entries.
>
> Upul
>
>
>
> On Feb 1, 2008 6:38 PM, Vamsavardhana Reddy <c1...@gmail.com> wrote:
>
> > Very often I run into Geronimo startup failure with a BindException
> > since some port or the other is in use.  Then I change the PortOffset to get
> > going.  How do I figure which port/address is resulting in the exception?
> >
>
>

Re: How to figure what port is in use from a BindException

Posted by Upul Godage <up...@gmail.com>.
You can use a tool like netstat to check which ports programs are listening
on at the moment and unusable by the server instance.
netstat -anb
You can find which ports the server instance will use by the
config.substitutions.properties entries.

Upul


On Feb 1, 2008 6:38 PM, Vamsavardhana Reddy <c1...@gmail.com> wrote:

> Very often I run into Geronimo startup failure with a BindException since
> some port or the other is in use.  Then I change the PortOffset to get
> going.  How do I figure which port/address is resulting in the exception?
>