title: My Sample Java Program does not Read GridDB Record
body: <p>I am new to GridDB and trying to run a Sample Java program in CentOS 7.6 terminal to read a simple GridDB record.
  This is my Java program.</p>
  <pre><code>package gsSample;
  import java.util.Arrays;
  import java.util.Properties;
  
  import com.toshiba.mwcloud.gs.Collection;
  import com.toshiba.mwcloud.gs.GSException;
  import com.toshiba.mwcloud.gs.GridStore;
  import com.toshiba.mwcloud.gs.GridStoreFactory;
  import com.toshiba.mwcloud.gs.Query;
  import com.toshiba.mwcloud.gs.RowKey;
  import com.toshiba.mwcloud.gs.RowSet;
  
  
  // Operaton on Collection data
  public class Sample1 {
  
      static class Person {
          @RowKey String name;
          boolean status;
          long count;
          byte[] lob;
      }
  
      public static void main(String[] args) throws GSException {
  
          // Get a GridStore instance
          Properties props = new Properties();
          props.setProperty(&quot;notificationAddress&quot;, args[0]);
          props.setProperty(&quot;notificationPort&quot;, args[1]);
          props.setProperty(&quot;clusterName&quot;, args[2]);
          props.setProperty(&quot;user&quot;, args[3]);
          props.setProperty(&quot;password&quot;, args[4]);
          GridStore store = GridStoreFactory.getInstance().getGridStore(props);
  
          // Create a Collection (Delete if schema setting is NULL)
          Collection&lt;String, Person&gt; col = store.putCollection(&quot;col01&quot;, Person.class);
  
          // Set an index on the Row-key Column
          col.createIndex(&quot;name&quot;);
  
          // Set an index on the Column
          col.createIndex(&quot;count&quot;);
  
          // Set the autocommit mode to OFF
          col.setAutoCommit(false);
  
          // Prepare data for a Row
          Person person = new Person();
          person.name = &quot;name01&quot;;
          person.status = false;
          person.count = 1;
          person.lob = new byte[] { 65, 66, 67, 68, 69, 70, 71, 72, 73, 74 };
  
          // Operate a Row on a K-V basis: RowKey = &quot;name01&quot;
          boolean update = true;
          col.put(person);    // Add a Row
          person = col.get(person.name, update);  // Obtain the Row (acquiring a lock for update)
          col.remove(person.name);    // Delete the Row
  
          // Operate a Row on a K-V basis: RowKey = &quot;name02&quot;
          col.put(&quot;name02&quot;, person);  // Add a Row (specifying RowKey)
  
          // Commit the transaction (Release the lock)
          col.commit();
  
          // Search the Collection for a Row
          Query&lt;Person&gt; query = col.query(&quot;select * where name = 'name02'&quot;);
  
          // Fetch and update the searched Row
          RowSet&lt;Person&gt; rs = query.fetch(update);
          while (rs.hasNext()) {
              // Update the searched Row
              Person person1 = rs.next();
              person1.count += 1;
              rs.update(person1);
  
              System.out.println(&quot;Person: &quot; +
                      &quot; name=&quot; + person1.name +
                      &quot; status=&quot; + person1.status +
                      &quot; count=&quot; + person1.count +
                      &quot; lob=&quot; + Arrays.toString(person1.lob));
          }
  
          // Commit the transaction
          col.commit();
  
          // Release the resource
          store.close();
      }
  
  }
  
  </code></pre>
  <p>This is my terminal screen status.</p>
  <pre><code>[sh ~]$ mkdir ~/gsSample/
  [sh ~]$ cp /usr/griddb-*/docs/sample/program/Sample1.java ~/gsSample
  [sh ~]$ cd ~/gsSample
  [sh gsSample]$ export CLASSPATH=${CLASSPATH}:/usr/griddb-4.2.0/bin/gridstore-4.2.0.jar
  [sh gsSample]$ javac Sample1.java
  [sh gsSample]$ cd ..
  [sh ~]$ java gsSample/Sample1 239.0.0.1 31999 defaultCluster administrator password
  </code></pre>
  <p>However, I get the below error. Could you please help with this?</p>
  <p>Exception in thread &quot;main&quot; com.toshiba.mwcloud.gs.GSTimeoutException: [145028:JC_BAD_CONNECTION] Failover timed out (trialCount=11, failureMillis=121204, timeoutMillis=120000, reason=[145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out), historySize=12, historyOfTop10(trial, millisFromInitial, millisFromPrev, reason)=[(3, 21027, 11016, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (4, 32073, 11046, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (5, 43084, 11011, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (6, 54096, 11012, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (7, 65099, 11003, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (8, 76105, 11006, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (9, 87136, 11031, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (10, 98137, 11001, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (11, 109180, 11043, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)), (12, 120192, 11012, [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out))])
  at com.toshiba.mwcloud.gs.subnet.GridStoreChannel.executeStatement(GridStoreChannel.java:1804)
  at com.toshiba.mwcloud.gs.subnet.GridStoreChannel.executeResolver(GridStoreChannel.java:1912)
  at com.toshiba.mwcloud.gs.subnet.GridStoreChannel.resolvePartitionId(GridStoreChannel.java:2103)
  at com.toshiba.mwcloud.gs.subnet.SubnetGridStore.putContainer(SubnetGridStore.java:968)
  at com.toshiba.mwcloud.gs.subnet.SubnetGridStore.putCollection(SubnetGridStore.java:1024)
  at com.toshiba.mwcloud.gs.subnet.SubnetGridStore.putCollection(SubnetGridStore.java:787)
  at com.toshiba.mwcloud.gs.subnet.SubnetGridStore.putCollection(SubnetGridStore.java:98)
  at gsSample.Sample1.main(Sample1.java:36)
  Caused by: com.toshiba.mwcloud.gs.common.GSConnectionException: [145028:JC_BAD_CONNECTION] Failed to update by notification (address=/239.0.0.1:31999, reason=Receive timed out)
  at com.toshiba.mwcloud.gs.subnet.NodeResolver.updateMasterInfo(NodeResolver.java:815)
  at com.toshiba.mwcloud.gs.subnet.NodeResolver.prepareConnectionAndClusterInfo(NodeResolver.java:522)
  at com.toshiba.mwcloud.gs.subnet.NodeResolver.getPartitionCount(NodeResolver.java:205)
  at com.toshiba.mwcloud.gs.subnet.GridStoreChannel$5.execute(GridStoreChannel.java:2106)
  at com.toshiba.mwcloud.gs.subnet.GridStoreChannel.executeStatement(GridStoreChannel.java:1675)
  ... 7 more
  Caused by: java.net.SocketTimeoutException: Receive timed out
  at java.net.PlainDatagramSocketImpl.receive0(Native Method)
  at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:143)
  at java.net.DatagramSocket.receive(DatagramSocket.java:812)
  at com.toshiba.mwcloud.gs.subnet.NodeResolver.updateMasterInfo(NodeResolver.java:756)
  ... 11 more</p>