[Bug] Trino JDBC connect Kyuubi server timeout
- Dominant language
- Scala
- Stars
- 2.4k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
### 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
java.sql.SQLException: Error executing query
at io.trino.jdbc.TrinoStatement.internalExecute(TrinoStatement.java:287)
at io.trino.jdbc.TrinoStatement.execute(TrinoStatement.java:240)
at io.trino.jdbc.TrinoStatement.executeQuery(TrinoStatement.java:78)
at jdbc.TestTrino.testLocalTrino(TestTrino.java:131)
at jdbc.TestTrino.main(TestTrino.java:249)
Caused by: java.io.UncheckedIOException: java.net.SocketTimeoutException: timeout
at io.trino.jdbc.$internal.client.JsonResponse.execute(JsonResponse.java:148)
at io.trino.jdbc.$internal.client.StatementClientV1.(StatementClientV1.java:109)
at io.trino.jdbc.$internal.client.StatementClientFactory.newStatementClient(StatementClientFactory.java:24)
at io.trino.jdbc.TrinoConnection.startQuery(TrinoConnection.java:750)
at io.trino.jdbc.TrinoStatement.internalExecute(TrinoStatement.java:252)
... 4 more
Caused by: java.net.SocketTimeoutException: timeout
at io.trino.jdbc.$internal.okio.Okio$4.newTimeoutException(Okio.java:232)
at io.trino.jdbc.$internal.okio.AsyncTimeout.exit(AsyncTimeout.java:286)
at io.trino.jdbc.$internal.okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
at io.trino.jdbc.$internal.okio.RealBufferedSource.indexOf(RealBufferedSource.java:358)
at io.trino.jdbc.$internal.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:230)
at io.trino.jdbc.$internal.okhttp3.internal.http1.Http1ExchangeCodec.readHeaderLine(Http1ExchangeCodec.java:242)
at io.trino.jdbc.$internal.okhttp3.internal.http1.Http1ExchangeCodec.readResponseHeaders(Http1ExchangeCodec.java:213)
at io.trino.jdbc.$internal.okhttp3.internal.connection.Exchange.readResponseHeaders(Exchange.java:115)
at io.trino.jdbc.$internal.okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:94)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at io.trino.jdbc.$internal.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:43)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.trino.jdbc.$internal.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:94)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.trino.jdbc.$internal.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at io.trino.jdbc.$internal.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:88)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.trino.jdbc.$internal.client.OkHttpUtil.lambda$userAgent$0(OkHttpUtil.java:65)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:142)
at io.trino.jdbc.$internal.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:117)
at io.trino.jdbc.$internal.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:229)
at io.trino.jdbc.$internal.okhttp3.RealCall.execute(RealCall.java:81)
at io.trino.jdbc.$internal.client.JsonResponse.execute(JsonResponse.java:130)
... 8 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(SocketInputStream.java:116)
at java.net.SocketInputStream.read(SocketInputStream.java:171)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at io.trino.jdbc.$internal.okio.Okio$2.read(Okio.java:140)
at io.trino.jdbc.$internal.okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
... 32 more
### Affects Version(s)
1.7.1
### Kyuubi Server Log Output
_No response_
### Kyuubi Engine Log Output
_No response_
### Kyuubi Server Configurations
_No response_
### 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.
Contributor guide
Research direction
Start from jdbc.TestTrino.testLocalTrino at line 131 and the Trino JDBC stack trace, then inspect the missing Kyuubi server and engine logs and configurations. Reproduce the timeout against Kyuubi 1.7.1, identify whether the query connection or server response is responsible, and verify the resulting fix with a successful query.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100