clown-wang edited a comment on issue #13013:
URL:
https://github.com/apache/shardingsphere/issues/13013#issuecomment-942857122
> Hi @clown-wang , which version of sharding-proxy do you use, `5.0.0-beta`
or master branch?
>
> And could you provide your Netty SslContext initialization code?
Has solved last nigtht.PacketCodec and SslContext are in the wrong order to
encode data.
I tried instance a new SslChannelInitializer in childHandler method.Like
this:
```
private void initServerBootstrap(final ServerBootstrap bootstrap) throws
SSLException {
SslContext sslContext= initSslContent();
bootstrap.group(bossGroup, workerGroup)
.channel(Epoll.isAvailable() ?
EpollServerSocketChannel.class : NioServerSocketChannel.class)
.option(ChannelOption.SO_BACKLOG, 128)
.option(ChannelOption.WRITE_BUFFER_WATER_MARK, new
WriteBufferWaterMark(8 * 1024 * 1024, 16 * 1024 * 1024))
.option(ChannelOption.ALLOCATOR,
PooledByteBufAllocator.DEFAULT)
.childOption(ChannelOption.ALLOCATOR,
PooledByteBufAllocator.DEFAULT)
.childOption(ChannelOption.TCP_NODELAY, true)
.handler(new LoggingHandler(LogLevel.DEBUG))
.childHandler(new SslChannelInitializer(sslContext))
.childHandler(new
ServerHandlerInitializer(FrontDatabaseProtocolTypeFactory.getDatabaseType(),
null));
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]