Presto SocketTimeoutException

时间:2018-05-31 23:32:36

标签: java jdbc amazon-emr presto

我正在尝试从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

1 个答案:

答案 0 :(得分:0)

Presto Server未正确启动。 mysql目录中有一个拼写错误导致了这个问题。修正错字后解决了这个问题