I created a cluster of nodes for my data analysis project. I wanted to test my project by removing a node from the cluster to see if it handles it effectively. The code for removing the node is as follows:
const factory = griddb.StoreFactory.getInstance();
const store = factory.getStore({
"host": '239.0.0.1',
"port": 31999,
"clusterName": "defaultCluster",
"username": "admin",
"password": "admin"
});
// For connecting to the GridDB Server we have to make containers and specify the schema.
const conInfo = new griddb.ContainerInfo({
'name': "gdpanalysis",
'columnInfoList': [
["name", griddb.Type.STRING],
["Country", griddb.Type.STRING],
["1999", griddb.Type.DOUBLE],
["2000", griddb.Type.DOUBLE],
["2001", griddb.Type.DOUBLE],
["2002", griddb.Type.DOUBLE],
["2003", griddb.Type.DOUBLE],
["2004", griddb.Type.DOUBLE],
["2005", griddb.Type.DOUBLE],
["2006", griddb.Type.DOUBLE],
["2007", griddb.Type.DOUBLE],
["2008", griddb.Type.DOUBLE],
["2009", griddb.Type.DOUBLE],
["2010", griddb.Type.DOUBLE],
["2011", griddb.Type.DOUBLE],
["2012", griddb.Type.DOUBLE],
["2013", griddb.Type.DOUBLE],
["2014", griddb.Type.DOUBLE],
["2015", griddb.Type.DOUBLE],
["2016", griddb.Type.DOUBLE],
["2017", griddb.Type.DOUBLE],
["2018", griddb.Type.DOUBLE],
["2019", griddb.Type.DOUBLE],
["2020", griddb.Type.DOUBLE],
["2021", griddb.Type.DOUBLE],
["2022", griddb.Type.DOUBLE]
],
'type': griddb.ContainerType.COLLECTION, 'rowKey': true
});
Container container = gridStore.getContainer("myContainer");
Row row = container.createRow();
row.setString("name", "John Doe");
row.setInteger("age", 30);
container.put(row);
// Attempting to remove a node from the cluster
GridClusterInfo clusterInfo = gridStore.getClusterInfo();
clusterInfo.removeNode();
However, I was unable to do it and received the following error:
[Server] 180030
[Description] Node cannot leave the cluster
Is there any authentication or firewall that needs to be disabled from GridDB to allow for that? And is there any risk in doing that? I appreciate any help provided.
P.S. I ran GridDB on Administrator settings.