Error: "Not a Multicast Address" while running java application

If you ran into the above error while running java application for example the provided by Grid DB, then do not skip reading this.

Let’s assume you have Grid DB installed and you want to run the while in the gsadm shell using the command below;

java gsSample/ 10001 myCluster admin admin

This error is attributed to the wrong configuration use in your gs_cluster.json file or file.

Thus, you need to understand how GridDB configuration mode setting works.

There are two type of GridDB configuration modes namely- Fixed List and Multicast Mode. These two operate differently.

For example GridDB 5.3.0 version is installed with a Fixed List mode i.e the configuration of cluster address on and the is configured to use a multicast mode.

The steps to resolving this issue is thus as follows;

  1. Identify the configuration mode used in your gs_cluster.json file.

Make use of the following command;

sudo su gsadm
cat conf/gs_cluster.json

If running these commands returns the same gs_cluster.json with then you are confirmed to be on Fixed List Mode.

Thus, you will need to modify your java properties code as the above Gridstore configuration is configured for Multicast Mode instead of Fixed List Mode.

  1. Edit the file

while in the gsSample directory, you can run


and edit the GridDB properties setting to reflect for Fixed List mode as shown in code below;

Properties props = new Properties();
props.setProperty("notificationMember", "");
props.setProperty("clusterName", "myCluster");
props.setProperty("user", "admin");
props.setProperty("password", "admin");
GridStore store = GridStoreFactory.getInstance().getGridStore(props);

Now you can run the java application without any error.