java.net.BindException: Address already in use (Bind failed)

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

java.net.BindException: Address already in use (Bind failed)

Júnior
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.BindException: Address already in use (Bind failed)

Vinod Kavinda
The reason for this error is the ports required by EI are already in use. There is a high chance that you have a previous EI instance which is not properly stopped. Please check whether such process exists and kill it. here is a list of default ports [1]. You can offset them is required as well.



Regards,
Vinod

On Sat, Dec 16, 2017 at 2:06 AM, Júnior <[hidden email]> wrote:
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.&lt;init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Vinod Kavinda
Senior Software Engineer 
Mobile : <a href="tel:%2B94%20%280%29%20712%20415544" value="+94773451194" style="color:rgb(17,85,204)" target="_blank">+94 (0) 712 415544
http://wso2.com/signature


_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.BindException: Address already in use (Bind failed)

roshan wijesena-2
In reply to this post by Júnior
ps ax | grep wso2

kill -9 PID



On Sat, Dec 16, 2017 at 7:36 AM, Júnior <[hidden email]> wrote:
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.&lt;init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.BindException: Address already in use (Bind failed)

Júnior
Hi,

There is only EI running.

The error seems to be in the HTTP Commons.

There was no other EI process running, as I said in the email, the error happened when using the call mediator.

Thanks,

2017-12-18 2:10 GMT-02:00 roshan wijesena <[hidden email]>:
ps ax | grep wso2

kill -9 PID



On Sat, Dec 16, 2017 at 7:36 AM, Júnior <[hidden email]> wrote:
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.&lt;init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev





--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.BindException: Address already in use (Bind failed)

Rasika Perera
Hi Francisco,

Sometimes it could be due to the JDK you are using and O/S[1]. Could you please let us know the JDK/JRE and O/S you are trying.


On Mon, Dec 18, 2017 at 7:41 PM, Júnior <[hidden email]> wrote:
Hi,

There is only EI running.

The error seems to be in the HTTP Commons.

There was no other EI process running, as I said in the email, the error happened when using the call mediator.

Thanks,

2017-12-18 2:10 GMT-02:00 roshan wijesena <[hidden email]>:
ps ax | grep wso2

kill -9 PID



On Sat, Dec 16, 2017 at 7:36 AM, Júnior <[hidden email]> wrote:
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.&lt;init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev





--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
With Regards,

Rasika Perera
Senior Software Engineer



WSO2 Inc. www.wso2.com
lean.enterprise.middleware

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.BindException: Address already in use (Bind failed)

Eranda Rajapakshe
Hi Francisco,

Are you getting this error per each request? or is it only when applying a high load? 

Also is there any specific reason to use call mediator in Blocking mode, if not try it out in non-blocking mode (which is default and recommended unless there is a special reason to use blocking)

Thanks, 

On Tue, Dec 19, 2017 at 3:43 PM, Rasika Perera <[hidden email]> wrote:
Hi Francisco,

Sometimes it could be due to the JDK you are using and O/S[1]. Could you please let us know the JDK/JRE and O/S you are trying.


On Mon, Dec 18, 2017 at 7:41 PM, Júnior <[hidden email]> wrote:
Hi,

There is only EI running.

The error seems to be in the HTTP Commons.

There was no other EI process running, as I said in the email, the error happened when using the call mediator.

Thanks,

2017-12-18 2:10 GMT-02:00 roshan wijesena <[hidden email]>:
ps ax | grep wso2

kill -9 PID



On Sat, Dec 16, 2017 at 7:36 AM, Júnior <[hidden email]> wrote:
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.&lt;init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev





--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
With Regards,

Rasika Perera
Senior Software Engineer



WSO2 Inc. www.wso2.com
lean.enterprise.middleware

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Eranda Rajapakshe
Software Engineer
WSO2 Inc.
Mobile : <a href="tel:%2B94784822608" value="+94784822608" target="_blank">+94784822608

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev
Reply | Threaded
Open this post in threaded view
|

Re: java.net.BindException: Address already in use (Bind failed)

Hemika Kodikara
If you know which port is blocking your call, you can use the following command to find the process/app thats using that port.

sudo lsof -i :80    <--- For port 80


Then you can kill/close the process/app.


Regards,

Hemika


Hemika Kodikara
WSO2 Inc. 
lean . enterprise . middleware
http://wso2.com

Mobile : +94777688882

On Fri, Jan 5, 2018 at 4:36 PM, Eranda Rajapakshe <[hidden email]> wrote:
Hi Francisco,

Are you getting this error per each request? or is it only when applying a high load? 

Also is there any specific reason to use call mediator in Blocking mode, if not try it out in non-blocking mode (which is default and recommended unless there is a special reason to use blocking)

Thanks, 

On Tue, Dec 19, 2017 at 3:43 PM, Rasika Perera <[hidden email]> wrote:
Hi Francisco,

Sometimes it could be due to the JDK you are using and O/S[1]. Could you please let us know the JDK/JRE and O/S you are trying.


On Mon, Dec 18, 2017 at 7:41 PM, Júnior <[hidden email]> wrote:
Hi,

There is only EI running.

The error seems to be in the HTTP Commons.

There was no other EI process running, as I said in the email, the error happened when using the call mediator.

Thanks,

2017-12-18 2:10 GMT-02:00 roshan wijesena <[hidden email]>:
ps ax | grep wso2

kill -9 PID



On Sat, Dec 16, 2017 at 7:36 AM, Júnior <[hidden email]> wrote:
Hi,

I am facing this issue when using the call mediator.

Is there any fix for that?

I am running on EI-61.0

Thanks

Follow the stack trace

org.apache.axis2.AxisFault: Address already in use (Bind failed)
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:430)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:199)
        at org.apache.axis2.transport.http.HTTPSender.send(HTTPSender.java:77)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:451)
        at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:278)
        at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:442)
        at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:430)
        at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:225)
        at org.apache.axis2.client.OperationClient.execute(OperationClient.java:149)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.sendReceive(BlockingMsgSender.java:302)
        at org.apache.synapse.message.senders.blocking.BlockingMsgSender.send(BlockingMsgSender.java:211)
        at org.apache.synapse.mediators.builtin.CallMediator.handleBlockingCall(CallMediator.java:150)
        at org.apache.synapse.mediators.builtin.CallMediator.mediate(CallMediator.java:113)
        at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:97)
        at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:250)
        at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:267)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.mediateFromContinuationStateStack(Axis2SynapseEnvironment.java:775)
        at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:282)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.handleMessage(SynapseCallbackReceiver.java:554)
        at org.apache.synapse.core.axis2.SynapseCallbackReceiver.receive(SynapseCallbackReceiver.java:188)
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)
        at org.apache.synapse.transport.passthru.ClientWorker.run(ClientWorker.java:262)
        at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.net.BindException: Address already in use (Bind failed)
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:387)
        at java.net.Socket.bind(Socket.java:644)
        at sun.security.ssl.BaseSSLSocketImpl.bind(BaseSSLSocketImpl.java:124)
        at sun.security.ssl.SSLSocketImpl.bind(SSLSocketImpl.java:65)
        at sun.security.ssl.SSLSocketImpl.&lt;init>(SSLSocketImpl.java:468)
        at sun.security.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:153)
        at org.opensaml.ws.soap.client.http.TLSProtocolSocketFactory.createSocket(TLSProtocolSocketFactory.java:185)
        at org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:707)
        at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
        at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
        at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
        at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
        at org.apache.axis2.transport.http.AbstractHTTPSender.executeMethod(AbstractHTTPSender.java:659)
        at org.apache.axis2.transport.http.HTTPSender.sendViaPost(HTTPSender.java:195)
        ... 24 more



--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev





--
Francisco Ribeiro
SCEA|SCJP|SCWCD|IBM Certified SOA Associate

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
With Regards,

Rasika Perera
Senior Software Engineer



WSO2 Inc. www.wso2.com
lean.enterprise.middleware

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev




--
Eranda Rajapakshe
Software Engineer
WSO2 Inc.
Mobile : <a href="tel:%2B94784822608" value="+94784822608" target="_blank">+94784822608

_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev



_______________________________________________
Dev mailing list
[hidden email]
http://wso2.org/cgi-bin/mailman/listinfo/dev