Hive
  1. Hive
  2. HIVE-6660

HiveServer2 running in non-http mode closes server socket for an SSL connection after the 1st request

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.13.0
    • Fix Version/s: 0.13.0
    • Component/s: HiveServer2, JDBC
    • Labels:
      None

      Description

      Beeline connection string:

      !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 
      

      Error:

      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  .... l7..R@...-.
      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)
      

      Subsequent queries fail:

      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
      

      Works fine however in http mode using ssl.

      1. hive-site.xml
        4 kB
        Vaibhav Gumashta
      2. HIVE-6660.1.patch
        0.7 kB
        Prasad Mujumdar
      3. HIVE-6660.1.patch
        0.7 kB
        Prasad Mujumdar

        Issue Links

          Activity

          Vaibhav Gumashta created issue -
          Vaibhav Gumashta made changes -
          Field Original Value New Value
          Fix Version/s 0.13.0 [ 12324986 ]
          Vaibhav Gumashta made changes -
          Affects Version/s 0.13.0 [ 12324986 ]
          Vaibhav Gumashta made changes -
          Component/s HiveServer2 [ 12320408 ]
          Component/s JDBC [ 12314178 ]
          Vaibhav Gumashta made changes -
          Attachment hive-site.xml [ 12634827 ]
          Vaibhav Gumashta made changes -
          Assignee Vaibhav Gumashta [ vgumashta ]
          Vaibhav Gumashta made changes -
          Assignee Vaibhav Gumashta [ vgumashta ]
          Vaibhav Gumashta made changes -
          Priority Major [ 3 ] Blocker [ 1 ]
          Prasad Mujumdar made changes -
          Assignee Prasad Mujumdar [ prasadm ]
          Prasad Mujumdar made changes -
          Attachment HIVE-6660.1.patch [ 12634882 ]
          Prasad Mujumdar made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Prasad Mujumdar made changes -
          Link This issue relates to HIVE-6679 [ HIVE-6679 ]
          Prasad Mujumdar made changes -
          Attachment HIVE-6660.1.patch [ 12634989 ]
          Prasad Mujumdar made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]

            People

            • Assignee:
              Prasad Mujumdar
              Reporter:
              Vaibhav Gumashta
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development