jyotisharma7 opened a new issue, #23885: URL: https://github.com/apache/shardingsphere/issues/23885
## Bug Report **For English only**, other languages will not accept. Before report a bug, make sure you have: - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues). - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview). Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will **close it**. Please answer these questions before submitting your issue. Thanks! ### Which version of ShardingSphere did you use? ShardingSphere Proxy - 5.1.2 ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy? ShardingSphere-Proxy ### Expected behavior By using sqlalchemy asyncpg we should be able to connect to ShardingSphere with the connection string once ShardingSphere proxy is started. ### Actual behavior Not able to connect to ShardingSphere because IllegalCharsetNameException is coming. ### Reason analyze (If you can) ``` [ERROR] 2023-02-01 03:26:02.303 [epollEventLoopGroup-3-2] o.a.s.p.f.n.FrontendChannelInboundHandler - Exception occur: java.nio.charset.IllegalCharsetNameException: 'utf-8' at java.base/java.nio.charset.Charset.checkName(Charset.java:308) at java.base/java.nio.charset.Charset.lookup2(Charset.java:482) at java.base/java.nio.charset.Charset.lookup(Charset.java:462) at java.base/java.nio.charset.Charset.forName(Charset.java:526) at org.apache.shardingsphere.proxy.backend.text.admin.postgresql.PostgreSQLCharacterSets.findCharacterSet(PostgreSQLCharacterSets.java:111) at org.apache.shardingsphere.proxy.frontend.postgresql.authentication.PostgreSQLAuthenticationEngine.processStartupMessage(PostgreSQLAuthenticationEngine.java:90) at org.apache.shardingsphere.proxy.frontend.postgresql.authentication.PostgreSQLAuthenticationEngine.authenticate(PostgreSQLAuthenticationEngine.java:83) at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.authenticate(FrontendChannelInboundHandler.java:83) at org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.channelRead(FrontendChannelInboundHandler.java:75) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:327) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:299) at io.netty.handler.codec.ByteToMessageCodec.channelRead(ByteToMessageCodec.java:103) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:795) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:480) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:378) at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:986) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:829) ``` ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc. `sh start.sh` ### Example codes for reproduce this issue (such as a github link). ```import asyncio import sys from sqlalchemy.ext.asyncio import create_async_engine from sqlalchemy.future import select from sqlalchemy.sql import text` async def async_main(): engine = create_async_engine( "postgresql+asyncpg://root:[email protected]:3307/hint_db", echo=True, ) print(sys.getdefaultencoding()) async with engine.connect() as conn: result = await conn.execute(select(text('tracking_id'))) print(result) asyncio.run(async_main())``` -- 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]
