Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6136

got "java.net.SocketException: Invalid argument" exception

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • fuse-7.0
    • jboss-fuse-6.2.1
    • None
    • None
    • % %
    • Hide

      I have attached a test route reproducer-context.xml to reproduce the issue. The route reads from an activemq queue and uses cxf to send it to an http endpoint.
      The destination http endpoint does not exist and this is the expected configuration for reproducing the issue,

      Note: make sure fuse is configured with async http client so that cxf can use it. install cxf-http-async feature.

      Once test route is deployed, post the test-input.xml to the queue through hawtio. You will see the exception in the log.

      Running same test on RHEL7.2 cannot get the exception.

      Show
      I have attached a test route reproducer-context.xml to reproduce the issue. The route reads from an activemq queue and uses cxf to send it to an http endpoint. The destination http endpoint does not exist and this is the expected configuration for reproducing the issue, Note: make sure fuse is configured with async http client so that cxf can use it. install cxf-http-async feature. Once test route is deployed, post the test-input.xml to the queue through hawtio. You will see the exception in the log. Running same test on RHEL7.2 cannot get the exception.
    • 7.0 Sprint 1

    Description

      The route can be runned on RHEL7.2, but on RHEL6.8. got the exception :

      14:08:25,538 | WARN  | 9 - Test Threads | PhaseInterceptorChain            | 74 - org.apache.cxf.cxf-core - 3.0.4.redhat-621159 | Interceptor for {http://camel.apache.org/cxf/jaxws/dispatch}DefaultSEIService#{http://camel.apache.org/cxf/jaxws/dispatch}Invoke has thrown exception, unwinding now
      org.apache.cxf.interceptor.Fault: Could not send Message.
      	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:516)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:418)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:116)[214:org.apache.camel.camel-cxf:2.15.1.redhat-621159]
      	at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:139)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:115)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.TryProcessor.process(TryProcessor.java:86)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:448)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.Pipeline.process(Pipeline.java:121)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.Pipeline.access$100(Pipeline.java:44)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.Pipeline$1.done(Pipeline.java:139)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at org.apache.camel.processor.ThreadsProcessor$ProcessCall.run(ThreadsProcessor.java:85)[205:org.apache.camel.camel-core:2.15.1.redhat-621159]
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_102]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_102]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_102]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_102]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_102]
      Caused by: java.net.ConnectException: ConnectException invoking http://0.0.0.1/test/type/1234567: Invalid argument
      	at sun.reflect.GeneratedConstructorAccessor54.newInstance(Unknown Source)[:1.8.0_102]
      	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_102]
      	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_102]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1364)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1348)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	... 23 more
      Caused by: java.net.ConnectException: Invalid argument
      	at java.net.PlainSocketImpl.socketConnect(Native Method)[:1.8.0_102]
      	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)[:1.8.0_102]
      	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)[:1.8.0_102]
      	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)[:1.8.0_102]
      	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)[:1.8.0_102]
      	at java.net.Socket.connect(Socket.java:589)[:1.8.0_102]
      	at sun.net.NetworkClient.doConnect(NetworkClient.java:175)[:1.8.0_102]
      	at sun.net.www.http.HttpClient.openServer(HttpClient.java:432)[:1.8.0_102]
      	at sun.net.www.http.HttpClient.openServer(HttpClient.java:527)[:1.8.0_102]
      	at sun.net.www.http.HttpClient.<init>(HttpClient.java:211)[:1.8.0_102]
      	at sun.net.www.http.HttpClient.New(HttpClient.java:308)[:1.8.0_102]
      	at sun.net.www.http.HttpClient.New(HttpClient.java:326)[:1.8.0_102]
      	at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:1169)[:1.8.0_102]
      	at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1105)[:1.8.0_102]
      	at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:999)[:1.8.0_102]
      	at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:933)[:1.8.0_102]
      	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1283)[:1.8.0_102]
      	at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1258)[:1.8.0_102]
      	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.setupWrappedStream(URLConnectionHTTPConduit.java:183)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleHeadersTrustCaching(HTTPConduit.java:1307)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.onFirstWrite(HTTPConduit.java:1267)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.onFirstWrite(URLConnectionHTTPConduit.java:210)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:47)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)[74:org.apache.cxf.cxf-core:3.0.4.redhat-621159]
      	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1320)[96:org.apache.cxf.cxf-rt-transports-http:3.0.4.redhat-621159]
      	... 26 more
      

      Attachments

        1. camel-cxf-http-async.zip
          7 kB
        2. Producer.java
          3 kB
        3. reproducer-context.xml
          4 kB
        4. test-input.xml
          4 kB

        Issue Links

          Activity

            People

              rhn-support-tasato Tadayoshi Sato
              rhn-support-xiwu Xiaohui Wu
              Jan Kasztura Jan Kasztura (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: