penghuazhou opened a new issue #13576:
URL: https://github.com/apache/shardingsphere/issues/13576
It be error when connect to shardingshpere-proxy in shardingsphere-proxy
5.0.0, when it be ok in
apache-shardingsphere-5.0.0-beta-shardingsphere-proxy-bin.I usr go grom
framework to connect.
`package test
import (
"fmt"
"gorm.io/driver/postgres"
"gorm.io/gorm"
"testing"
)
func TestShardingSpheress(t *testing.T) {
dsn := "host=127.0.0.1 user=sharding password=sharding
dbname=sharding_db port=3307 sslmode=disable TimeZone=Asia/Shanghai"
db, err := gorm.Open(postgres.Open(dsn), &gorm.Config{})
if err != nil {
fmt.Println(err)
return
}
var info string
err2 := db.Debug().Raw("select info from t_order where order_id = 3 and
user_id = 3 and c1=1").Scan(&info).Error
//err2 := db.Debug().Raw("select info from t_order where order_id = ?
and user_id = ?", 1206921609, 81031208).Scan(&info).Error
if err2 != nil {
fmt.Println(err2)
return
}
fmt.Println("info ss=",info)
db.Debug().Exec("update t_order set info = 'info~~' where user_id = 3
and order_id = 3")
db.Debug().Exec("insert into t_order(user_id,order_id,info)
values(3,3,'3')")
}`
[INFO ] 2021-11-12 15:56:12.385 [main] o.a.s.p.i.BootstrapInitializer -
Database name is `PostgreSQL`, version is `9.2.24`
[INFO ] 2021-11-12 15:56:12.665 [main] o.a.s.p.frontend.ShardingSphereProxy
- ShardingSphere-Proxy start success
[DEBUG] 2021-11-12 17:51:55.972 [epollEventLoopGroup-3-2]
o.a.s.db.protocol.codec.PacketCodec - Read from client 40d37698 :
+-------------------------------------------------+
| 0 1 2 3 4 5 6 7 8 9 a b c d e f |
+--------+-------------------------------------------------+----------------+
|00000000| 00 00 00 5a 00 03 00 00 74 69 6d 65 7a 6f 6e 65 |...Z....timezone|
|00000010| 00 41 73 69 61 2f 53 68 61 6e 67 68 61 69 00 54 |.Asia/Shanghai.T|
|00000020| 69 6d 65 5a 6f 6e 65 00 41 73 69 61 2f 53 68 61 |imeZone.Asia/Sha|
|00000030| 6e 67 68 61 69 00 75 73 65 72 00 73 68 61 72 64 |nghai.user.shard|
|00000040| 69 6e 67 00 64 61 74 61 62 61 73 65 00 73 68 61 |ing.database.sha|
|00000050| 72 64 69 6e 67 5f 64 62 00 00 |rding_db.. |
+--------+-------------------------------------------------+----------------+
[ERROR] 2021-11-12 17:51:55.982 [epollEventLoopGroup-3-2]
o.a.s.p.f.n.FrontendChannelInboundHandler - Exception occur:
java.lang.IllegalArgumentException: Null charset name
at java.nio.charset.Charset.lookup(Charset.java:457)
at java.nio.charset.Charset.forName(Charset.java:528)
at
org.apache.shardingsphere.proxy.frontend.postgresql.authentication.PostgreSQLAuthenticationEngine.processStartupMessage(PostgreS
QLAuthenticationEngine.java:85)
at
org.apache.shardingsphere.proxy.frontend.postgresql.authentication.PostgreSQLAuthenticationEngine.authenticate(PostgreSQLAuthent
icationEngine.java:78)
at
org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.authenticate(FrontendChannelInboundHandler.java:80)
at
org.apache.shardingsphere.proxy.frontend.netty.FrontendChannelInboundHandler.channelRead(FrontendChannelInboundHandler.java:72)
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:324)
at
io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:296)
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.lang.Thread.run(Thread.java:748)
[DEBUG] 2021-11-12 17:51:55.992 [epollEventLoopGroup-3-2]
o.a.s.db.protocol.codec.PacketCodec - Write to client 40d37698 :
--
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]