Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-31223

sql-client.sh fails to start with ssl enabled

    XMLWordPrintableJSON

Details

    Description

      Version: 1.17-SNAPSHOT Commit: c66ef25 

      1. ssl disabled 

      sql-client.sh works properly

      2. ssl enabled

      web ui can access with https://url

      The task can be submitted correctly through sql-gateway. I can confirm that sql-gateway exposes the http protocol, not https.

      But sql-client.sh fails to start with the following exceptions. It seems that sql-client.sh expect https protocol

       

      2023-02-25 14:43:19,317 INFO  org.apache.flink.configuration.Configuration                 [] - Config uses fallback configuration key 'rest.port' instead of key 'rest.bind-port'
      2023-02-25 14:43:19,343 INFO  org.apache.flink.table.gateway.rest.SqlGatewayRestEndpoint   [] - Starting rest endpoint.
      2023-02-25 14:43:19,713 INFO  org.apache.flink.table.gateway.rest.SqlGatewayRestEndpoint   [] - Rest endpoint listening at localhost:44922
      2023-02-25 14:43:19,715 INFO  org.apache.flink.table.client.SqlClient                      [] - Start embedded gateway on port 44922
      2023-02-25 14:43:20,040 INFO  org.apache.flink.table.gateway.rest.SqlGatewayRestEndpoint   [] - Shutting down rest endpoint.
      2023-02-25 14:43:20,088 INFO  org.apache.flink.table.gateway.rest.SqlGatewayRestEndpoint   [] - Shut down complete.
      2023-02-25 14:43:20,089 ERROR org.apache.flink.table.client.SqlClient                      [] - SQL Client must stop.
      org.apache.flink.table.client.SqlClientException: Failed to create the executor.
              at org.apache.flink.table.client.gateway.ExecutorImpl.<init>(ExecutorImpl.java:170) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.gateway.ExecutorImpl.<init>(ExecutorImpl.java:113) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.gateway.Executor.create(Executor.java:34) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.SqlClient.start(SqlClient.java:110) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.SqlClient.startClient(SqlClient.java:228) [flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.SqlClient.main(SqlClient.java:179) [flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
      Caused by: org.apache.flink.table.client.gateway.SqlExecutionException: Failed to get response.
              at org.apache.flink.table.client.gateway.ExecutorImpl.getResponse(ExecutorImpl.java:427) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.gateway.ExecutorImpl.getResponse(ExecutorImpl.java:416) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.gateway.ExecutorImpl.negotiateVersion(ExecutorImpl.java:447) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.table.client.gateway.ExecutorImpl.<init>(ExecutorImpl.java:132) ~[flink-sql-client-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              ... 5 more
      Caused by: org.apache.flink.shaded.netty4.io.netty.handler.codec.DecoderException: org.apache.flink.shaded.netty4.io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 485454502f312e3120343034204e6f7420466f756e640d0a636f6e74656e742d747970653a206170706c69636174696f6e2f6a736f6e3b20636861727365743d5554462d380d0a6163636573732d636f6e74726f6c2d616c6c6f772d6f726967696e3a202a0d0a636f6e74656e742d6c656e6774683a2033380d0a0d0a7b226572726f7273223a5b224e6f7420666f756e643a202f6261642d72657175657374225d7d
              at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:489) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:280) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_362]
      Caused by: org.apache.flink.shaded.netty4.io.netty.handler.ssl.NotSslRecordException: not an SSL/TLS record: 485454502f312e3120343034204e6f7420466f756e640d0a636f6e74656e742d747970653a206170706c69636174696f6e2f6a736f6e3b20636861727365743d5554462d380d0a6163636573732d636f6e74726f6c2d616c6c6f772d6f726967696e3a202a0d0a636f6e74656e742d6c656e6774683a2033380d0a0d0a7b226572726f7273223a5b224e6f7420666f756e643a202f6261642d72657175657374225d7d
              at org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1215) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1285) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:519) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:458) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:280) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[flink-dist-1.17-SNAPSHOT.jar:1.17-SNAPSHOT]
              at java.lang.Thread.run(Thread.java:750) ~[?:1.8.0_362]
      

       

      Attachments

        Activity

          People

            Weijie Guo Weijie Guo
            macdoor615 macdoor615
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: