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/11/10 08:23:04 UTC
[GitHub] [shardingsphere] jikegreen opened a new issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
jikegreen opened a new issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115
## Question
I want to use Sharding Proxy in docker,and it report Connection refused in container ,but i use mysql-client in container is ok
my configuration below:
### server.yaml
orchestration:
o1:
namespace: governance_ds
orchestrationType: registry_center,config_center
instanceType: zookeeper
serverLists: 30.43.49.238:2181
props:
retryIntervalMilliseconds: 500
timeToLiveSeconds: 60
maxRetries: 3
operationTimeoutMilliseconds: 500
authentication:
users:
root:
password: root
sharding:
password: sharding
authorizedSchemas: sharding_db
props:
max-connections-size-per-query: 4
acceptor-size: 16 # The default value is available processors count * 2.
executor-size: 16 # Infinite by default.
proxy-frontend-flush-threshold: 128
proxy-transaction-type: BASE
proxy-opentracing-enabled: false
proxy-hint-enabled: false
query-with-cipher-column: true
sql-show: true
check-table-metadata-enabled: true
### config-sharding.yaml
schemaName: sharding_db
dataSource:
username: root
password:
connectionTimeoutMilliseconds: 30000
idleTimeoutMilliseconds: 60000
maxLifetimeMilliseconds: 1800000
maxPoolSize: 50
minPoolSize: 1
maintenanceIntervalMilliseconds: 30000
dataSources:
ds_0:
url: jdbc:mysql://30.43.49.238:3306/ds_0?useSSL=false&useUnicode=true&characterEncoding=UTF8&autoReconnect=true
ds_1:
url: jdbc:mysql://30.43.49.238:3306/ds_1?useSSL=false&useUnicode=true&characterEncoding=UTF8&autoReconnect=true
shardingRule:
tables:
virgo_trans:
actualDataNodes: ds_${0..1}.virgo_trans${0..31}
tableStrategy:
inline:
shardingColumn: owner_id
algorithmExpression: virgo_trans${Long.valueOf(owner_id) % 32}
virgo_trans_details:
actualDataNodes: ds_${0..1}.virgo_trans_details${0..31}
tableStrategy:
inline:
shardingColumn: owner_id
algorithmExpression: virgo_trans_details${Long.valueOf(owner_id) % 32}
virgo_trans_operate:
actualDataNodes: ds_${0..1}.virgo_trans_operate${0..31}
tableStrategy:
inline:
shardingColumn: owner_id
algorithmExpression: virgo_trans_operate${Long.valueOf(owner_id) % 32}
virgo_accounts:
actualDataNodes: ds_${0..1}.virgo_accounts${0..31}
tableStrategy:
inline:
shardingColumn: owner_id
algorithmExpression: virgo_accounts${Long.valueOf(owner_id) % 32}
virgo_account_log:
actualDataNodes: ds_${0..1}.virgo_account_log${0..31}
tableStrategy:
inline:
shardingColumn: owner_id
algorithmExpression: virgo_account_log${Long.valueOf(owner_id) % 32}
bindingTables:
- virgo_trans,virgo_trans_details,virgo_trans_operate,virgo_accounts,virgo_account_log
defaultDatabaseStrategy:
inline:
shardingColumn: owner_id
algorithmExpression: ds_${Long.valueOf(owner_id) % 2}
defaultTableStrategy:
none:
defaultKeyGenerator:
column: id
type: SNOWFLAKE
----------------------------------------------------------------
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] jikegreen commented on issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
jikegreen commented on issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115#issuecomment-725123217
> Can you show your test case and err logs?
use mysql-client in container:
![image](https://user-images.githubusercontent.com/7877695/98761726-0a40e080-2411-11eb-9e02-10dbe7ffadd4.png)
err logs:
![image](https://user-images.githubusercontent.com/7877695/98761793-2e042680-2411-11eb-9e0f-140c65ae3f0a.png)
![image](https://user-images.githubusercontent.com/7877695/98761848-470cd780-2411-11eb-8c57-81ec15fb26b3.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] terrymanu commented on issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115#issuecomment-731912783
Closed because of no response anymore.
----------------------------------------------------------------
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 #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115
----------------------------------------------------------------
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] kimmking commented on issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115#issuecomment-726694143
try to modify config file in docker container.
----------------------------------------------------------------
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] jikegreen commented on issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
jikegreen commented on issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115#issuecomment-725237228
> And how do you launch your container?
docker run -d -v /Users/kangwang/conf:/opt/sharding-proxy/conf -v /Users/kangwang/ext-lib:/opt/sharding-proxy/ext-lib --env PORT=3306 -p3308:3306 apache/sharding-proxy:latest
----------------------------------------------------------------
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] kimmking commented on issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115#issuecomment-725227071
And how do you launch your container?
----------------------------------------------------------------
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] kimmking commented on issue #8115: Docker Sharding Proxy can't connect local mysql,use mysql-client in container is ok
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #8115:
URL: https://github.com/apache/shardingsphere/issues/8115#issuecomment-724593383
Can you show your test case and err logs?
----------------------------------------------------------------
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