You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

GridDB客户端与服务器多通信路径配置问题求助

排查GridDB外网通信配置问题的步骤

1. 确认GridDB服务已重启

修改gs_node.json和gs_cluster.json后,必须重启GridDB服务才能让新配置生效:

# 停止服务
sudo systemctl stop griddb
# 启动服务
sudo systemctl start griddb

用gs_stat命令验证配置是否加载成功:

gs_stat -u admin/admin

查看输出中的服务地址是否包含你设置的公网地址。

2. 修正Notification Member端口

你当前客户端配置的notificationMember指向了transaction服务端口(10001),但notification服务默认端口是10010,需要补充公网notification服务配置并修改客户端参数:

第一步:更新gs_cluster.json

在notificationMember节点中添加公网notification服务配置:

"notificationMember": [
    {
        "cluster": {"address": "172.17.0.44", "port": 10010},
        "clusterPublic": {"address": "10.45.1.10", "port": 10010}, // 新增公网notification配置
        "sync": {"address": "172.17.0.44", "port": 10020},
        "system": {"address": "172.17.0.44", "port": 10040},
        "transaction": {"address": "172.17.0.44", "port": 10001},
        "sql": {"address": "172.17.0.44", "port": 20001},
        "transactionPublic": {"address": "10.45.1.10", "port": 10001},
        "sqlPublic": {"address": "10.45.1.10", "port": 20001}
    }
]

第二步:修改客户端代码

将notificationMember改为公网notification端口:

Properties props = new Properties();
props.setProperty("notificationMember", "10.45.1.10:10010"); // 修正为notification服务端口
props.setProperty("connectionRoute", "PUBLIC"); // 部分版本需小写"public",可两种都尝试
GridStore store = GridStoreFactory.getInstance().getGridStore(props);

3. 检查防火墙/安全组规则

确保服务器的以下端口对客户端公网IP开放:

  • 10010(notification服务)
  • 10001(transaction服务)
  • 20001(SQL服务)
    云服务器需在平台安全组添加入站规则,本地服务器需配置iptables/firewalld开放对应端口。

4. 验证connectionRoute参数大小写

部分GridDB版本中connectionRoute参数区分大小写,尝试改为小写:

props.setProperty("connectionRoute", "public");

5. 确认客户端与服务器版本兼容

GridDB客户端SDK版本必须与服务器版本一致,版本不兼容会导致连接失败。查看服务器版本:

gs_version

确保客户端依赖的SDK版本与之匹配。

6. 测试基础网络连通性

在客户端机器上用telnet或nc测试端口连通性:

# 测试notification端口
telnet 10.45.1.10 10010
# 测试transaction端口
telnet 10.45.1.10 10001

若连接失败,优先排查网络路由或防火墙配置。


内容的提问来源于stack exchange,提问作者Syed Zaid bin Haris

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.22 05:53:10