title: Exception in GridDB JAVA API
body: <p>I've installed GridDB on Ubuntu. I use 2 computers: first computer is used as GridDB server, second as java Client and when i try to connect to GriDB from second computer it throws Exception, but when I run java code in server side it works completely fine. What's the problem? I use this <a href="https://griddb.net/en/docs/documents/2-2-1_installation_linux.php" rel="nofollow noreferrer">tutorial</a>.</p>
  
  <p>Here is simple java code:</p>
  
  <pre><code>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("notificationAddress", "239.0.0.1");
          props.setProperty("notificationPort", "31999");
          props.setProperty("clusterName", "defaultCluster");
          props.setProperty("user", "admin");
          props.setProperty("password", "admin");
          GridStore store = GridStoreFactory.getInstance().getGridStore(props);
  
          // Create a Collection (Delete if schema setting is NULL)
          Collection&lt;String, Person&gt; col = store.putCollection("col01", Person.class);
  
  
      }
  
  }
  </code></pre>
  
  <p>here is Exception, when i try to connect from second computer: </p>
  
  <pre><code>com.toshiba.mwcloud.gs.common.GSConnectionException: [145028:JC_BAD_CONNECTION] Failed to connect (address=/127.0.1.1:10001, reason=Connection refused: connect)
      at com.toshiba.mwcloud.gs.subnet.NodeConnection.&lt;init&gt;(NodeConnection.java:142)
      at com.toshiba.mwcloud.gs.subnet.NodeConnectionPool.resolve(NodeConnectionPool.java:163)
      at com.toshiba.mwcloud.gs.subnet.NodeResolver.updateConnectionAndClusterInfo(NodeResolver.java:644)
      at com.toshiba.mwcloud.gs.subnet.NodeResolver.prepareConnectionAndClusterInfo(NodeResolver.java:529)
      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)
      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 pac.Main.main(Main.java:39)
  Caused by: java.net.ConnectException: Connection refused: connect
      at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
      at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
      at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
      at java.net.PlainSocketImpl.connect(Unknown Source)
      at java.net.SocksSocketImpl.connect(Unknown Source)
      at java.net.Socket.connect(Unknown Source)
      at com.toshiba.mwcloud.gs.subnet.NodeConnection.&lt;init&gt;(NodeConnection.java:129)
      ... 13 more
  </code></pre>