Vaibhav Gumashta created HIVE-6660:
--------------------------------------
Summary: HiveServer2 running in non-http mode closes server socket
for an SSL connection after the 1st request
Key: HIVE-6660
URL: https://issues.apache.org/jira/browse/HIVE-6660
Project: Hive
Issue Type: Bug
Reporter: Vaibhav Gumashta
*Beeline connection string:*
{code}
!connect
jdbc:hive2://<host>:10000/;ssl=true;sslTrustStore=/usr/share/doc/hive-0.13.0.2.1.1.0/examples/files/truststore.jks;trustStorePassword=HiveJdbc
vgumashta vgumashta org.apache.hive.jdbc.HiveDriver
{code}
*Error:*
{code}
pool-7-thread-1, handling exception: java.net.SocketTimeoutException: Read
timed out
pool-7-thread-1, called close()
pool-7-thread-1, called closeInternal(true)
pool-7-thread-1, SEND TLSv1 ALERT: warning, description = close_notify
Padded plaintext before ENCRYPTION: len = 32
0000: 01 00 BE 72 AC 10 3B FA 4E 01 A5 DE 9B 14 16 AF ...r..;.N.......
0010: 4E DD 7A 29 AD B4 09 09 09 09 09 09 09 09 09 09 N.z)............
pool-7-thread-1, WRITE: TLSv1 Alert, length = 32
[Raw write]: length = 37
0000: 15 03 01 00 20 6C 37 82 A8 52 40 DA FB 83 2D CD .... [email protected].
0010: 96 9F F0 B7 22 17 E1 04 C1 D1 93 1B C4 39 5A B0 ...."........9Z.
0020: A2 3F 5D 7D 2D .?].-
pool-7-thread-1, called closeSocket(selfInitiated)
pool-7-thread-1, called close()
pool-7-thread-1, called closeInternal(true)
pool-7-thread-1, called close()
pool-7-thread-1, called closeInternal(true)
{code}
*Subsequent queries fail:*
{code}
main, WRITE: TLSv1 Application Data, length = 144
main, handling exception: java.net.SocketException: Broken pipe
%% Invalidated: [Session-1, TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA]
main, SEND TLSv1 ALERT: fatal, description = unexpected_message
Padded plaintext before ENCRYPTION: len = 32
0000: 02 0A 52 C3 18 B1 C1 38 DB 3F B6 D1 C5 CA 14 9C ..R....8.?......
0010: A5 38 4C 01 31 69 09 09 09 09 09 09 09 09 09 09 .8L.1i..........
main, WRITE: TLSv1 Alert, length = 32
main, Exception sending alert: java.net.SocketException: Broken pipe
main, called closeSocket()
Error: org.apache.thrift.transport.TTransportException:
java.net.SocketException: Broken pipe (state=08S01,code=0)
java.sql.SQLException: org.apache.thrift.transport.TTransportException:
java.net.SocketException: Broken pipe
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:226)
at org.apache.hive.beeline.Commands.execute(Commands.java:736)
at org.apache.hive.beeline.Commands.sql(Commands.java:657)
at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:796)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:659)
at
org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine.java:368)
at org.apache.hive.beeline.BeeLine.main(BeeLine.java:351)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.apache.hadoop.util.RunJar.main(RunJar.java:212)
Caused by: org.apache.thrift.transport.TTransportException:
java.net.SocketException: Broken pipe
at
org.apache.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:161)
at
org.apache.thrift.transport.TSaslTransport.flush(TSaslTransport.java:471)
at
org.apache.thrift.transport.TSaslClientTransport.flush(TSaslClientTransport.java:37)
at org.apache.thrift.TServiceClient.sendBase(TServiceClient.java:65)
at
org.apache.hive.service.cli.thrift.TCLIService$Client.send_ExecuteStatement(TCLIService.java:219)
at
org.apache.hive.service.cli.thrift.TCLIService$Client.ExecuteStatement(TCLIService.java:211)
at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:220)
... 11 more
Caused by: java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:109)
at java.net.SocketOutputStream.write(SocketOutputStream.java:153)
at sun.security.ssl.OutputRecord.writeBuffer(OutputRecord.java:377)
at sun.security.ssl.OutputRecord.write(OutputRecord.java:363)
at
sun.security.ssl.SSLSocketImpl.writeRecordInternal(SSLSocketImpl.java:830)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:801)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:122)
at
java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
at
org.apache.thrift.transport.TIOStreamTransport.flush(TIOStreamTransport.java:159)
... 17 more
{code}
Works fine however in http mode using ssl.
--
This message was sent by Atlassian JIRA
(v6.2#6252)