marktrue edited a comment on issue #8525:
URL: https://github.com/apache/shardingsphere/issues/8525#issuecomment-742409321
same situation i have met.
client: navicat or mariadb-client 10.3.25
sharding-proxy: docker pulled from apache/sharding-proxy
mariadb-server: MariaDB 10.3.25
<pre>
<code>
[INFO ] 09:33:06.142 [ShardingSphere-Command-15] ShardingSphere-SQL - Logic
SQL: SHOW FULL TABLES WHERE Table_type != 'VIEW'
[INFO ] 09:33:06.143 [ShardingSphere-Command-15] ShardingSphere-SQL -
SQLStatement: MySQLShowTablesStatement(fromSchema=Optional.empty)
[INFO ] 09:33:06.143 [ShardingSphere-Command-15] ShardingSphere-SQL - Actual
SQL: pr_ds ::: SHOW FULL TABLES WHERE Table_type != 'VIEW'
[ERROR] 09:33:06.144 [ShardingSphere-Command-15]
o.a.s.p.f.c.CommandExecutorTask - Exception occur:
java.lang.NullPointerException: Can not get connection from datasource pr_ds.
at
com.google.common.base.Preconditions.checkNotNull(Preconditions.java:987)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.datasource.JDBCBackendDataSource.getConnections(JDBCBackendDataSource.java:80)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.datasource.JDBCBackendDataSource.getConnections(JDBCBackendDataSource.java:62)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection.getConnectionsWithoutTransaction(BackendConnection.java:141)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.connection.BackendConnection.getConnections(BackendConnection.java:102)
at
org.apache.shardingsphere.infra.executor.sql.resourced.group.ResourceManagedExecuteGroupEngine.generateSQLExecuteGroups(ResourceManagedExecuteGroupEngine.java:66)
at
org.apache.shardingsphere.infra.executor.sql.group.AbstractExecuteGroupEngine.generate(AbstractExecuteGroupEngine.java:58)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.generateInputGroups(JDBCExecuteEngine.java:140)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.executeWithManagedResource(JDBCExecuteEngine.java:130)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:123)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.execute.engine.jdbc.JDBCExecuteEngine.execute(JDBCExecuteEngine.java:103)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.doExecute(JDBCDatabaseCommunicationEngine.java:93)
at
org.apache.shardingsphere.proxy.backend.communication.jdbc.JDBCDatabaseCommunicationEngine.execute(JDBCDatabaseCommunicationEngine.java:79)
at
org.apache.shardingsphere.proxy.backend.text.admin.ShowTablesBackendHandler.execute(ShowTablesBackendHandler.java:65)
at
org.apache.shardingsphere.proxy.frontend.mysql.command.query.text.query.MySQLComQueryPacketExecutor.execute(MySQLComQueryPacketExecutor.java:62)
at
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:100)
at
org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:76)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
</code>
</pre>
schemaName: test
#
dataSourceCommon:
username: *****
password: *****
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
maintenanceIntervalMilliseconds: 30000
#
dataSources:
primary_ds:
url: jdbc:mysql://192.168.1.131:3306/test?serverTimezone=UTC&useSSL=false
replica_ds_0:
url: jdbc:mysql://192.168.1.132:3306/test?serverTimezone=UTC&useSSL=false
replica_ds_1:
url: jdbc:mysql://192.168.1.133:3306/test?serverTimezone=UTC&useSSL=false
#
rules:
- !REPLICA_QUERY
dataSources:
pr_ds:
name: pr_ds
primaryDataSourceName: primary_ds
replicaDataSourceNames:
- replica_ds_0
- replica_ds_1
loadBalancerName: robin
loadBalancers:
robin:
type: ROUND_ROBIN
props:
<pre>
<code>
</code>
</pre>
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]