Default port for stado cluster

Asked by Sushil

Hi,
I have a setup two postgres instances on two physical servers with port 5432. I want to add two new with 5433 port on both.
I can see there is one variable xdb.default.dbport=5432.
Is this possible with stado?

Thanks,
Sushil

Question information

Language:
English Edit question
Status:
Solved
For:
Stado Edit question
Assignee:
No assignee Edit question
Solved by:
Alvin Peng
Solved:
Last query:
Last reply:
Revision history for this message
Best Alvin Peng (pengalvin) said :
#1

You can config below variables:

### The number of nodes in cluster

xdb.nodecount=4

### The hosts of the underlying databases

xdb.node.1.dbhost=127.0.0.1
xdb.node.1.dbport=5432
xdb.node.2.dbhost=127.0.0.1
xdb.node.2.dbport=5432
xdb.node.3.dbhost=127.0.0.1
xdb.node.3.dbport=5433
xdb.node.4.dbhost=127.0.0.1
xdb.node.4.dbport=5433

xdb.default.dbport=5432. will be used if you do not config xdb.node.n.dbport

Revision history for this message
Sushil (sushil-k-mohanty) said :
#2

Thanks a lot. I checked with creating a database and it worked for me.

While testing with a single instance I found one more issue.

Stado -> create table test1(c1 int) PARTITIONING KEY c1 on all;
SQLException: ERROR: Server has aborted execution, cause is: java.nio.channels.ClosedChannelException : null

Bellow is my stado.config file connents.

stado.config
==========

###
### Server settings
###

xdb.port=6453
xdb.maxconnections=10

###
### Node & JDBC Pool configuration
###

### Set defaults for all nodes and MetaData database.
### These can be overriden.

xdb.default.dbusername=stado
xdb.default.dbpassword=stado

xdb.default.dbport=5488

### Connection thread defaults for each node
### Note that these are pooled, so the number of clients connected
### to GridSQL can be greater than pool size.

xdb.default.threads.pool.initsize=5
xdb.default.threads.pool.maxsize=10

### Connectivity for MetaData database

xdb.metadata.database=XDBSYS
xdb.metadata.dbhost=127.0.0.1

### The number of nodes in cluster

xdb.nodecount=4

### The hosts of the underlying databases

xdb.node.1.dbhost=10.2.0.36
xdb.node.2.dbhost=10.2.0.36
xdb.node.3.dbhost=10.2.0.76
xdb.node.4.dbhost=10.2.0.76
#xdb.node.3.dbport=5488
#xdb.node.2.dbport=5433
#xdb.node.1.dbport=5488
#xdb.node.4.dbport=5433
#xdb.node.5.dbhost=10.2.0.76
#xdb.node.6.dbhost=10.2.0.76
#xdb.node.7.dbhost=10.2.0.76
#xdb.node.8.dbhost=10.2.0.76

### Designate coordinator node number
### In practice, the coordinator node should be the node where
### GridSQL is running.

xdb.coordinator.node=1

###
### The next few sections are required when wanting to run agents on the nodes.
### Uncomment them and modify to communicate with agents
###

### Only for agent version
### Port for node's SocketCommunicator

#xdb.node.1.port=6455
#xdb.node.1.host=10.2.0.36
#xdb.node.2.port=6456
#xdb.node.2.host=10.2.0.36
xdb.node.3.port=6455
xdb.node.3.host=10.2.0.76
xdb.node.4.port=6456
xdb.node.4.host=10.2.0.76

### Designate coordinator node
### In practice, the coordinator node should be the node where
### GridSQL is running.

xdb.coordinator.host=10.2.0.36
xdb.coordinator.port=6454

stado_agent.config
================

###
### The coordinator host and port
###

xdb.coordinator.host=10.2.0.36
xdb.coordinator.port=6454

I am able to create database and tables inside it on all nodes within the cluster without configuring agents.
But while I was trying configure agent I am getting the above error.

Please do let me know whether anything wrong with the configuration.

Thanks,
Sushil

Revision history for this message
Sushil (sushil-k-mohanty) said :
#3

Thanks Alvin Peng, that solved my question.