![](/img/trans.png)
[英]Drill to Hive connectivity error(org.apache.thrift.transport.TTransportException java.net.SocketException: Broken pipe (Write failed))
[英]hiveserver2 org.apache.thrift.transport.TTransportException error when running 2nd query after minute of inactivity
我通過端口10000從我的SQL工具(即Squirrel SQL,Oracle SQL Developer)到HiveServer2(在遠程服務器上運行)建立了JDBC連接。
我能夠成功運行一些查詢。 然后,我在1-2分鍾內做其他事情(不在SQL工具中),然后返回我的SQL工具並嘗試運行查詢,但出現此錯誤: org.apache.thrift.transport.TTransportException: java.net.SocketException: Software caused connection abort: socket write error
如果現在斷開連接並在SQL工具中重新連接,則可以再次運行查詢。 但是,有人知道我應該更改哪些HiveServer2設置以防止該錯誤嗎? 我假設在hive-site.xml中有一些東西
從下面的hiveserver2日志中,可以看到從第30分鍾到第31分鍾之間發生中斷的確切1分鍾間隔。
2018-04-05T03:30:41,706 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Resetting thread name to HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:30:41,712 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Updating thread name to c81ec0f9-7a9d-46b6-9708-e7d78520a48a HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:30:41,712 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Resetting thread name to HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:30:41,718 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Updating thread name to c81ec0f9-7a9d-46b6-9708-e7d78520a48a HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:30:41,719 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Resetting thread name to HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:31:41,232 INFO [HiveServer2-Handler-Pool: Thread-36] thrift.ThriftCLIService: Session disconnected without closing properly.
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] thrift.ThriftCLIService: Closing the session: SessionHandle [c81ec0f9-7a9d-46b6-9708-e7d78520a48a]
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] service.CompositeService: Session closed, SessionHandle [c81ec0f9-7a9d-46b6-9708-e7d78520a48a], current sessions:0
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Updating thread name to c81ec0f9-7a9d-46b6-9708-e7d78520a48a HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Resetting thread name to HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Updating thread name to c81ec0f9-7a9d-46b6-9708-e7d78520a48a HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] session.HiveSessionImpl: Operation log session directory is deleted: /var/hive/hs2log/tmp/c81ec0f9-7a9d-46b6-9708-e7d78520a48a
2018-04-05T03:31:41,233 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Resetting thread name to HiveServer2-Handler-Pool: Thread-36
2018-04-05T03:31:41,236 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Deleted directory: /var/hive/scratch/tmp/anonymous/c81ec0f9-7a9d-46b6-9708-e7d78520a48a on fs with scheme file
2018-04-05T03:31:41,236 INFO [HiveServer2-Handler-Pool: Thread-36] session.SessionState: Deleted directory: /var/hive/ec2-user/c81ec0f9-7a9d-46b6-9708-e7d78520a48a on fs with scheme file
2018-04-05T03:31:41,236 INFO [HiveServer2-Handler-Pool: Thread-36] hive.metastore: Closed a connection to metastore, current connections: 1
環境:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.