Navicat 测试连接shardingsphere-proxy报错

1.安装版本

使用官网安装docker pull apache/shardingsphere-proxy lasted 版本

2.server.xml配置如下:

image

3.config-encrypt.yaml配置如下:

4.已进行操作:

Navicat 测试连接shardingsphere-proxy时,在shardingsphere-proxy docker容器中提示如下:

请检查下 server.yaml 中 scaling 配置是否被打开了?
如果不是需要的功能,请将 scaling 配置注释。

你好,整个server.xml,我只配置如下信息(没有其他项目了):
image

好的,我呼叫专家

@451904496
如果急的话,建议恢复默认的配置,然后只修改自己需要的部分,其他的配置保持注释。
因为排查异常问题会要花更多时间。

你好,恢复默认的配置是得参考哪个?

#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

######################################################################################################
# 
# If you want to configure governance, authorization and proxy properties, please refer to this file.
# 
######################################################################################################

#scaling:
#  blockQueueSize: 10000
#  workerThread: 40
#  clusterAutoSwitchAlgorithm:
#    type: IDLE
#    props:
#      incremental-task-idle-minute-threshold: 30
#  dataConsistencyCheckAlgorithm:
#    type: DEFAULT
#
#mode:
#  type: Cluster
#  repository:
#    type: ZooKeeper
#    props:
#      namespace: governance_ds
#      server-lists: localhost:2181
#      retryIntervalMilliseconds: 500
#      timeToLiveSeconds: 60
#      maxRetries: 3
#      operationTimeoutMilliseconds: 500
#  overwrite: false
#
#rules:
#  - !AUTHORITY
#    users:
#      - root@%:root
#      - sharding@:sharding
#    provider:
#      type: ALL_PRIVILEGES_PERMITTED
#  - !TRANSACTION
#    defaultType: XA
#    providerType: Atomikos

#props:
#  max-connections-size-per-query: 1
#  kernel-executor-size: 16  # Infinite by default.
#  proxy-frontend-flush-threshold: 128  # The default value is 128.
#  proxy-opentracing-enabled: false
#  proxy-hint-enabled: false
#  sql-show: false
#  check-table-metadata-enabled: false
#  show-process-list-enabled: false
#    # Proxy backend query fetch size. A larger value may increase the memory usage of ShardingSphere Proxy.
#    # The default value is -1, which means set the minimum value for different JDBC drivers.
#  proxy-backend-query-fetch-size: -1
#  check-duplicate-table-enabled: false
#  sql-comment-parse-enabled: false
#  proxy-frontend-executor-size: 0 # Proxy frontend executor size. The default value is 0, which means let Netty decide.
#    # Available options of proxy backend executor suitable: OLAP(default), OLTP. The OLTP option may reduce time cost of writing packets to client, but it may increase the latency of SQL execution
#    # if client connections are more than proxy-frontend-netty-executor-size, especially executing slow SQL.
#  proxy-backend-executor-suitable: OLAP
#  proxy-frontend-max-connections: 0 # Less than or equal to 0 means no limitation.
#  sql-federation-enabled: false


好的,也是不行,请求专家支持,哈

把 TRANSACTION 配置打开呢,配置为 LOCAL

  • !TRANSACTION
    defaultType: LOCAL

还是报那个错,请问这些配置有无一个文档可以看。

Proxy 属性配置:
https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/yaml-config/props/

很遗憾没有见过你发的这个错误,同事反馈可能是数据库问题,建议换个 MySQL 实例试试?

因为 Docker 默认配置是有无数小伙伴在用的,没有报告过类似的问题

你好,问题已解决。我仔细看了日志,原来是绑定端口错了,docker启动的proxxy端口是3307,顺带找到官网文档的错误

官网地址为:使用 Docker :: ShardingSphere

官方镜像的端口确实是 3308
https://hub.docker.com/r/apache/shardingsphere-proxy

京ICP备2021015875号