java.net.ConnectException

tip

This was a bug at HBase 1.0.1, it has been patched, so an update to 1.0.2 or further should solve the problem. URL for the Jira thread: https://goo.gl/c5oa6f

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • When executing an HTTP request to a non available socket the error shown in the log says that it is an HTTP request error but doesn't mention a connection timeout or connection refused problem. See the log below: {noformat} ******************************************************************************** Message : Error sending HTTP request. Element : null -------------------------------------------------------------------------------- Exception stack is: Error sending HTTP request. (org.mule.api.MessagingException) sun.nio.ch.SocketChannelImpl.checkConnect:-2) sun.nio.ch.SocketChannelImpl.finishConnect:717) org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync:210) org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected:158) org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect:258) org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent:517) org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent:112) org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0:134) org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent:77) org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent:89) org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents:415) org.glassfish.grizzly.nio.SelectorRunner.iterateKeys:384) org.glassfish.grizzly.nio.SelectorRunner.doSelect:348) org.glassfish.grizzly.nio.SelectorRunner.run:279) org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork:591) org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run:571) java.lang.Thread.run:745) (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** {noformat} The only way to get the right error information is using {{mule.verbose.exceptions=true}}, see below: {noformat} ******************************************************************************** Message : Error sending HTTP request. Payload : 1 Payload Type : java.lang.String -------------------------------------------------------------------------------- Root Exception stack trace: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:210) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:158) at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:517) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0(FlowWorkManagerIOStrategy.java:134) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:77) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745) ******************************************************************************** {noformat}
    via by Alejandro Sequeira,
  • When executing an HTTP request to a non available socket the error shown in the log says that it is an HTTP request error but doesn't mention a connection timeout or connection refused problem. See the log below: {noformat} ******************************************************************************** Message : Error sending HTTP request. Element : null -------------------------------------------------------------------------------- Exception stack is: Error sending HTTP request. (org.mule.api.MessagingException) sun.nio.ch.SocketChannelImpl.checkConnect:-2) sun.nio.ch.SocketChannelImpl.finishConnect:717) org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync:210) org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected:158) org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect:258) org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent:517) org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent:112) org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0:134) org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent:77) org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent:89) org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents:415) org.glassfish.grizzly.nio.SelectorRunner.iterateKeys:384) org.glassfish.grizzly.nio.SelectorRunner.doSelect:348) org.glassfish.grizzly.nio.SelectorRunner.run:279) org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork:591) org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run:571) java.lang.Thread.run:745) (set debug level logging or '-Dmule.verbose.exceptions=true' for everything) ******************************************************************************** {noformat} The only way to get the right error information is using {{mule.verbose.exceptions=true}}, see below: {noformat} ******************************************************************************** Message : Error sending HTTP request. Payload : 1 Payload Type : java.lang.String -------------------------------------------------------------------------------- Root Exception stack trace: java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:210) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:158) at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:517) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0(FlowWorkManagerIOStrategy.java:134) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:77) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745) ******************************************************************************** {noformat}
    via by Alejandro Sequeira,
  • NullPayload exception - MuleSoft
    via by Unknown author,
  • How should I create a MuleMessage from String?
    via by Unknown author,
  • Run Hbase example in eclipse on ubuntu
    via by Unknown author,
  • Kafka producer Connection refused
    via Stack Overflow by Marko
    ,
    • java.net.ConnectException: Connection refused at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler.onConnectedAsync(TCPNIOConnectorHandler.java:210) at org.glassfish.grizzly.nio.transport.TCPNIOConnectorHandler$1.connected(TCPNIOConnectorHandler.java:158) at org.glassfish.grizzly.nio.transport.TCPNIOConnection.onConnect(TCPNIOConnection.java:258) at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:517) at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.run0(FlowWorkManagerIOStrategy.java:134) at org.mule.module.http.internal.request.grizzly.FlowWorkManagerIOStrategy.executeIoEvent(FlowWorkManagerIOStrategy.java:77) at org.glassfish.grizzly.strategies.AbstractIOStrategy.executeIoEvent(AbstractIOStrategy.java:89) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeyEvents(SelectorRunner.java:415) at org.glassfish.grizzly.nio.SelectorRunner.iterateKeys(SelectorRunner.java:384) at org.glassfish.grizzly.nio.SelectorRunner.doSelect(SelectorRunner.java:348) at org.glassfish.grizzly.nio.SelectorRunner.run(SelectorRunner.java:279) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591) at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    rocdayrocday
    2978 times, last one,
    nasimknasimk
    2935 times, last one,
    batwalrus76batwalrus76
    108 times, last one,
    stigkjstigkj
    20 times, last one,
    114 more bugmates