You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Andrew Block <an...@gmail.com> on 2015/08/04 17:48:55 UTC

Re: camel websocket - java.net.BindException: Address already in use: bind

I have also seen this issue with the Websocket component previously as I had been working with this component recently.

Logged a JIRA for the issue: https://issues.apache.org/jira/browse/CAMEL-9049

I pinpointed the issue and will be working on a patch shortly

Thanks, 
Andy

-- 
Andrew Block


On August 4, 2015 at 5:14:54 AM, Shemeem (shemeem.sp@bdbizviz.com) wrote:

Hi All,  
I am using apache camel websocket in OSGI enviromnet(apache karaf  
container). I am not able to redeploy my bundle with websocket route. When I  
am trying the same, I am getting the following exception in log:  

Caused by: org.apache.camel.FailedToCreateProducerException: Failed to  
create Producer for endpoint:  
Endpoint[websocket://{host}:{port}/camel-websocket?maxIdle  
Time=3000000&sendToAll=false]. Reason: java.net.BindException: Address  
already in use: bind  

This error clearly says that, the port which I am using is preoccupied.  
Here, my question is how do I release the port in camel websocket??  
I am stoping the camel context and websocket using the below code, in the  
bundle stop method, inside the bundle activator class.  

WebsocketComponent wc  
=camelConetxtImpl.getCamelConetxt().getComponent("websocket",  
WebsocketComponent.class);  

wc.doStop();  

As well as, I amstoping the camel context also.  

But this is not working for me. Every time, I have to restart the karaf,  
in-order to solve this issue.  

Please guide me on this issue. :) Is there any other way to release the  
port??  

Thanks in advance  
Shemeem SP  



--  
View this message in context: http://camel.465427.n5.nabble.com/camel-websocket-java-net-BindException-Address-already-in-use-bind-tp5770274.html  
Sent from the Camel - Users mailing list archive at Nabble.com.  

RE: camel websocket - java.net.BindException: Address already in use: bind

Posted by sh...@bdbizviz.com.
Thank you very much Andy :) 

-----Original Message-----
From: Andrew Block [mailto:andy.block@gmail.com] 
Sent: 04 August 2015 PM 09:19
To: users@camel.apache.org; Shemeem <sh...@bdbizviz.com>
Subject: Re: camel websocket - java.net.BindException: Address already in use: bind

I have also seen this issue with the Websocket component previously as I had been working with this component recently.

Logged a JIRA for the issue: https://issues.apache.org/jira/browse/CAMEL-9049

I pinpointed the issue and will be working on a patch shortly

Thanks, 
Andy

-- 
Andrew Block


On August 4, 2015 at 5:14:54 AM, Shemeem (shemeem.sp@bdbizviz.com) wrote:

Hi All,  
I am using apache camel websocket in OSGI enviromnet(apache karaf  
container). I am not able to redeploy my bundle with websocket route. When I  
am trying the same, I am getting the following exception in log:  

Caused by: org.apache.camel.FailedToCreateProducerException: Failed to  
create Producer for endpoint:  
Endpoint[websocket://{host}:{port}/camel-websocket?maxIdle  
Time=3000000&sendToAll=false]. Reason: java.net.BindException: Address  
already in use: bind  

This error clearly says that, the port which I am using is preoccupied.  
Here, my question is how do I release the port in camel websocket??  
I am stoping the camel context and websocket using the below code, in the  
bundle stop method, inside the bundle activator class.  

WebsocketComponent wc  
=camelConetxtImpl.getCamelConetxt().getComponent("websocket",  
WebsocketComponent.class);  

wc.doStop();  

As well as, I amstoping the camel context also.  

But this is not working for me. Every time, I have to restart the karaf,  
in-order to solve this issue.  

Please guide me on this issue. :) Is there any other way to release the  
port??  

Thanks in advance  
Shemeem SP  



--  
View this message in context: http://camel.465427.n5.nabble.com/camel-websocket-java-net-BindException-Address-already-in-use-bind-tp5770274.html  
Sent from the Camel - Users mailing list archive at Nabble.com.