You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by Tim McConnell <ti...@gmail.com> on 2007/05/04 17:53:35 UTC

Error Starting Server

Is anyone else getting this error when trying to start the server ?? Or know how 
to resolve ?? Just started happening today....

java.net.BindException: Address already in use: JVM_Bind
         at java.net.PlainSocketImpl.socketBind(Native Method)
         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
         at java.net.ServerSocket.bind(ServerSocket.java:319)
         at java.net.ServerSocket.<init>(ServerSocket.java:185)
         at java.net.ServerSocket.<init>(ServerSocket.java:141)

-- 
Thanks,
Tim McConnell

Re: Error Starting Server

Posted by Guy Coleman <gu...@prolog.uk.com>.
On 04/05/2007 16:53, Tim McConnell wrote:
> Is anyone else getting this error when trying to start the server ?? Or 
> know how to resolve ?? Just started happening today....
> 
> java.net.BindException: Address already in use: JVM_Bind
>         at java.net.PlainSocketImpl.socketBind(Native Method)
>         at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>         at java.net.ServerSocket.bind(ServerSocket.java:319)
>         at java.net.ServerSocket.<init>(ServerSocket.java:185)
>         at java.net.ServerSocket.<init>(ServerSocket.java:141)
> 


Something is using the port that your server is trying to bind to, 
either intentionally or because the OS randomly handed it out. For 
example, Firefox and Thunderbird often do this on my dev machine if I 
start them up before JBoss.

You need to find out what is using the port and stop it (using something 
like netstat). There are a few ways in Windows/Linux/BSD/etc for 
reserving ports - Google is your friend :-)

-Guy.

Re: Error Starting Server

Posted by Mohamed Fawzy <mo...@gmail.com>.
Mike Kienenberger wrote:
> You have something else already running at the port your application
> is trying to use.
>
> Maybe another instance of the same application?
>
> Under unix, you can use lsof -i TCP:<yourPortNumberHere> to find the
> problem.  (probably with sudo or as root).
>
> Under windows, you can use Handle or TCPView or something along those 
> lines.
>
>
> On 5/4/07, Tim McConnell <ti...@gmail.com> wrote:
>> Is anyone else getting this error when trying to start the server ?? 
>> Or know how
>> to resolve ?? Just started happening today....
>>
>> java.net.BindException: Address already in use: JVM_Bind
>>          at java.net.PlainSocketImpl.socketBind(Native Method)
>>          at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>>          at java.net.ServerSocket.bind(ServerSocket.java:319)
>>          at java.net.ServerSocket.<init>(ServerSocket.java:185)
>>          at java.net.ServerSocket.<init>(ServerSocket.java:141)
>>
>> -- 
>> Thanks,
>> Tim McConnell
>>
>
This problem is due to using the same port by another server.
Make sure that no instances are opened, may be you didn't start a 
server, but it may start by default in the startup of the machine.
I faced this problem before with tomcat on windows when setting it to 
start automatically when the machine starts.
Then, I set it to start manually, and every thing is fine.

To stop the servers on windows you can either from the start menu if the 
server you use accept that or through task manager by killing the 
process that is alive.
On linux go to the bin folder of your server and run the shutdown.sh and 
if it doesn't close the server, you can kill the process by listing the 
processes that are running using ps command, then kill the process using 
the process number.
after shutting down go to your browser to check that the server is 
already closed, by typing localhost:portnumber

Wish this could help.

Re: Error Starting Server

Posted by Mike Kienenberger <mk...@gmail.com>.
You have something else already running at the port your application
is trying to use.

Maybe another instance of the same application?

Under unix, you can use lsof -i TCP:<yourPortNumberHere> to find the
problem.  (probably with sudo or as root).

Under windows, you can use Handle or TCPView or something along those lines.


On 5/4/07, Tim McConnell <ti...@gmail.com> wrote:
> Is anyone else getting this error when trying to start the server ?? Or know how
> to resolve ?? Just started happening today....
>
> java.net.BindException: Address already in use: JVM_Bind
>          at java.net.PlainSocketImpl.socketBind(Native Method)
>          at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
>          at java.net.ServerSocket.bind(ServerSocket.java:319)
>          at java.net.ServerSocket.<init>(ServerSocket.java:185)
>          at java.net.ServerSocket.<init>(ServerSocket.java:141)
>
> --
> Thanks,
> Tim McConnell
>