Here
https://github.com/apache/nifi/blob/main/nifi-extension-bundles/nifi-graph-bundle/nifi-other-graph-services/src/main/java/org/apache/nifi/graph/TinkerpopClientService.java#L420
for any query create new one connection but not closing it

After some time connection exhausted and exception will thrown

```
2025-08-12 14:05:10,834 ERROR [Timer-Driven Process Thread-10]
o.apache.tinkerpop.gremlin.driver.Client Initialization failed
java.util.concurrent.CompletionException: Could not initialize 2
(minPoolSize) connections in pool. Successful connections=0. Closing the
connection poo
l.
        at
org.apache.tinkerpop.gremlin.driver.ConnectionPool.<init>(ConnectionPool.java:165)
        at
org.apache.tinkerpop.gremlin.driver.ConnectionPool.<init>(ConnectionPool.java:104)
        at
org.apache.tinkerpop.gremlin.driver.ConnectionPool.<init>(ConnectionPool.java:99)
        at
org.apache.tinkerpop.gremlin.driver.Client$ClusteredClient.lambda$new$5(Client.java:589)
        at
org.apache.tinkerpop.gremlin.driver.Client$ClusteredClient.lambda$initializeImplementation$0(Client.java:538)
        at
java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
Caused by:
org.apache.tinkerpop.gremlin.driver.exception.ConnectionException: Could
not open Connection{channel=null host=Host{address=octopus/192.168.1
.160:8182, hostUri=ws://octopus:8182/gremlin} isDead=false borrowed=0
pending=0 markedReplaced=false closing=false
created=2025-08-12T14:05:10.817321566
Z thread=gremlin-driver-conn-scheduler-1}
        at
org.apache.tinkerpop.gremlin.driver.Connection.<init>(Connection.java:143)
        at
org.apache.tinkerpop.gremlin.driver.ConnectionFactory.create(ConnectionFactory.java:34)
        at
org.apache.tinkerpop.gremlin.driver.ConnectionPool.lambda$new$0(ConnectionPool.java:131)
        ... 7 common frames omitted
Caused by: io.netty.channel.AbstractChannel$AnnotatedSocketException:
Cannot assign requested address: octopus/192.168.1.160:8182
        Suppressed: java.util.concurrent.CompletionException: Rethrowing
promise failure cause
                at
io.netty.util.concurrent.DefaultPromise.rethrowIfFailed(DefaultPromise.java:685)
                at
io.netty.util.concurrent.DefaultPromise.sync(DefaultPromise.java:419)
                at
io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:119)
                at
io.netty.channel.DefaultChannelPromise.sync(DefaultChannelPromise.java:30)
                at
org.apache.tinkerpop.gremlin.driver.Connection.<init>(Connection.java:119)
                at
org.apache.tinkerpop.gremlin.driver.ConnectionFactory.create(ConnectionFactory.java:34)
                at
org.apache.tinkerpop.gremlin.driver.ConnectionPool.lambda$new$0(ConnectionPool.java:131)
                at
java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
                at
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:572)
                at
java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
                at
java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
                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.net.BindException: Cannot assign requested address
        at java.base/sun.nio.ch.Net.connect0(Native Method)
        at java.base/sun.nio.ch.Net.connect(Net.java:589)
        at java.base/sun.nio.ch.Net.connect(Net.java:596)
        at
java.base/sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:880)
        at io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:91)
        at io.netty.util.internal.SocketUtils$3.run(SocketUtils.java:88)
        at
java.base/java.security.AccessController.doPrivileged(AccessController.java:571)
```

And other side

```
$ ss -tna | grep 8182 | wc -l
41322
```

-- 
Павел

Reply via email to