[ 
https://issues.apache.org/jira/browse/FLINK-30508?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17654432#comment-17654432
 ] 

Shengkai Fang commented on FLINK-30508:
---------------------------------------

Thanks for reporting this issue. It seems the job has been cleaned up before 
the client fetch results... Pleaes take a look at the following logs

 
{code:java}
04:10:04,314 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.jobmaster.JobMaster                 [] - Stopping the 
JobMaster for job 'collect' (17922fda0de3fe8d5d4d82f496fd8480).
04:10:04,317 [flink-akka.actor.default-dispatcher-12] ERROR 
org.apache.flink.runtime.rest.handler.job.coordination.ClientCoordinationHandler
 [] - Unhandled exception.
org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find 
Flink job (17922fda0de3fe8d5d4d82f496fd8480)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.getJobMasterGateway(Dispatcher.java:1212)
 ~[flink-runtime-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.performOperationOnJobMasterGateway(Dispatcher.java:1227)
 ~[flink-runtime-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.deliverCoordinationRequestToCoordinator(Dispatcher.java:985)
 ~[flink-runtime-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_292]
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_292]
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_292]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_292]
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:309)
 ~[?:?]
    at 
org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83)
 ~[?:?]
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:307)
 ~[?:?]
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:222)
 ~[?:?]
    at 
org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:84)
 ~[?:?]
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:168)
 ~[?:?]
    at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24) ~[?:?]
    at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20) ~[?:?]
    at scala.PartialFunction.applyOrElse(PartialFunction.scala:123) 
~[scala-library-2.12.7.jar:?]
    at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122) 
~[scala-library-2.12.7.jar:?]
    at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20) 
~[?:?]
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) 
~[scala-library-2.12.7.jar:?]
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) 
~[scala-library-2.12.7.jar:?]
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172) 
~[scala-library-2.12.7.jar:?]
    at akka.actor.Actor.aroundReceive(Actor.scala:537) ~[?:?]
    at akka.actor.Actor.aroundReceive$(Actor.scala:535) ~[?:?]
    at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220) ~[?:?]
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580) ~[?:?]
    at akka.actor.ActorCell.invoke(ActorCell.scala:548) ~[?:?]
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270) ~[?:?]
    at akka.dispatch.Mailbox.run(Mailbox.scala:231) ~[?:?]
    at akka.dispatch.Mailbox.exec(Mailbox.scala:243) ~[?:?]
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) 
[?:1.8.0_292]
    at 
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) 
[?:1.8.0_292]
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) 
[?:1.8.0_292]
    at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) 
[?:1.8.0_292]
04:10:04,325 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.checkpoint.StandaloneCompletedCheckpointStore [] - 
Shutting down
04:10:04,325 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.jobmaster.JobMaster                 [] - Disconnect 
TaskExecutor f8383d25-f1de-44e9-8c1c-98a7465bc349 because: Stopping JobMaster 
for job 'collect' (17922fda0de3fe8d5d4d82f496fd8480).
04:10:04,325 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.jobmaster.slotpool.DefaultDeclarativeSlotPool [] - 
Releasing slot [037b6db35609cc3bef4112cb2b2c2301].
04:10:04,325 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.jobmaster.JobMaster                 [] - Close 
ResourceManager connection f91ca618e2bf66e6cd04e4537ba14346: Stopping JobMaster 
for job 'collect' (17922fda0de3fe8d5d4d82f496fd8480).
04:10:04,325 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.taskexecutor.slot.TaskSlotTableImpl [] - Free slot 
TaskSlot(index:3, state:ACTIVE, resource profile: 
ResourceProfile{taskHeapMemory=256.000gb (274877906944 bytes), 
taskOffHeapMemory=256.000gb (274877906944 bytes), managedMemory=20.000mb 
(20971520 bytes), networkMemory=16.000mb (16777216 bytes)}, allocationId: 
037b6db35609cc3bef4112cb2b2c2301, jobId: 17922fda0de3fe8d5d4d82f496fd8480).
04:10:04,326 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.taskexecutor.DefaultJobLeaderService [] - Remove job 
17922fda0de3fe8d5d4d82f496fd8480 from job leader monitoring.
04:10:04,326 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.taskexecutor.TaskExecutor           [] - Close 
JobManager connection for job 17922fda0de3fe8d5d4d82f496fd8480.
04:10:04,331 [flink-akka.actor.default-dispatcher-13] INFO  
org.apache.flink.runtime.resourcemanager.StandaloneResourceManager [] - 
Disconnect job manager 
9234f8e5984b2c41461d696253fe4725@akka://flink/user/rpc/jobmanager_10 for job 
17922fda0de3fe8d5d4d82f496fd8480 from the resource manager.
04:10:04,334 [          Thread-164] INFO  
org.apache.flink.runtime.source.coordinator.SourceCoordinator [] - Closing 
SourceCoordinator for source Source: foo[57].
04:10:04,335 [          Thread-164] INFO  
org.apache.flink.runtime.source.coordinator.SourceCoordinator [] - Source 
coordinator for source Source: foo[57] closed.
04:10:04,336 [          Thread-157] WARN  
org.apache.flink.streaming.api.operators.collect.CollectResultFetcher [] - An 
exception occurred when fetching query results
java.util.concurrent.ExecutionException: 
org.apache.flink.runtime.rest.util.RestClientException: [Internal server 
error., <Exception on server side:
org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find 
Flink job (17922fda0de3fe8d5d4d82f496fd8480)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.getJobMasterGateway(Dispatcher.java:1212)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.performOperationOnJobMasterGateway(Dispatcher.java:1227)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.deliverCoordinationRequestToCoordinator(Dispatcher.java:985)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:309)
    at 
org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:307)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:222)
    at 
org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:84)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:168)
    at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)
    at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20)
    at scala.PartialFunction.applyOrElse(PartialFunction.scala:123)
    at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122)
    at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20)
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
    at akka.actor.Actor.aroundReceive(Actor.scala:537)
    at akka.actor.Actor.aroundReceive$(Actor.scala:535)
    at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580)
    at akka.actor.ActorCell.invoke(ActorCell.scala:548)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
    at akka.dispatch.Mailbox.run(Mailbox.scala:231)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at 
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)End 
of exception on server side>]
    at 
java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:357) 
~[?:1.8.0_292]
    at java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1908) 
~[?:1.8.0_292]
    at 
org.apache.flink.streaming.api.operators.collect.CollectResultFetcher.sendRequest(CollectResultFetcher.java:170)
 ~[flink-streaming-java-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.streaming.api.operators.collect.CollectResultFetcher.next(CollectResultFetcher.java:129)
 [flink-streaming-java-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.streaming.api.operators.collect.CollectResultIterator.nextResultFromFetcher(CollectResultIterator.java:106)
 [flink-streaming-java-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.streaming.api.operators.collect.CollectResultIterator.hasNext(CollectResultIterator.java:80)
 [flink-streaming-java-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.table.planner.connectors.CollectDynamicSink$CloseableRowIteratorWrapper.hasNext(CollectDynamicSink.java:222)
 [flink-table-planner_2.12-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.table.client.gateway.local.result.CollectResultBase$ResultRetrievalThread.run(CollectResultBase.java:75)
 [classes/:?]
Caused by: org.apache.flink.runtime.rest.util.RestClientException: [Internal 
server error., <Exception on server side:
org.apache.flink.runtime.messages.FlinkJobNotFoundException: Could not find 
Flink job (17922fda0de3fe8d5d4d82f496fd8480)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.getJobMasterGateway(Dispatcher.java:1212)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.performOperationOnJobMasterGateway(Dispatcher.java:1227)
    at 
org.apache.flink.runtime.dispatcher.Dispatcher.deliverCoordinationRequestToCoordinator(Dispatcher.java:985)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.lambda$handleRpcInvocation$1(AkkaRpcActor.java:309)
    at 
org.apache.flink.runtime.concurrent.akka.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:83)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcInvocation(AkkaRpcActor.java:307)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleRpcMessage(AkkaRpcActor.java:222)
    at 
org.apache.flink.runtime.rpc.akka.FencedAkkaRpcActor.handleRpcMessage(FencedAkkaRpcActor.java:84)
    at 
org.apache.flink.runtime.rpc.akka.AkkaRpcActor.handleMessage(AkkaRpcActor.java:168)
    at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:24)
    at akka.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:20)
    at scala.PartialFunction.applyOrElse(PartialFunction.scala:123)
    at scala.PartialFunction.applyOrElse$(PartialFunction.scala:122)
    at akka.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:20)
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171)
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
    at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:172)
    at akka.actor.Actor.aroundReceive(Actor.scala:537)
    at akka.actor.Actor.aroundReceive$(Actor.scala:535)
    at akka.actor.AbstractActor.aroundReceive(AbstractActor.scala:220)
    at akka.actor.ActorCell.receiveMessage(ActorCell.scala:580)
    at akka.actor.ActorCell.invoke(ActorCell.scala:548)
    at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
    at akka.dispatch.Mailbox.run(Mailbox.scala:231)
    at akka.dispatch.Mailbox.exec(Mailbox.scala:243)
    at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
    at 
java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
    at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
    at 
java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175)End 
of exception on server side>]
    at 
org.apache.flink.runtime.rest.RestClient.parseResponse(RestClient.java:534) 
~[flink-runtime-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
org.apache.flink.runtime.rest.RestClient.lambda$submitRequest$3(RestClient.java:514)
 ~[flink-runtime-1.16-SNAPSHOT.jar:1.16-SNAPSHOT]
    at 
java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:966) 
~[?:1.8.0_292]
    at 
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940)
 ~[?:1.8.0_292]
    at 
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:456)
 ~[?:1.8.0_292]
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
~[?:1.8.0_292]
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
~[?:1.8.0_292]
    at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_292]
04:10:04,437 [          Thread-157] INFO  
org.apache.flink.configuration.Configuration                 [] - Config uses 
fallback configuration key 'jobmanager.rpc.address' instead of key 
'rest.address'
04:10:04,449 [          Thread-157] INFO  
org.apache.flink.configuration.Configuration                 [] - Config uses 
fallback configuration key 'jobmanager.rpc.address' instead of key 
'rest.address'
04:10:04,467 [                main] INFO  
org.apache.flink.table.resource.ResourceManager              [] - Added jar 
resource [file:/tmp/junit3065787421766710063/test-jar/test-classloader-udf.jar] 
to class path.
04:10:04,467 [                main] INFO  
org.apache.flink.table.resource.ResourceManager              [] - Register 
resource [/tmp/junit3065787421766710063/test-jar/test-classloader-udf.jar] 
successfully.
04:10:04,498 [                main] INFO  
org.apache.hadoop.hive.metastore.HiveMetaStore               [] - 0: Opening 
raw store with implementation class:org.apache.hadoop.hive.metastore.ObjectStore
04:10:04,499 [                main] INFO  
org.apache.hadoop.hive.metastore.ObjectStore                 [] - ObjectStore, 
initialize called
04:10:04,504 [                main] INFO  
org.apache.hadoop.hive.metastore.MetaStoreDirectSql          [] - Using direct 
SQL, underlying DB is DERBY
04:10:04,504 [                main] INFO  
org.apache.hadoop.hive.metastore.ObjectStore                 [] - Initialized 
ObjectStore
04:10:04,600 [                main] INFO  
org.apache.flink.table.planner.delegation.hive.HiveParserCalcitePlanner [] - 
Starting generating logical plan
04:10:04,601 [                main] INFO  
org.apache.hadoop.hive.metastore.HiveMetaStore               [] - 0: 
get_function: default.hive_add_one
04:10:04,601 [                main] INFO  
org.apache.hadoop.hive.metastore.HiveMetaStore.audit         [] - 
ugi=vsts_azpcontainer    ip=unknown-ip-addr    cmd=get_function: 
default.hive_add_one    
04:10:04,613 [                main] INFO  
org.apache.flink.connectors.hive.HiveTableFactory            [] - Successfully 
loaded Hive udf 'hive_add_one' with class 'HiveAddOneFunc'
04:10:04,613 [                main] INFO  
org.apache.flink.connectors.hive.HiveTableFactory            [] - Transforming 
Hive function 'hive_add_one' into a HiveSimpleUDF
04:10:04,615 [                main] INFO  
org.apache.flink.table.functions.hive.HiveSimpleUDF          [] - Creating 
HiveSimpleUDF from 'HiveAddOneFunc'
04:10:04,616 [                main] INFO  
org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer 
[] - Completed phase 1 of Semantic Analysis
04:10:04,616 [                main] INFO  
org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer 
[] - Get metadata for source tables
04:10:04,616 [                main] INFO  
org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer 
[] - Get metadata for subqueries
04:10:04,616 [                main] INFO  
org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer 
[] - Get metadata for destination tables
04:10:04,616 [                main] INFO  
org.apache.flink.table.planner.delegation.hive.copy.HiveParserSemanticAnalyzer 
[] - Completed getting MetaData in Semantic Analysis
04:10:04,617 [                main] INFO  
org.apache.hadoop.hive.metastore.HiveMetaStore               [] - 0: 
get_function: default.hive_add_one
04:10:04,617 [                main] INFO  
org.apache.hadoop.hive.metastore.HiveMetaStore.audit         [] - 
ugi=vsts_azpcontainer    ip=unknown-ip-addr    cmd=get_function: 
default.hive_add_one {code}

> CliClientITCase.testSqlStatements failed with output not matched with expected
> ------------------------------------------------------------------------------
>
>                 Key: FLINK-30508
>                 URL: https://issues.apache.org/jira/browse/FLINK-30508
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / Client
>    Affects Versions: 1.17.0
>            Reporter: Qingsheng Ren
>            Priority: Major
>
> https://dev.azure.com/apache-flink/apache-flink/_build/results?buildId=44246&view=logs&j=a9db68b9-a7e0-54b6-0f98-010e0aff39e2&t=cdd32e0b-6047-565b-c58f-14054472f1be&l=14992



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to