Hi, I'm trying to access remote job manager using ...
# troubleshooting
j
Hi, I'm trying to access remote job manager using CLI with a standalone zookeeper-ha setup. But when I try to run
flink list
it seems to not use zookeeper configuration, instead it tries to connect on 0.0.0.0. Why is not using the zookeeper configuration?
Copy code
root@2bb8c8849023:/opt/flink# flink list
Waiting for response...

------------------------------------------------------------
 The program finished with the following exception:

org.apache.flink.util.FlinkException: Failed to retrieve job list.
        at org.apache.flink.client.cli.CliFrontend.listJobs(CliFrontend.java:453)
        at org.apache.flink.client.cli.CliFrontend.lambda$list$0(CliFrontend.java:434)
        at org.apache.flink.client.cli.CliFrontend.runClusterAction(CliFrontend.java:1216)
        at org.apache.flink.client.cli.CliFrontend.list(CliFrontend.java:430)
        at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1276)
        at org.apache.flink.client.cli.CliFrontend.lambda$mainInternal$10(CliFrontend.java:1367)
        at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
        at org.apache.flink.client.cli.CliFrontend.mainInternal(CliFrontend.java:1367)
        at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1335)
Caused by: org.apache.flink.util.concurrent.FutureUtils$RetryException: Could not complete the operation. Number of retries has been exhausted.
        at org.apache.flink.util.concurrent.FutureUtils.lambda$retryOperationWithDelay$6(FutureUtils.java:294)
        at java.base/java.util.concurrent.CompletableFuture.uniWhenComplete(Unknown Source)
        at java.base/java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(Unknown Source)
        at java.base/java.util.concurrent.CompletableFuture.postComplete(Unknown Source)
        at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(Unknown Source)
        at org.apache.flink.runtime.rest.RestClient.lambda$submitRequest$4(RestClient.java:592)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:590)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:583)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:559)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:492)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:636)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:629)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:118)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:321)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:337)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.CompletionException: org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /0.0.0.0:8081
        at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(Unknown Source)
        at java.base/java.util.concurrent.CompletableFuture.completeThrowable(Unknown Source)
        at java.base/java.util.concurrent.CompletableFuture$UniCompose.tryFire(Unknown Source)
        ... 19 more
Caused by: org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: /0.0.0.0:8081
Caused by: java.net.ConnectException: Connection refused
        at java.base/sun.nio.ch.Net.pollConnect(Native Method)
        at java.base/sun.nio.ch.Net.pollConnectNow(Unknown Source)
        at java.base/sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
        at org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:337)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:776)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650)
        at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562)
        at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
        at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
        at java.base/java.lang.Thread.run(Unknown Source)
root@2bb8c8849023:/opt/flink# cat conf/flink-conf.yaml
blob.server.port: 6124
high-availability.type: zookeeper
jobmanager.execution.failover-strategy: region
taskmanager.memory.jvm-metaspace.size: 1g
taskmanager.memory.task.off-heap.size: 2g
jobmanager.rpc.address: 2bb8c8849023
state.savepoints.dir: file:///data/nfsshare/flink-savepoints
query.server.port: 6125
high-availability.zookeeper.path.root: /flink
jobmanager.bind-host: 0.0.0.0
high-availability.storageDir: file:///data/nfsshare/flink-high-availability
parallelism.default: 1
taskmanager.numberOfTaskSlots: 10
env.java.opts.all: -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${FLINK_LOG_PREFIX}.hprof
state.backend.type: rocksdb
pekko.ask.timeout: 300000
taskmanager.memory.process.size: 40g
taskmanager.bind-host: 0.0.0.0
taskmanager.memory.network.min: 8gb
classloader.resolve-order: parent-first
client.timeout: 300000
state.backend.incremental: true
jobmanager.memory.process.size: 4g
rest.bind-address: 0.0.0.0
jobstore.expiration-time: 604800
pekko.lookup.timeout: 300000
high-availability.zookeeper.quorum: zoo-1:2181,zoo-2:2181,zoo-3:2181
env.java.default-opts.all: --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.time.temporal=ALL-UNNAMED --add-opens java.base/java.net=ALL-UNNAMED --add-opens java.base/java
.io=ALL-UNNAMED --add-opens java.base/java.time=ALL-UNNAMED
env.log.dir: /data/nfsshare/flink-log
taskmanager.memory.managed.size: 24g
taskmanager.load-balance.mode: SLOTS
rest.address: 0.0.0.0
state.checkpoints.dir: file:///data/nfsshare/flink-checkpoints
s
rest.address
?
j
@Simon Dahlbacka It says in the documentation regarding rest.address: The address that should be used by clients to connect to the server. Attention: This option is respected only if the high-availability configuration is NONE. Since I set the high-availability.type to zookeeper, I would expect the rest.address to be ignored?
I removed rest.address option just in case and it still fails the same way.
Okay, I was simply missing the option
high-availability.cluster-id
. After I set this option, everything works.