I’m currently working on setting up GridDB for an IoT application, and I’m having trouble configuring multiple communication paths between the GridDB client and server. According to the GridDB documentation, it’s possible to set up both internal and external communication paths, but I’m unsure about the exact configuration steps.
What I’ve Done So Far:
- Edited the gs_node.json file to include the publicServiceAddress for transaction and SQL services.
- Edited the gs_cluster.json file to set the external communication address and port number for transaction and SQL services.
Here’s my gs_node.json file:
"transaction": {
"serviceAddress": "172.17.0.44",
"publicServiceAddress": "10.45.1.10",
"servicePort": 10001
},
"sql": {
"serviceAddress": "172.17.0.44",
"publicServiceAddress": "10.45.1.10",
"servicePort": 20001
}
And my gs_cluster.json file:
{
"cluster": {
"clusterName": "myCluster",
"replicationNum": 2,
"heartbeatInterval": "5s",
"loadbalanceCheckInterval": "180s",
"notificationMember": [
{
"cluster": {"address": "172.17.0.44", "port": 10010},
"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}
}
]
}
}
Here’s the Java client code to set the connection route:
Properties prop = new Properties();
props.setProperty("notificationMember", "10.45.1.10:10001");
props.setProperty("connectionRoute", "PUBLIC");
GridStore store = GridStoreFactory.getInstance().getGridStore(prop);
Despite following these steps, my GridDB client is still not able to communicate via the external network. What am I missing or doing wrong?
Any insights or examples would be greatly appreciated!
Tags:
• griddb
• iot
• bigdata
• nosql
• database-configuration
Syed Zaid bin Haris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.