zosimer opened a new issue #8333: URL: https://github.com/apache/shardingsphere/issues/8333
**It is normal to start shardingproxy, but this error will be reported when I connect with Navicat. The error message is as follows:** Starting the ShardingSphere-Proxy ... [INFO ] 14:03:05.617 [main] ShardingSphere-metadata - Loading 92 tables' meta data for unconfigured tables. [INFO ] 14:03:05.672 [main] ShardingSphere-metadata - Loading 92 tables' meta data for unconfigured tables. [INFO ] 14:03:05.710 [main] ShardingSphere-metadata - Loading 92 tables' meta data for unconfigured tables. [INFO ] 14:03:05.741 [main] ShardingSphere-metadata - Loading 92 tables' meta data for unconfigured tables. [INFO ] 14:03:05.765 [main] o.a.s.i.c.s.SchemaContextsBuilder - Load meta data for schema jiajia finished, cost 294 milliseconds. Thanks for using Atomikos! Evaluate http://www.atomikos.com/Main/ExtremeTransactions for advanced features and professional support or register at http://www.atomikos.com/Main/RegisterYourDownload to disable this message and receive FREE tips & advice [INFO ] 14:03:06.328 [main] o.a.s.p.i.i.AbstractBootstrapInitializer - Database name is `MySQL`, version is `5.7.23-0ubuntu0.16.04.1-log` [INFO ] 14:03:08.742 [main] o.a.s.p.frontend.ShardingSphereProxy - ShardingSphere-Proxy start success. [ERROR] 14:04:08.349 [ShardingSphere-Command-9] 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(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) **config-replica-query.yaml** schemaName: jiajia dataSourceCommon: username: root password: xxxxx connectionTimeoutMilliseconds: 30000 idleTimeoutMilliseconds: 60000 maxLifetimeMilliseconds: 1800000 maxPoolSize: 50 minPoolSize: 1 maintenanceIntervalMilliseconds: 30000 dataSources: primary_ds: url: jdbc:mysql://47.96.190.157:3306/jiajia?serverTimezone=GMT%2B8&useSSL=false replica_ds_0: url: jdbc:mysql://120.55.83.18:3306/jiajia?serverTimezone=GMT%2B8&useSSL=false rules: - !REPLICA_QUERY dataSources: pr_ds: name: pr_ds primaryDataSourceName: primary_ds replicaDataSourceNames: - replica_ds_0 **server.yaml** authentication: users: root: password: Wxkj1029 sharding: password: Wxkj1029 authorizedSchemas: jiajia props: max.connections.size.per.query: 1 acceptor.size: 16 # The default value is available processors count * 2. executor.size: 16 # Infinite by default. proxy.frontend.flush.threshold: 128 # The default value is 128. # LOCAL: Proxy will run with LOCAL transaction. # XA: Proxy will run with XA transaction. # BASE: Proxy will run with B.A.S.E transaction. proxy.transaction.type: LOCAL proxy.opentracing.enabled: false proxy.hint.enabled: false query.with.cipher.column: true sql.show: false allow.range.query.with.inline.sharding: false ---------------------------------------------------------------- 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]
