Liam3433 opened a new issue, #6435:
URL: https://github.com/apache/kyuubi/issues/6435

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the 
[issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no 
similar issues.
   
   
   ### Describe the bug
   
   flink 1.18.1
   
   FlinkSQL engine cannot automatically exit when there is no connection
   
   ### Affects Version(s)
   
   1.8.2
   
   ### Kyuubi Server Log Output
   
   _No response_
   
   ### Kyuubi Engine Log Output
   
   ```logtalk
   FLINK jobmanager log 
   
   2024-05-31 10:59:22,164 INFO  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Checking 
sessions timeout, current count: 3
   2024-05-31 10:59:22,164 INFO  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Closing 
session 94607aab-a707-4b16-8e28-3775250ecbac that has been idle for more than 
21600000 ms
   2024-05-31 10:59:22,164 WARN  
org.apache.flink.table.gateway.service.session.SessionManagerImpl [] - Session 
'c4d97d07-ba59-4e88-ae07-43b3a7d187c4' does not exist.
   2024-05-31 10:59:22,164 WARN  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Error 
closing session SessionHandle [94607aab-a707-4b16-8e28-3775250ecbac]
   java.lang.RuntimeException: Method 
closeSession(org.apache.flink.table.gateway.api.session.SessionHandle) not 
found in class 
org.apache.flink.table.gateway.service.session.SessionManagerImpl 
[checkSessionCount(), 
closeSession(org.apache.flink.table.gateway.api.session.SessionHandle), 
closeSession(org.apache.flink.table.gateway.service.session.Session), 
currentSessionCount(), equals(java.lang.Object), getClass(), 
getOperationCount(org.apache.flink.table.gateway.api.session.SessionHandle), 
getSession(org.apache.flink.table.gateway.api.session.SessionHandle), 
hashCode(), 
isSessionAlive(org.apache.flink.table.gateway.api.session.SessionHandle), 
isSessionExpired(org.apache.flink.table.gateway.service.session.Session), 
lambda$start$0(), notify(), notifyAll(), 
openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment), 
start(), stop(), toString(), wait(), wait(long), wait(long, int)]
        at 
org.apache.kyuubi.util.reflect.ReflectUtils$.invokeAs(ReflectUtils.scala:103) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.shim.FlinkSessionManager.closeSession(FlinkSessionManager.scala:57)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.$anonfun$closeSession$1(FlinkSQLSessionManager.scala:86)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.$anonfun$closeSession$1$adapted(FlinkSQLSessionManager.scala:85)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at scala.Option.foreach(Option.scala:257) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.closeSession(FlinkSQLSessionManager.scala:85)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.$anonfun$run$2(SessionManager.scala:316)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.$anonfun$run$2$adapted(SessionManager.scala:310)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at scala.collection.Iterator.foreach(Iterator.scala:937) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.Iterator.foreach$(Iterator.scala:937) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1425) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.IterableLike.foreach(IterableLike.scala:70) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:69) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:54) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.run(SessionManager.scala:310) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.ThreadUtils$.$anonfun$scheduleTolerableRunnableWithFixedDelay$1(ThreadUtils.scala:126)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_202]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[?:1.8.0_202]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [?:1.8.0_202]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_202]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   Caused by: java.lang.RuntimeException
        at 
org.apache.kyuubi.util.reflect.DynMethods$UnboundMethod.invoke(DynMethods.java:80)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.reflect.DynMethods$BoundMethod.invoke(DynMethods.java:175)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.reflect.ReflectUtils$.invokeAs(ReflectUtils.scala:91) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        ... 22 more
   2024-05-31 10:59:22,165 INFO  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Closing 
session 549f227b-0213-4ae5-89fc-9cb98896b95c that has been idle for more than 
21600000 ms
   2024-05-31 10:59:22,165 WARN  
org.apache.flink.table.gateway.service.session.SessionManagerImpl [] - Session 
'c74f0fdb-a341-45b4-9a64-63de55c387ca' does not exist.
   2024-05-31 10:59:22,165 WARN  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Error 
closing session SessionHandle [549f227b-0213-4ae5-89fc-9cb98896b95c]
   java.lang.RuntimeException: Method 
closeSession(org.apache.flink.table.gateway.api.session.SessionHandle) not 
found in class 
org.apache.flink.table.gateway.service.session.SessionManagerImpl 
[checkSessionCount(), 
closeSession(org.apache.flink.table.gateway.api.session.SessionHandle), 
closeSession(org.apache.flink.table.gateway.service.session.Session), 
currentSessionCount(), equals(java.lang.Object), getClass(), 
getOperationCount(org.apache.flink.table.gateway.api.session.SessionHandle), 
getSession(org.apache.flink.table.gateway.api.session.SessionHandle), 
hashCode(), 
isSessionAlive(org.apache.flink.table.gateway.api.session.SessionHandle), 
isSessionExpired(org.apache.flink.table.gateway.service.session.Session), 
lambda$start$0(), notify(), notifyAll(), 
openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment), 
start(), stop(), toString(), wait(), wait(long), wait(long, int)]
        at 
org.apache.kyuubi.util.reflect.ReflectUtils$.invokeAs(ReflectUtils.scala:103) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.shim.FlinkSessionManager.closeSession(FlinkSessionManager.scala:57)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.$anonfun$closeSession$1(FlinkSQLSessionManager.scala:86)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.$anonfun$closeSession$1$adapted(FlinkSQLSessionManager.scala:85)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at scala.Option.foreach(Option.scala:257) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.closeSession(FlinkSQLSessionManager.scala:85)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.$anonfun$run$2(SessionManager.scala:316)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.$anonfun$run$2$adapted(SessionManager.scala:310)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at scala.collection.Iterator.foreach(Iterator.scala:937) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.Iterator.foreach$(Iterator.scala:937) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1425) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.IterableLike.foreach(IterableLike.scala:70) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:69) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:54) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.run(SessionManager.scala:310) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.ThreadUtils$.$anonfun$scheduleTolerableRunnableWithFixedDelay$1(ThreadUtils.scala:126)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_202]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[?:1.8.0_202]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [?:1.8.0_202]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_202]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   Caused by: java.lang.RuntimeException
        at 
org.apache.kyuubi.util.reflect.DynMethods$UnboundMethod.invoke(DynMethods.java:80)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.reflect.DynMethods$BoundMethod.invoke(DynMethods.java:175)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.reflect.ReflectUtils$.invokeAs(ReflectUtils.scala:91) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        ... 22 more
   2024-05-31 10:59:22,165 INFO  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Closing 
session 232c9e84-a829-4f14-84d1-ceb1db24caee that has been idle for more than 
21600000 ms
   2024-05-31 10:59:22,165 WARN  
org.apache.flink.table.gateway.service.session.SessionManagerImpl [] - Session 
'ac8c267d-5549-4a89-8615-82d317db1ffa' does not exist.
   2024-05-31 10:59:22,165 WARN  
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager [] - Error 
closing session SessionHandle [232c9e84-a829-4f14-84d1-ceb1db24caee]
   java.lang.RuntimeException: Method 
closeSession(org.apache.flink.table.gateway.api.session.SessionHandle) not 
found in class 
org.apache.flink.table.gateway.service.session.SessionManagerImpl 
[checkSessionCount(), 
closeSession(org.apache.flink.table.gateway.api.session.SessionHandle), 
closeSession(org.apache.flink.table.gateway.service.session.Session), 
currentSessionCount(), equals(java.lang.Object), getClass(), 
getOperationCount(org.apache.flink.table.gateway.api.session.SessionHandle), 
getSession(org.apache.flink.table.gateway.api.session.SessionHandle), 
hashCode(), 
isSessionAlive(org.apache.flink.table.gateway.api.session.SessionHandle), 
isSessionExpired(org.apache.flink.table.gateway.service.session.Session), 
lambda$start$0(), notify(), notifyAll(), 
openSession(org.apache.flink.table.gateway.api.session.SessionEnvironment), 
start(), stop(), toString(), wait(), wait(long), wait(long, int)]
        at 
org.apache.kyuubi.util.reflect.ReflectUtils$.invokeAs(ReflectUtils.scala:103) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.shim.FlinkSessionManager.closeSession(FlinkSessionManager.scala:57)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.$anonfun$closeSession$1(FlinkSQLSessionManager.scala:86)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.$anonfun$closeSession$1$adapted(FlinkSQLSessionManager.scala:85)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at scala.Option.foreach(Option.scala:257) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at 
org.apache.kyuubi.engine.flink.session.FlinkSQLSessionManager.closeSession(FlinkSQLSessionManager.scala:85)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.$anonfun$run$2(SessionManager.scala:316)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.$anonfun$run$2$adapted(SessionManager.scala:310)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at scala.collection.Iterator.foreach(Iterator.scala:937) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.Iterator.foreach$(Iterator.scala:937) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.AbstractIterator.foreach(Iterator.scala:1425) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.IterableLike.foreach(IterableLike.scala:70) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.IterableLike.foreach$(IterableLike.scala:69) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at scala.collection.AbstractIterable.foreach(Iterable.scala:54) 
~[flink-scala_2.12-1.18.1.jar:1.18.1]
        at 
org.apache.kyuubi.session.SessionManager$$anon$1.run(SessionManager.scala:310) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.ThreadUtils$.$anonfun$scheduleTolerableRunnableWithFixedDelay$1(ThreadUtils.scala:126)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
[?:1.8.0_202]
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) 
[?:1.8.0_202]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
 [?:1.8.0_202]
        at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
 [?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) 
[?:1.8.0_202]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) 
[?:1.8.0_202]
        at java.lang.Thread.run(Thread.java:748) [?:1.8.0_202]
   Caused by: java.lang.RuntimeException
        at 
org.apache.kyuubi.util.reflect.DynMethods$UnboundMethod.invoke(DynMethods.java:80)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.reflect.DynMethods$BoundMethod.invoke(DynMethods.java:175)
 ~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        at 
org.apache.kyuubi.util.reflect.ReflectUtils$.invokeAs(ReflectUtils.scala:91) 
~[kyuubi-flink-sql-engine_2.12-1.8.2.jar:1.8.2]
        ... 22 more
   
   ```
   ```
   
   
   ### Kyuubi Server Configurations
   
   ```yaml
   
![image](https://github.com/apache/kyuubi/assets/141293515/f5b39b31-92a9-45ab-8bbb-1836b8dd2a1a)
   ```
   
   
   ### Kyuubi Engine Configurations
   
   _No response_
   
   ### Additional context
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes. I would be willing to submit a PR with guidance from the Kyuubi 
community to fix.
   - [X] No. I cannot submit a PR at this time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to