You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/10/10 06:32:17 UTC
[GitHub] [shardingsphere] wsm12138 opened a new issue, #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
wsm12138 opened a new issue, #20713:
URL: https://github.com/apache/shardingsphere/issues/20713
## Bug Report
### Which version of ShardingSphere did you use?
97bc2168039c09728fc8c651c82ee9bddf641fef
### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-Proxy
### Expected behavior
have error but connection still connect
### Actual behavior
have error but connection interrupt
![000aOhXHaU](https://user-images.githubusercontent.com/86462784/187897847-ffb0455e-5d06-4437-ab09-762eb0435918.jpg)
### Reason analyze (If you can)
```
[INFO ] 2022-09-01 08:36:22.124 [ShardingSphere-Command-94] ShardingSphere-SQL - Actual SQL: ds_0 ::: SELECT c AS c FROM sbtest5 WHERE id=? /*shadow:true*/ ::: [18088786]
[ERROR] 2022-09-01 08:36:22.125 [ShardingSphere-Command-98] o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.lang.IllegalArgumentException: Illegal base64 character 2d
at java.base/java.util.Base64$Decoder.decode0(Base64.java:847)
at java.base/java.util.Base64$Decoder.decode(Base64.java:566)
at java.base/java.util.Base64$Decoder.decode(Base64.java:589)
at org.apache.shardingsphere.encrypt.algorithm.AESEncryptAlgorithm.decrypt(AESEncryptAlgorithm.java:77)
at org.apache.shardingsphere.encrypt.algorithm.AESEncryptAlgorithm.decrypt(AESEncryptAlgorithm.java:41)
at org.apache.shardingsphere.encrypt.merge.dql.EncryptMergedResult.getValue(EncryptMergedResult.java:57)
at org.apache.shardingsphere.proxy.backend.communication.DatabaseCommunicationEngine.getQueryResponseRow(DatabaseCommunicationEngine.java:213)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.binary.execute.MySQLComStmtExecuteExecutor.getQueryRowPacket(MySQLComStmtExecuteExecutor.java:145)
at org.apache.shardingsphere.proxy.frontend.mysql.command.query.binary.execute.MySQLComStmtExecuteExecutor.getQueryRowPacket(MySQLComStmtExecuteExecutor.java:70)
at org.apache.shardingsphere.proxy.frontend.mysql.command.MySQLCommandExecuteEngine.writeQueryData(MySQLCommandExecuteEngine.java:90)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:113)
at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
```
### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1. start proxy
2. config proxy `CREATE ENCRYPT RULE sbtest1 (
COLUMNS(
(NAME=c,CIPHER=c,TYPE(NAME=AES,PROPERTIES('aes-key-value'='123456abc')))
));`
3. start MySQL
4. use sysbench prepare data to MySQL,without proxy
5. use proxy execute `select `
### Example codes for reproduce this issue (such as a github link).
--
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1350556930
MySQL maintain a field `pkt_nr` in `NET` to hold sequence ID for current connection.
https://github.com/mysql/mysql-server/blob/a246bad76b9271cb4333634e954040a970222e0a/include/mysql_com.h#L921
Sequence ID would be verified when reading packet headers.
https://github.com/mysql/mysql-server/blob/a246bad76b9271cb4333634e954040a970222e0a/sql-common/net_serv.cc#L1477-L1502
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] closed issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
URL: https://github.com/apache/shardingsphere/issues/20713
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] github-actions[bot] commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1272348627
Hello , this issue has not received a reply for several days.
This issue is supposed to be closed.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1316680720
To fix this issue, we have to refactor MySQLPacket. Removing the sequence ID from MySQLPacket and handling sequence ID in Codec.
https://github.com/apache/shardingsphere/blob/35a97dd82bdad130379f7aa570e3baa3b7347942/db-protocol/mysql/src/main/java/org/apache/shardingsphere/db/protocol/mysql/packet/MySQLPacket.java#L28-L33
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1316662729
If we set the sequence ID (AKA Packet Number in Wireshark) correctly, the MySQL cli will not exit.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] wsm12138 commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
wsm12138 commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1234992378
I want to kown ,if we can't get data from Proxy by encrpt_rule because of data not encrypted.
why connection abort,rather than continue?
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu closed issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
strongduanmu closed issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
URL: https://github.com/apache/shardingsphere/issues/20713
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] strongduanmu commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1234133120
@wsm12138 Please use `sysbench` prepare data to MySQL through proxy.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] TeslaCN commented on issue #20713: ShardingSphere-Proxy encrypt will close connection,`o.a.s.p.f.c.CommandExecutorTask - Exception occur: java.lang.IllegalArgumentException: Illegal base64 character 2d`.
Posted by GitBox <gi...@apache.org>.
TeslaCN commented on issue #20713:
URL: https://github.com/apache/shardingsphere/issues/20713#issuecomment-1303021425
![image](https://user-images.githubusercontent.com/20503072/199903855-f6939933-e31f-4407-a991-f8c31226c640.png)
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org