You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by lavanya <la...@gmail.com> on 2012/01/26 22:11:02 UTC
BindException with Embedded Jetty for camel web app
Hi,
I have a web application based on spring, camel and activemq. The war file
works fine when I deploy in tomcat. I am trying to use the embedded Jetty
instead of Tomcat as described
http://internna.blogspot.com/2011/08/step-by-step-executable-war-files.html
here
I am always getting the below exception:
java.io.IOException: Failed to bind to server socket: tcp://localhost:61616
due to: java.net.BindException: Address already in use: JVM_Bind
caused by
java.net.BindException: Address already in use: JVM_Bind
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(Unknown Source)
at java.net.ServerSocket.bind(Unknown Source)
at java.net.ServerSocket.<init>(Unknown Source)
at javax.net.DefaultServerSocketFactory.createServerSocket(Unknown
Source)
at
org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:135)
at
org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:60)
at
org.apache.activemq.transport.TransportFactory.bind(TransportFactory.java:131)
at
org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:319)
I have also tried to different port, getting the same exception again.
When I do netstat -a, I am not seeing any process listening to this port.
I am not sure what is going on, could you please help resolving this issue.
FYI: I am using Jetty version 7, activemq 5.5, camel 2.8.2,spring
3.0.x,geronimo-servlet 1.2
Thanks for your response.
--
View this message in context: http://camel.465427.n5.nabble.com/BindException-with-Embedded-Jetty-for-camel-web-app-tp5433991p5433991.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: BindException with Embedded Jetty for camel web app
Posted by lavanya <la...@gmail.com>.
Thanks Willem. I looked at my configuration files.
I am referring both ActiveMQComponent and JmsComponent in my configuration,
I think it is a redundant, and got rid off JmsComponet, now it works fine.
But still I am wondering why Tomcat doesn't throw any exception for the
same.
--
View this message in context: http://camel.465427.n5.nabble.com/BindException-with-Embedded-Jetty-for-camel-web-app-tp5433991p5435768.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: BindException with Embedded Jetty for camel web app
Posted by Willem Jiang <wi...@gmail.com>.
The error is caused by ActiveMQ JMS Broker try to bind the port of
61616.
Can you check if you start the ActiveMQ Broker twice ?
Or you already start the broker somewhere.
On Fri Jan 27 05:33:53 2012, lavanya wrote:
> Thanks for the response.
> I am not running tomcat and jetty at the same time. And also the results of
> netstat command doesn't list this port.
> I tried changing to different ports like 61617 / 616701, but it doesn't
> help.
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/BindException-with-Embedded-Jetty-for-camel-web-app-tp5433991p5434053.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: BindException with Embedded Jetty for camel web app
Posted by lavanya <la...@gmail.com>.
Thanks for the response.
I am not running tomcat and jetty at the same time. And also the results of
netstat command doesn't list this port.
I tried changing to different ports like 61617 / 616701, but it doesn't
help.
--
View this message in context: http://camel.465427.n5.nabble.com/BindException-with-Embedded-Jetty-for-camel-web-app-tp5433991p5434053.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: BindException with Embedded Jetty for camel web app
Posted by Chris Odom <ch...@mediadriver.com>.
The below exception means that some other application is using
tcp://localhost:61616...
java.net.BindException: Address already in use: JVM_Bind
verify with command:
Windows - netstat -an |find /i "listening"
Linux - netstat -anp }grep 61616
If you try to run tomcat and jetty at the same time you would run into
this.
Try changing the activemq-broker.xml configuration file to use a different
port or don't run both containers at the same time.
--
Thanks,
Chris Odom
512:799-0270