【问题标题】:Presto SocketTimeoutExceptionPresto SocketTimeoutException
【发布时间】:2018-11-11 01:13:53
【问题描述】:

我正在尝试从 presto-cli 执行 presto 查询,但出现以下错误

[hadoop@ip-172-16-125-74 ~]$ presto-cli --debug
presto> show schemas from hive.default;
Error running command: java.net.SocketTimeoutException: timeout
java.io.UncheckedIOException: java.net.SocketTimeoutException: timeout
at com.facebook.presto.client.JsonResponse.execute(JsonResponse.java:148)
at com.facebook.presto.client.StatementClient.(StatementClient.java:118)
at com.facebook.presto.cli.QueryRunner.startInternalQuery(QueryRunner.java:102)
at com.facebook.presto.cli.QueryRunner.startQuery(QueryRunner.java:97)
at com.facebook.presto.cli.Console.process(Console.java:336)
at com.facebook.presto.cli.Console.runConsole(Console.java:262)
at com.facebook.presto.cli.Console.run(Console.java:148)
at com.facebook.presto.cli.Presto.main(Presto.java:32)
Caused by: java.net.SocketTimeoutException: timeout
at okio.Okio$4.newTimeoutException(Okio.java:230)
at okio.AsyncTimeout.exit(AsyncTimeout.java:285)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:241)
at okio.RealBufferedSource.indexOf(RealBufferedSource.java:345)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:217)
at okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:211)
at okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
at okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at okhttp3.RealCall.execute(RealCall.java:69)
at com.facebook.presto.client.JsonResponse.execute(JsonResponse.java:130)
... 7 more
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.read(SocketInputStream.java:204)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at okio.Okio$2.read(Okio.java:139)
at okio.AsyncTimeout$2.read(AsyncTimeout.java:237)
... 27 more

【问题讨论】:

  • 使用 --server 参数将 URL 设置为 Presto 协调器。默认情况下,CLI 将连接到 localhost:8080,我猜您在该端口上运行的某些东西会挂断连接。
  • 在 EMR 中,配置设置为端口 8889。无论如何,我明确尝试使用服务器,但仍然抛出相同的错误。

标签: java jdbc amazon-emr presto trino


【解决方案1】:

Presto 服务器未正确启动。 mysql 目录中有一个错字导致此问题。修正错字后解决

【讨论】:

    猜你喜欢
    • 2013-01-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-14
    • 1970-01-01
    相关资源
    最近更新 更多