GriddB Java Client Error


I have some Java code that I am running. My Griddb is running in a docker container. When I execute the program, I get a runtime error that there is a SocketTimeoutException while at the same time, the program keeps going in an infinite loop, throwing the same error at intervals. My GriddB server already running on docker. Could this error be from how the code is structured or the griddb server itself and how do I fix this? The screenshot below shows the error I am getting.

Below is the code

package org.griddb;


import java.util.Date;
import java.util.Properties;

public class GridDBTest {

static class Person {
    public String name;
    private int age;

static class HeartRate {
    Date ts;
    int heartRate;
    String activity;

public static void main(String[] args) throws GSException {
    Properties props = new Properties();
    props.setProperty("notificationAddress", "");
    props.setProperty("notificationPort", "31999");
    props.setProperty("clusterName", "defaultCluster");
    props.setProperty("user", "admin");
    props.setProperty("password", "admin");
    GridStore store = GridStoreFactory.getInstance().getGridStore(props);

    Collection<String, Person> people = store.putCollection("PEOPLE", Person.class);

    Query<Person> query = people.query("select * where name = 'John'");
    RowSet<Person> rs = query.fetch(false);
    Person person1 = new Person();
    TimeSeries<Person> personTimeSeries = store.putTimeSeries("Admin_", 
    while (rs.hasNext()) {
        // Update the searched Row
        Person person2 =;
        System.out.println("Name: "+ +" Age: "+ person2.age);

Did you run your GridDB docker container to be attached to the network of the host? (ie network=host)? Or did you expose the port? Your error to me looks like it simply can’t find the running GridDB server, meaning the network port can’t be reached, likely meaning the port isn’t exposed