Re: Failed to connect to any address from IP finder

2018-07-21 Thread anand
Thanks @vkulichenko. 
I have tried that earlier giving range from 47000..48000. I will try it
again and update here.
For now, I have updated ignite version to 2.6.0 and it' working fine. Though
I would love to know what was issue with 2.5.0.

Best.
Anand



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Apache Flink Sink + Ignite: Ouch! Argument is invalid

2018-07-21 Thread Saikat Maitra
Hi Ray, Andrew

As discussed I have fixed the issue with IgniteSink when running in cluster
mode.

Please review the below PR and share feedback.

PR : https://github.com/apache/ignite/pull/4398
Review : https://reviews.ignite.apache.org/ignite/review/IGNT-CR-695

Regards,
Saikat




On Mon, Jul 16, 2018 at 10:47 PM, Saikat Maitra 
wrote:

> Hi Ray,
>
> Thank you for validating the changes, I see that in cluster mode when I am
> checking the IgniteSink it is working as desired. In stand alone mode I can
> see we are getting the exception class org.apache.ignite.IgniteException:
> Default Ignite instance has already been started.
>
> Please take a look into this sample application https://github.
> com/samaitra/streamers which I used to run it with flink in cluster mode.
>
> I am considering if I should make changes to run the IgniteSink in client
> mode similar to the ways flink connector for redis and flume were
> implemented in Apache Bahir
>
> https://github.com/apache/bahir-flink
>
> I will share update soon.
>
> Regards,
> Saikat
>
>
>
> On Sun, Jul 15, 2018 at 10:07 PM, Ray  wrote:
>
>> Hello Saikat,
>>
>> I tried your newest code and wrote a simple word count application to test
>> the sink.
>> It appears there's still problems.
>> Here's my code.
>>
>>
>>
>> import org.apache.flink.api.scala._
>> import org.apache.flink.streaming.api.scala.StreamExecutionEnvironment
>> import org.apache.flink.streaming.api.scala.extensions._
>> import org.apache.flink.configuration.Configuration
>> import org.apache.ignite.Ignition
>> import org.apache.ignite.configuration.CacheConfiguration
>>
>> import scala.collection.JavaConverters._
>>
>>
>> object WordCount {
>>
>> def main(args: Array[String]) {
>>
>> val ignite = Ignition.start("ignite.xml")
>> val cacheConfig = new CacheConfiguration[Any, Any]()
>> ignite.destroyCache("aaa")
>> cacheConfig.setName("aaa")
>> cacheConfig.setSqlSchema("PUBLIC")
>> ignite.createCache(cacheConfig)
>> ignite.close()
>>
>>
>> // set up the execution environment
>> val env = StreamExecutionEnvironment.get
>> ExecutionEnvironment
>>
>> val igniteSink = new IgniteSink[java.util.Map[String,
>> Int]]("aaa",
>> "ignite.xml")
>>
>> igniteSink.setAllowOverwrite(false)
>> igniteSink.setAutoFlushFrequency(1)
>>
>> igniteSink.open(new Configuration)
>>
>>
>> // get input data
>> val text = env.fromElements(
>> "To be, or not to be,--that is the question:--",
>> "Whether 'tis nobler in the mind to suffer",
>> "The slings and arrows of outrageous fortune",
>> "Or to take arms against a sea of troubles,")
>>
>>
>> val counts = text
>> // split up the lines in pairs (2-tuples)
>> containing: (word,1)
>> .flatMap(_.toLowerCase.split("\\W+"))
>> .filter(_.nonEmpty)
>> .map((_, 1))
>> // group by the tuple field "0" and sum up tuple
>> field "1"
>> .keyBy(0)
>> .sum(1)
>> // Convert to key/value format before ingesting
>> to Ignite
>> .mapWith { case (k: String, v: Int) => Map(k ->
>> v).asJava }
>> .addSink(igniteSink)
>>
>> try
>> env.execute("Streaming WordCount1")
>> catch {
>> case e: Exception =>
>>
>> // Exception handling.
>> } finally igniteSink.close()
>>
>> }
>> }
>>
>> I tried running this application in Idea and the error log snippet is as
>> follows
>>
>> 07/16/2018 11:05:30 aggregation -> Map -> Sink: Unnamed(4/8) switched
>> to
>> FAILED
>> class org.apache.ignite.IgniteException: Default Ignite instance has
>> already
>> been started.
>> at
>> org.apache.ignite.internal.util.IgniteUtils.convertException
>> (IgniteUtils.java:990)
>> at org.apache.ignite.Ignition.start(Ignition.java:355)
>> at IgniteSink.open(IgniteSink.java:135)
>> at
>> org.apache.flink.api.common.functions.util.FunctionUtils.ope
>> nFunction(FunctionUtils.java:36)
>> at
>> org.apache.flink.streaming.api.operators.AbstractUdfStreamOp
>> erator.open(AbstractUdfStreamOperator.java:111)
>> at
>> org.apache.flink.streaming.runtime.tasks.StreamTask.openAllO
>> perators(StreamTask.java:376)
>> at
>> org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(
>> StreamTask.java:253)
>> at org.apache.flink.runtime.taskmanager.Task.run(Task.java:702)
>> at java.lang.Thread.run(Thread.java:745)
>> Caused by: class org.apache.ignite.Ign

Re: Failed to connect to any address from IP finder

2018-07-21 Thread vkulichenko
You server node bound to port 47501 rather than 47500 for some reason (most
likely the latter was occupied by some other process). Try to add port range
to the IP finder on client side. Replace this line:

ipFinder.setAddresses(Arrays.asList("127.0.0.1", "172.20.98.77"));

with this:

ipFinder.setAddresses(Arrays.asList("172.20.98.77:47500..47509"));

-Val



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Failed to connect to any address from IP finder

2018-07-21 Thread anand
Hi All,
I have been through all related thread before posting this message. I'm
facing this issue while running application on CentOS but working fine in
MacOS. any help would be great.

issue: Failed to connect to any address from IP finder (will retry to
join topology every 2000 ms; change 'reconnectDelay' to configure the
frequency of retries): [/127.0.0.1:47500, /172.20.98.77:47500]
   
Details: both the client and server running on same machine. Client node
started using java code while server node started using ignite.sh. please
find attached log.
 
client debug log :   client-debug.log
  
client info log :  client-info.log
  
client config :  client-config.client-config

  

server log :   server-debug.log
  
server config :  server-config.server-config

  

Best.
Anand
  








--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/


Re: Ignite Cluster behind one Public IP address

2018-07-21 Thread Dave Harvey
You could add a mode that you  bind the IP address to, and start two ignite
client nodes on the that node, each using a different port for JDBC, etc.

On Fri, Jul 20, 2018 at 1:13 PM, Ilya Kasnacheev 
wrote:

> Hello!
>
> With such configuration you can only use 'thin' Ignite clients, such as
> JDBC, ODBC, REST, etc.
>
> Ignite nodes (including client nodes) need to be able to communicate to
> every node in the cluster, not just one of them.
>
> Regards,
>
> --
> Ilya Kasnacheev
>
> 2018-07-20 18:37 GMT+03:00 JohnDeIgnite :
>
>> Hi there,
>>
>> Thanks for that great product.
>>
>> My question is:
>>
>> How can I access my Ignite Cluster which is behind one Public IP address?
>>
>> For example:
>>
>> My Cluster provider gave me one Floating IP (123.456.789.111) what can
>> bind
>> to any of my Ignite Worker machines.
>> Anyone has its own local IP address like 192.168.0.1, 192.168.0.2, etc.
>>
>> I can access ( can work each of them if the floating (public) IP is bind
>> to
>> one of them, example 123.456.789.111 -> 192.168.0.5 )
>>
>> But as far as I start a second Ignite Server, this schema does not work
>> any
>> more.
>>
>> I made some changes in the configuration:
>>
>>
>>
>>
>> On the servers default-config.xml looks like:
>>
>> //
>> 
>> -
>>
>> > class="org.apache.ignite.configuration.IgniteConfiguration">
>> 
>> 
>> 
>>  
>>  
>>  
>>
>>  
>>  
>>  
>>  
>> 
>> 
>> > class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
>>
>> 
>> 
>> > class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicas
>> t.TcpDiscoveryMulticastIpFinder">
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> //
>> 
>> -
>>
>>
>>
>> My client config looks like:
>>
>> IgniteConfiguration configuration = new IgniteConfiguration();
>> configuration.setClientMode(true);
>> configuration.setPeerClassLoadingEnabled(true);
>>
>> TcpDiscoverySpi tcpDiscoverySpi = new TcpDiscoverySpi();
>>
>> TcpDiscoveryMulticastIpFinder tcpDiscoveryMulticastIpFinder = new
>> TcpDiscoveryMulticastIpFinder();
>>
>> tcpDiscoveryMulticastIpFinder.setAddresses(Arrays.asList("12
>> 3.456.789.111"));
>> tcpDiscoveryMulticastIpFinder.setMulticastGroup("228.10.10.5");
>> //tcpDiscoveryMulticastIpFinder.setShared(true);
>>
>> tcpDiscoverySpi.setIpFinder(tcpDiscoveryMulticastIpFinder);
>>
>> configuration.setDiscoverySpi(tcpDiscoverySpi);
>> configuration.setFailureDetectionTimeout(15000);
>> configuration.setClientFailureDetectionTimeout(15000);
>>
>> //
>> 
>> -
>>
>> Addition:
>>
>> ignitevisor can see both server and a client also, but ignite works
>> properly
>> only when
>> one server run on the cluster-
>>
>> Can you help me to solve this?
>>
>> Thank You in advance.
>>
>>
>>
>>
>> --
>> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>>
>
>

Disclaimer

The information contained in this communication from the sender is 
confidential. It is intended solely for use by the recipient and others 
authorized to receive it. If you are not the recipient, you are hereby notified 
that any disclosure, copying, distribution or taking action in relation of the 
contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been 
automatically archived by Mimecast Ltd, an innovator in Software as a Service 
(SaaS) for business. Providing a safer and more useful place for your human 
generated data. Specializing in; Security, archiving and compliance. To find 
out more visit the Mimecast website.