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 2020/06/11 03:32:24 UTC
[GitHub] [shardingsphere] huntunshule opened a new issue #5991: can't to access shardingDB
huntunshule opened a new issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991
This is the launch log of Sharding-Proxy
```
sharding-proxy | Starting the Sharding-Proxy ...
sharding-proxy | The port is 3308
sharding-proxy | The classpath is /opt/sharding-proxy/conf:.:..:/opt/sharding-proxy/lib/*:/opt/sharding-proxy/lib/*:/opt/sharding-proxy/ext-lib/*
sharding-proxy | Please check the STDOUT file: /opt/sharding-proxy/logs/stdout.log
sharding-proxy | [INFO ] 03:23:37.590 [main] c.a.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.tm_unique_name = 172.20.0.2.tm
sharding-proxy | [INFO ] 03:23:37.591 [main] c.a.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.forget_orphaned_log_entries_delay = 86400000
sharding-proxy | [INFO ] 03:23:37.591 [main] c.a.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.oltp_retry_interval = 10000
sharding-proxy | [INFO ] 03:23:37.591 [main] c.a.icatch.provider.imp.AssemblerImp - USING: java.naming.provider.url = rmi://localhost:1099
sharding-proxy | [INFO ] 03:23:37.591 [main] c.a.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.force_shutdown_on_vm_exit = false
sharding-proxy | [INFO ] 03:23:37.591 [main] c.a.icatch.provider.imp.AssemblerImp - USING: com.atomikos.icatch.default_jta_timeout = 300000
sharding-proxy | [INFO ] 03:23:37.591 [main] c.a.icatch.provider.imp.AssemblerImp - Using default (local) logging and recovery...
sharding-proxy | [INFO ] 03:23:37.639 [main] c.a.d.xa.XATransactionalResource - resource-1-ds_master: refreshed XAResource
sharding-proxy | [INFO ] 03:23:37.678 [main] c.a.d.xa.XATransactionalResource - resource-2-ds_slave0: refreshed XAResource
sharding-proxy | [INFO ] 03:23:37.712 [main] ShardingSphere-metadata - Loading 1 tables' meta data.
sharding-proxy | [INFO ] 03:23:37.858 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602] REGISTERED
sharding-proxy | [INFO ] 03:23:37.859 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602] BIND: 0.0.0.0/0.0.0.0:3308
sharding-proxy | [INFO ] 03:23:37.860 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602, L:/0.0.0.0:3308] ACTIVE
sharding-proxy | [INFO ] 03:24:00.862 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602, L:/0.0.0.0:3308] READ: [id: 0x0b7beee3, L:/172.20.0.2:3308 - R:/192.168.9.1:7157]
sharding-proxy | [INFO ] 03:24:00.865 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602, L:/0.0.0.0:3308] READ COMPLETE
sharding-proxy | [INFO ] 03:24:01.434 [ShardingSphere-Command-0] ShardingSphere-SQL - Logic SQL: SET NAMES utf8mb4
sharding-proxy | [INFO ] 03:24:01.434 [ShardingSphere-Command-0] ShardingSphere-SQL - SQLStatement: CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dal.SetStatement@5418de5a, tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@50e767ec)
sharding-proxy | [INFO ] 03:24:01.434 [ShardingSphere-Command-0] ShardingSphere-SQL - Actual SQL: ds_master ::: SET NAMES utf8mb4
sharding-proxy | [INFO ] 03:24:03.795 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602, L:/0.0.0.0:3308] READ: [id: 0xf497def0, L:/172.20.0.2:3308 - R:/192.168.9.1:7159]
sharding-proxy | [INFO ] 03:24:03.795 [epollEventLoopGroup-2-1] i.n.handler.logging.LoggingHandler - [id: 0x2b0f8602, L:/0.0.0.0:3308] READ COMPLETE
sharding-proxy | [INFO ] 03:24:03.805 [ShardingSphere-Command-2] ShardingSphere-SQL - Logic SQL: SET NAMES utf8mb4
sharding-proxy | [INFO ] 03:24:03.806 [ShardingSphere-Command-2] ShardingSphere-SQL - SQLStatement: CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dal.SetStatement@fb9b46a, tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@17e5bed)
sharding-proxy | [INFO ] 03:24:03.806 [ShardingSphere-Command-2] ShardingSphere-SQL - Actual SQL: ds_master ::: SET NAMES utf8mb4
sharding-proxy | [INFO ] 03:24:03.814 [ShardingSphere-Command-3] ShardingSphere-SQL - Logic SQL: SHOW VARIABLES LIKE 'lower_case_%'
sharding-proxy | [INFO ] 03:24:03.814 [ShardingSphere-Command-3] ShardingSphere-SQL - SQLStatement: CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dal.dialect.mysql.ShowOtherStatement@1f9a26e, tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@656d6d2d)
sharding-proxy | [INFO ] 03:24:03.814 [ShardingSphere-Command-3] ShardingSphere-SQL - Actual SQL: ds_master ::: SHOW VARIABLES LIKE 'lower_case_%'
sharding-proxy | [INFO ] 03:24:03.843 [ShardingSphere-Command-0] ShardingSphere-SQL - Logic SQL: SHOW VARIABLES LIKE 'sql_mode'
sharding-proxy | [INFO ] 03:24:03.843 [ShardingSphere-Command-0] ShardingSphere-SQL - SQLStatement: CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dal.dialect.mysql.ShowOtherStatement@55860592, tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@52ba5fd2)
sharding-proxy | [INFO ] 03:24:03.843 [ShardingSphere-Command-0] ShardingSphere-SQL - Actual SQL: ds_master ::: SHOW VARIABLES LIKE 'sql_mode'
sharding-proxy | [INFO ] 03:24:03.900 [ShardingSphere-Command-1] ShardingSphere-SQL - Logic SQL: SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA
sharding-proxy | [INFO ] 03:24:03.900 [ShardingSphere-Command-1] ShardingSphere-SQL - SQLStatement: SelectStatementContext(super=CommonSQLStatementContext(sqlStatement=org.apache.shardingsphere.sql.parser.sql.statement.dml.SelectStatement@4cf79a7c, tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@356eb011), tablesContext=org.apache.shardingsphere.sql.parser.binder.segment.table.TablesContext@356eb011, projectionsContext=ProjectionsContext(startIndex=7, stopIndex=69, distinctRow=false, projections=[ColumnProjection(owner=null, name=SCHEMA_NAME, alias=Optional.empty), ColumnProjection(owner=null, name=DEFAULT_CHARACTER_SET_NAME, alias=Optional.empty), ColumnProjection(owner=null, name=DEFAULT_COLLATION_NAME, alias=Optional.empty)]), groupByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.groupby.GroupByContext@1c542555, orderByContext=org.apache.shardingsphere.sql.parser.binder.segment.select.orderby.OrderByContext@427fb75b, paginationContext=org.apache.shardingsphere.sql.parser.binder.segment.select.pagination.PaginationContext@322bf112, containsSubquery=false)
sharding-proxy | [INFO ] 03:24:03.900 [ShardingSphere-Command-1] ShardingSphere-SQL - Actual SQL: ds_slave0 ::: SELECT SCHEMA_NAME, DEFAULT_CHARACTER_SET_NAME, DEFAULT_COLLATION_NAME FROM information_schema.SCHEMATA
```
This is my profile
```
schemaName: master #逻辑表名称
dataSources: #数据源
ds_master: #主库
url: jdbc:mysql://192.168.9.180:3306/cloud-master #连接数据库的地址
username: root
password: root
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 65
ds_slave0: #从库
url: jdbc:mysql://192.168.9.181:3306/cloud-master
username: root
password: root
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 65
masterSlaveRule: #主从规则
name: master #规则的名称
masterDataSourceName: ds_master #该规则下主库
slaveDataSourceNames:
- ds_slave0 #该规则下从库
```
this is docker-compose.yaml
```
version: '3.1'
services:
shardingproxy:
restart: always
image: apache/sharding-proxy:4.1.1
container_name: sharding-proxy
environment:
PORT: 3308
ports:
- 3312:3308
volumes:
- ./conf:/opt/sharding-proxy/conf
- ./logs:/opt/sharding-proxy/logs
- ./lib:/opt/sharding-proxy/ext-lib
```
But schemaName doesn't exist after I start it
![image](https://user-images.githubusercontent.com/52652738/84341924-e285ec00-abd6-11ea-8703-54ac1e783cd7.png)
How can I solve this problem
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642411681
> > Any error logs in the proxy background ? Do you connected using port 3308 ?
>
> The structure of the database is wrong, there is no logical library that I have configured
Try to connect using port 3312
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642420216
> ![image](https://user-images.githubusercontent.com/52652738/84348239-0cdfa580-abe7-11ea-9354-13414fd8f0b4.png)
> If you look at the picture, the master doesn't exist
What is the port of the connection in the picture.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-643588385
@huntunshule If no response anymore, we will close this issue later.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] huntunshule commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
huntunshule commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642411213
> Any error logs in the proxy background ? Do you connected using port 3308 ?
The structure of the database is wrong, there is no logical library that I have configured
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642394796
Any error logs in the proxy background ? Do you connected using port 3308 ?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] huntunshule commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
huntunshule commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642420550
> > ![image](https://user-images.githubusercontent.com/52652738/84348239-0cdfa580-abe7-11ea-9354-13414fd8f0b4.png)
> > If you look at the picture, the master doesn't exist
>
> What is the port of the connection in the picture.
3312
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] huntunshule commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
huntunshule commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642415829
![image](https://user-images.githubusercontent.com/52652738/84348239-0cdfa580-abe7-11ea-9354-13414fd8f0b4.png)
If you look at the picture, the master doesn't exist
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642424440
Could you try again using the mysql client ?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] terrymanu closed issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642415546
The picture above is `cloud-master`, you should connect to `master`.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] huntunshule commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
huntunshule commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642412263
![image](https://user-images.githubusercontent.com/52652738/84347559-79f23b80-abe5-11ea-9355-7b3f1ede7915.png)
> > > Any error logs in the proxy background ? Do you connected using port 3308 ?
> >
> >
> > The structure of the database is wrong, there is no logical library that I have configured
>
> Try to connect using port 3312
![image](https://user-images.githubusercontent.com/52652738/84347578-82e30d00-abe5-11ea-85c1-a9474bc83018.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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [shardingsphere] menghaoranss commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
menghaoranss commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-643063600
@huntunshule How's it going?
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] huntunshule commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
huntunshule commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642389053
![image](https://user-images.githubusercontent.com/52652738/84342924-5fb26080-abd9-11ea-9074-0f27bcb7f8f1.png)
The docker image address on the official website is still wrong
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [shardingsphere] huntunshule commented on issue #5991: can't to access shardingDB
Posted by GitBox <gi...@apache.org>.
huntunshule commented on issue #5991:
URL: https://github.com/apache/shardingsphere/issues/5991#issuecomment-642413476
> > > Any error logs in the proxy background ? Do you connected using port 3308 ?
> >
> >
> > The structure of the database is wrong, there is no logical library that I have configured
>
> Try to connect using port 3312
Both my master and slave libraries can be connected, but the sharding connection cannot access the database in my configuration file. The database in my configuration file is called master, but you can see that the picture above does not exist master
----------------------------------------------------------------
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:
users@infra.apache.org