Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-16745

[REST] java.net.ConnectException while creating data in cache

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 15.1.0.Dev05
    • REST
    • None
    • Hide

      1. Pull the infinispan-console repository main branch;
      2. Run ./run-server-for-e2e-container.sh script which run's ISPN server's latest main image and then puts data on it.
      3. Check the logs, you will see the exception in the logs;

      I was commenting out different lines in that script to understand which call creates the exception. So If you will comment lines from #44-56, and stop the docker image and run the script again, the exception is not there. If you will uncomment any line in the range mentioned above, and redo the restart steps, the exception is there.

      Show
      1. Pull the infinispan-console repository main branch; 2. Run ./run-server-for-e2e-container.sh script which run's ISPN server's latest main image and then puts data on it. 3. Check the logs, you will see the exception in the logs; I was commenting out different lines in that script to understand which call creates the exception. So If you will comment lines from #44-56, and stop the docker image and run the script again, the exception is not there. If you will uncomment any line in the range mentioned above, and redo the restart steps, the exception is there.

      While creating some data in the cache using REST API, the server throws exception:

      2024-10-10 16:28:11,512 ERROR [i.o.e.i.h.HttpExporter] Failed to export spans. The request could not be executed. Full error message: java.lang.IllegalStateException: java.net.ConnectException java.util.concurrent.CompletionException: java.lang.IllegalStateException: java.net.ConnectException
      	at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315)
      	at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1770)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
      	at java.base/java.lang.Thread.run(Thread.java:1583)
      Caused by: java.lang.IllegalStateException: java.net.ConnectException
      	at io.opentelemetry.exporter.sender.jdk.internal.JdkHttpSender.lambda$send$1(JdkHttpSender.java:124)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
      	... 3 more
      Caused by: java.net.ConnectException
      	at java.net.http/jdk.internal.net.http.HttpClientImpl.send(HttpClientImpl.java:951)
      	at java.net.http/jdk.internal.net.http.HttpClientFacade.send(HttpClientFacade.java:133)
      	at io.opentelemetry.exporter.sender.jdk.internal.JdkHttpSender.sendRequest(JdkHttpSender.java:214)
      	at io.opentelemetry.exporter.sender.jdk.internal.JdkHttpSender.sendInternal(JdkHttpSender.java:164)
      	at io.opentelemetry.exporter.sender.jdk.internal.JdkHttpSender.lambda$send$1(JdkHttpSender.java:122)
      	... 4 more
      Caused by: java.net.ConnectException
      	at java.net.http/jdk.internal.net.http.common.Utils.toConnectException(Utils.java:1028)
      	at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:227)
      	at java.net.http/jdk.internal.net.http.PlainHttpConnection.checkRetryConnect(PlainHttpConnection.java:280)
      	at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$2(PlainHttpConnection.java:238)
      	at java.base/java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:934)
      	at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:911)
      	at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:510)
      	at java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1773)
      	... 3 more
      Caused by: java.nio.channels.ClosedChannelException
      	at java.base/sun.nio.ch.SocketChannelImpl.ensureOpen(SocketChannelImpl.java:202)
      	at java.base/sun.nio.ch.SocketChannelImpl.beginConnect(SocketChannelImpl.java:786)
      	at java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:874)
      	at java.net.http/jdk.internal.net.http.PlainHttpConnection.lambda$connectAsync$1(PlainHttpConnection.java:210)
      	at java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
      	at java.net.http/jdk.internal.net.http.PlainHttpConnection.connectAsync(PlainHttpConnection.java:212)
      	... 9 more
      
      

      The data is created in the cache properly, so on the one hand the exception could be ignored as seems that the API call does it's job. But on the other hand, as soon as this excepiton appears in the logs, the server starts to respond to REST API calls in wrong way which is visible in Console.
      Would be great if the exception will be investigated as we hadn't it in 15.0.x.

      UPDATE: I have cleared all my docker images / containers, and started the process for scratch, now the logs are full of that exception, but console tests passed properly. So not sure, if the abnormal server behaviour which happens sometimes is connected. Will continue the investigation.

              ttarrant@redhat.com Tristan Tarrant
              amanukya@redhat.com Anna Manukyan
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: