Connection Refused in Scala Ignite Client (Help!)

classic Classic list List threaded Threaded
7 messages Options
sri hari kali charan Tummala sri hari kali charan Tummala
Reply | Threaded
Open this post in threaded view
|

Connection Refused in Scala Ignite Client (Help!)

Hi All, 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

In my security group I opened all the ports still I am having issues can anyone help.

Error:-
Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

Scala Code:-
package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
def main(args: Array[String]): Unit = {

System.out.println()
System.out.println(">>> Thin client put-get example started.")
System.out.println(">>> I am here.")

val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
val igniteClient:IgniteClient = Ignition.startClient(cfg2)
val CACHE_NAME = "put-get-example";
//val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



}

}

--
Thanks & Regards
Sri Tummala


Screen Shot 2019-10-16 at 5.53.50 PM.png (149K) Download Attachment
akorensh akorensh
Reply | Threaded
Open this post in threaded view
|

RE: Connection Refused in Scala Ignite Client (Help!)

Hi,

   Try using the S3 IP Finder: https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

  <property name="discoverySpi">

    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">

      <property name="ipFinder">

        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">

          <property name="awsCredentials" ref="aws.creds"/>

          <property name="bucketName" value="YOUR_BUCKET_NAME"/>

        </bean>

      </property>

    </bean>

  </property>

 

Thanks, Alex

 

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 5:55 PM
To: [hidden email]
Subject: Connection Refused in Scala Ignite Client (Help!)

 

Hi All, 

 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

 

In my security group I opened all the ports still I am having issues can anyone help.

 

Error:-

Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

 

Scala Code:-

package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
 
def main(args: Array[String]): Unit = {

    System.
out.println()
    System.
out.println(">>> Thin client put-get example started.")
    System.
out.println(">>> I am here.")

   
val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
   
val igniteClient:IgniteClient = Ignition.startClient(cfg2)
   
val CACHE_NAME = "put-get-example";
   
//val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

   
System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



  }

}

 

--

Thanks & Regards

Sri Tummala

 

sri hari kali charan Tummala sri hari kali charan Tummala
Reply | Threaded
Open this post in threaded view
|

Re: Connection Refused in Scala Ignite Client (Help!)

Do I need to keep any file inside the s3 bucket or is it just a empty bucket ? With aws credentials and bucket name ?



On Wednesday, October 16, 2019, <[hidden email]> wrote:

Hi,

   Try using the S3 IP Finder: https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

  <property name="discoverySpi">

    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">

      <property name="ipFinder">

        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">

          <property name="awsCredentials" ref="aws.creds"/>

          <property name="bucketName" value="YOUR_BUCKET_NAME"/>

        </bean>

      </property>

    </bean>

  </property>

 

Thanks, Alex

 

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 5:55 PM
To: [hidden email]
Subject: Connection Refused in Scala Ignite Client (Help!)

 

Hi All, 

 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

 

In my security group I opened all the ports still I am having issues can anyone help.

 

Error:-

Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

 

Scala Code:-

package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
 
def main(args: Array[String]): Unit = {

    System.
out.println()
    System.
out.println(">>> Thin client put-get example started.")
    System.
out.println(">>> I am here.")

   
val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
   
val igniteClient:IgniteClient = Ignition.startClient(cfg2)
   
val CACHE_NAME = "put-get-example";
   
//val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

   
System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



  }

}

 

--

Thanks & Regards

Sri Tummala

 



--
Thanks & Regards
Sri Tummala


sri hari kali charan Tummala sri hari kali charan Tummala
Reply | Threaded
Open this post in threaded view
|

Re: Connection Refused in Scala Ignite Client (Help!)

I this below property is while launching ignite on aws 
I already have ignite cluster running I just need to connect using java or Scala code which is failing with  connection refused error.

https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery



On Wednesday, October 16, 2019, sri hari kali charan Tummala <[hidden email]> wrote:
Do I need to keep any file inside the s3 bucket or is it just a empty bucket ? With aws credentials and bucket name ?



On Wednesday, October 16, 2019, <[hidden email]> wrote:

Hi,

   Try using the S3 IP Finder: https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

  <property name="discoverySpi">

    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">

      <property name="ipFinder">

        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">

          <property name="awsCredentials" ref="aws.creds"/>

          <property name="bucketName" value="YOUR_BUCKET_NAME"/>

        </bean>

      </property>

    </bean>

  </property>

 

Thanks, Alex

 

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 5:55 PM
To: [hidden email]
Subject: Connection Refused in Scala Ignite Client (Help!)

 

Hi All, 

 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

 

In my security group I opened all the ports still I am having issues can anyone help.

 

Error:-

Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

 

Scala Code:-

package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
 
def main(args: Array[String]): Unit = {

    System.
out.println()
    System.
out.println(">>> Thin client put-get example started.")
    System.
out.println(">>> I am here.")

   
val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
   
val igniteClient:IgniteClient = Ignition.startClient(cfg2)
   
val CACHE_NAME = "put-get-example";
   
//val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

   
System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



  }

}

 

--

Thanks & Regards

Sri Tummala

 



--
Thanks & Regards
Sri Tummala




--
Thanks & Regards
Sri Tummala


akorensh akorensh
Reply | Threaded
Open this post in threaded view
|

RE: Connection Refused in Scala Ignite Client (Help!)

You need to replace the ip finder on all nodes to use the s3 one.

add the libraries from libs/optional/ignite-aws to your application's classpath.

No file is required.

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 8:10 PM
To: [hidden email]; [hidden email]
Subject: Re: Connection Refused in Scala Ignite Client (Help!)

 

I this below property is while launching ignite on aws 

I already have ignite cluster running I just need to connect using java or Scala code which is failing with  connection refused error.


https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

 

 

On Wednesday, October 16, 2019, sri hari kali charan Tummala <[hidden email]> wrote:

Do I need to keep any file inside the s3 bucket or is it just a empty bucket ? With aws credentials and bucket name ?

 



On Wednesday, October 16, 2019, <[hidden email]> wrote:

Hi,

   Try using the S3 IP Finder: https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

  <property name="discoverySpi">

    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">

      <property name="ipFinder">

        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">

          <property name="awsCredentials" ref="aws.creds"/>

          <property name="bucketName" value="YOUR_BUCKET_NAME"/>

        </bean>

      </property>

    </bean>

  </property>

 

Thanks, Alex

 

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 5:55 PM
To: [hidden email]
Subject: Connection Refused in Scala Ignite Client (Help!)

 

Hi All, 

 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

 

In my security group I opened all the ports still I am having issues can anyone help.

 

Error:-

Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

 

Scala Code:-

package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
 
def main(args: Array[String]): Unit = {

    System.
out.println()
    System.
out.println(">>> Thin client put-get example started.")
    System.
out.println(">>> I am here.")

   
val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
   
val igniteClient:IgniteClient = Ignition.startClient(cfg2)
   
val CACHE_NAME = "put-get-example";
   
//val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

   
System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



  }

}

 

--

Thanks & Regards

Sri Tummala

 



--
Thanks & Regards

Sri Tummala

 

 



--
Thanks & Regards

Sri Tummala

 

 

Artem Budnikov Artem Budnikov
Reply | Threaded
Open this post in threaded view
|

Re: Connection Refused in Scala Ignite Client (Help!)

Hi,

Looks like you are trying to connect to the wrong port. The default port for client connection is 10800.

Change:

val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")

to

val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:10800")


-Artem

On 17.10.2019 03:39, [hidden email] wrote:

You need to replace the ip finder on all nodes to use the s3 one.

add the libraries from libs/optional/ignite-aws to your application's classpath.

No file is required.

 

From: sri hari kali charan Tummala [hidden email]
Sent: Wednesday, October 16, 2019 8:10 PM
To: [hidden email]; [hidden email]
Subject: Re: Connection Refused in Scala Ignite Client (Help!)

 

I this below property is while launching ignite on aws 

I already have ignite cluster running I just need to connect using java or Scala code which is failing with  connection refused error.


https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

 

 

On Wednesday, October 16, 2019, sri hari kali charan Tummala <[hidden email]> wrote:

Do I need to keep any file inside the s3 bucket or is it just a empty bucket ? With aws credentials and bucket name ?

 



On Wednesday, October 16, 2019, <[hidden email]> wrote:

Hi,

   Try using the S3 IP Finder: https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

  <property name="discoverySpi">

    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">

      <property name="ipFinder">

        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">

          <property name="awsCredentials" ref="aws.creds"/>

          <property name="bucketName" value="YOUR_BUCKET_NAME"/>

        </bean>

      </property>

    </bean>

  </property>

 

Thanks, Alex

 

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 5:55 PM
To: [hidden email]
Subject: Connection Refused in Scala Ignite Client (Help!)

 

Hi All, 

 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

 

In my security group I opened all the ports still I am having issues can anyone help.

 

Error:-

Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

 

Scala Code:-

package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
  def main(args: Array[String]): Unit = {

    System.out.println()
    System.out.println(">>> Thin client put-get example started.")
    System.out.println(">>> I am here.")

    val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
    val igniteClient:IgniteClient = Ignition.startClient(cfg2)
    val CACHE_NAME = "put-get-example";
    //val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

    System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



  }

}

 

--

Thanks & Regards

Sri Tummala

 



--
Thanks & Regards

Sri Tummala

 

 



--
Thanks & Regards

Sri Tummala

 

 

sri hari kali charan Tummala sri hari kali charan Tummala
Reply | Threaded
Open this post in threaded view
|

Re: Connection Refused in Scala Ignite Client (Help!)

worked like a charm, thank you.

On Thu, Oct 17, 2019 at 2:54 AM Artem Budnikov <[hidden email]> wrote:

Hi,

Looks like you are trying to connect to the wrong port. The default port for client connection is 10800.

Change:

val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")

to

val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:10800")


-Artem

On 17.10.2019 03:39, [hidden email] wrote:

You need to replace the ip finder on all nodes to use the s3 one.

add the libraries from libs/optional/ignite-aws to your application's classpath.

No file is required.

 

From: sri hari kali charan Tummala [hidden email]
Sent: Wednesday, October 16, 2019 8:10 PM
To: [hidden email]; [hidden email]
Subject: Re: Connection Refused in Scala Ignite Client (Help!)

 

I this below property is while launching ignite on aws 

I already have ignite cluster running I just need to connect using java or Scala code which is failing with  connection refused error.


https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

 

 

On Wednesday, October 16, 2019, sri hari kali charan Tummala <[hidden email]> wrote:

Do I need to keep any file inside the s3 bucket or is it just a empty bucket ? With aws credentials and bucket name ?

 



On Wednesday, October 16, 2019, <[hidden email]> wrote:

Hi,

   Try using the S3 IP Finder: https://apacheignite-mix.readme.io/docs/amazon-aws#section-amazon-s3-based-discovery

 

  <property name="discoverySpi">

    <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">

      <property name="ipFinder">

        <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.s3.TcpDiscoveryS3IpFinder">

          <property name="awsCredentials" ref="aws.creds"/>

          <property name="bucketName" value="YOUR_BUCKET_NAME"/>

        </bean>

      </property>

    </bean>

  </property>

 

Thanks, Alex

 

 

From: sri hari kali charan Tummala <[hidden email]>
Sent: Wednesday, October 16, 2019 5:55 PM
To: [hidden email]
Subject: Connection Refused in Scala Ignite Client (Help!)

 

Hi All, 

 

I am trying to connect my ignite cluster which is created on AWS (), now I am suing scala code to connect to the client which is failing with connection refused error.

 

In my security group I opened all the ports still I am having issues can anyone help.

 

Error:-

Exception in thread "main" org.apache.ignite.client.ClientConnectionException: Ignite cluster is unavailable
at org.apache.i
gnite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:114)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.lambda$new$0(TcpIgniteClient.java:79)
at org.apache.ignite.internal.client.thin.ReliableChannel.<init>(ReliableChannel.java:84)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.<init>(TcpIgniteClient.java:86)
at org.apache.ignite.internal.client.thin.TcpIgniteClient.start(TcpIgniteClient.java:205)
at org.apache.ignite.Ignition.startClient(Ignition.java:586)
at com.ignite.examples.igniteStartup.IgniteClientConnection$.main(IgniteClientConnection.scala:36)
at com.ignite.examples.igniteStartup.IgniteClientConnection.main(IgniteClientConnection.scala)
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at java.net.Socket.connect(Socket.java:538)
at java.net.Socket.<init>(Socket.java:434)
at java.net.Socket.<init>(Socket.java:211)
at org.apache.ignite.internal.client.thin.TcpClientChannel.createSocket(TcpClientChannel.java:216)
at org.apache.ignite.internal.client.thin.TcpClientChannel.<init>(TcpClientChannel.java:108)
... 7 more

 

Scala Code:-

package com.ignite.examples.igniteStartup

import org.apache.ignite.Ignite
import org.apache.ignite.IgniteCache
import org.apache.ignite.Ignition
import org.apache.ignite.configuration.{ClientConfiguration, IgniteConfiguration}
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import org.apache.ignite.configuration.IgniteConfiguration
import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi
import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder
import java.util.Arrays
import java.util.List
import com.ignite.examples.model.Address
import org.apache.ignite.client.{ClientCache, IgniteClient}

import scala.collection.JavaConversions._

object IgniteClientConnection {
  def main(args: Array[String]): Unit = {

    System.out.println()
    System.out.println(">>> Thin client put-get example started.")
    System.out.println(">>> I am here.")

    val cfg2 = new ClientConfiguration().setAddresses("100.25.173.220:47100..47700")
    val igniteClient:IgniteClient = Ignition.startClient(cfg2)
    val CACHE_NAME = "put-get-example";
    //val cache:ClientCache[Integer, Address] = igniteClient.getOrCreateCache(CACHE_NAME)

    System.out.format(">>> Created cache [%s].\n", CACHE_NAME)



  }

}

 

--

Thanks & Regards

Sri Tummala

 



--
Thanks & Regards

Sri Tummala

 

 



--
Thanks & Regards

Sri Tummala

 

 



--
Thanks & Regards
Sri Tummala