[jira] [Updated] (IGNITE-7939) .NET client node throws IgniteClientDisconnectedCheckedException when listening to EVT_CLIENT_NODE_DISCONNECTED and all Java server nodes exit

2018-05-07 Thread Vladimir Ozerov (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-7939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Vladimir Ozerov updated IGNITE-7939:

Component/s: (was: 2.3)

> .NET client node throws IgniteClientDisconnectedCheckedException when 
> listening to EVT_CLIENT_NODE_DISCONNECTED and all Java server nodes exit
> --
>
> Key: IGNITE-7939
> URL: https://issues.apache.org/jira/browse/IGNITE-7939
> Project: Ignite
>  Issue Type: Bug
>  Components: messaging, platforms
>Affects Versions: 2.3
> Environment: .NET and JVM Ignite nodes running on the same Windows 7 
> 6.1 amd64 machine.
> Server node: Ignite JVM
> Client node: Ignite.NET
>Reporter: Kevin Jin
>Priority: Minor
> Fix For: None
>
>   Original Estimate: 672h
>  Remaining Estimate: 672h
>
> I'm using the following Java code to start an Ignite server node:
> {code:title=IgniteDotNetEventExample.java|borderStyle=solid}
> import org.apache.ignite.Ignite;
> import org.apache.ignite.Ignition;
> import org.apache.ignite.configuration.DataRegionConfiguration;
> import org.apache.ignite.configuration.DataStorageConfiguration;
> import org.apache.ignite.configuration.IgniteConfiguration;
> import org.apache.ignite.events.EventType;
> import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
> import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
> import java.io.IOException;
> import java.util.Collections;
> public class IgniteDotNetEventExample {
> @SuppressWarnings("Duplicates")
> private static Ignite startLocalIgniteServer() {
> IgniteConfiguration cfg = new IgniteConfiguration();
> // Do not persist the database to the disk.
> cfg.setDataStorageConfiguration(new 
> DataStorageConfiguration().setDefaultDataRegionConfiguration(new 
> DataRegionConfiguration().setPersistenceEnabled(false)));
> // Only discover other cluster nodes on the same machine.
> cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(new 
> TcpDiscoveryVmIpFinder(true).setAddresses(Collections.singletonList("127.0.0.1";
> cfg.setIncludeEventTypes(EventType.EVT_CLIENT_NODE_DISCONNECTED, 
> EventType.EVT_CLIENT_NODE_RECONNECTED);
> cfg.setClientMode(false);
> return Ignition.start(cfg);
> }
> @SuppressWarnings({"try","unused"})
> public static void main(String[] args) throws IOException {
> try (Ignite ignite = startLocalIgniteServer()) {
> //noinspection ResultOfMethodCallIgnored
> System.in.read();
> }
> }
> }
> {code}
> I'm using the following C# code to start an Ignite client node:
> {code:title=IgniteDotNetEventExample.cs|borderStyle=solid}
> using Apache.Ignite.Core;
> using Apache.Ignite.Core.Configuration;
> using Apache.Ignite.Core.Discovery.Tcp;
> using Apache.Ignite.Core.Discovery.Tcp.Static;
> using Apache.Ignite.Core.Events;
> using System;
> using System.Threading;
> internal class DelegateBackedEventListener : IEventListener where T : 
> IEvent
> {
> private Func handler;
> internal DelegateBackedEventListener(Func handler)
> {
> this.handler = handler;
> }
> public bool Invoke(T evt)
> {
> return handler(evt);
> }
> }
> class IgniteDotNetEventExample
> {
> private static IIgnite StartLocalIgniteServer()
> {
> if (Environment.GetEnvironmentVariable("JAVA_HOME") == null)
> {
> if (Environment.Is64BitProcess)
> Environment.SetEnvironmentVariable("JAVA_HOME", @"C:\Program 
> Files\jdk\1.8");
> else
> Environment.SetEnvironmentVariable("JAVA_HOME", @"C:\Program 
> Files (x86)\jdk\1.8");
> }
> var cfg = new IgniteConfiguration()
> {
> DataStorageConfiguration = new DataStorageConfiguration()
> {
> DefaultDataRegionConfiguration = new DataRegionConfiguration()
> {
> Name = "default",
> PersistenceEnabled = false
> }
> },
> DiscoverySpi = new TcpDiscoverySpi
> {
> IpFinder = new TcpDiscoveryStaticIpFinder
> {
> Endpoints = new string[] { "127.0.0.1" }
> }
> },
> IncludedEventTypes = new int[] {
> EventType.ClientNodeDisconnected, 
> EventType.ClientNodeReconnected
> },
> ClientMode = true
> };
> return Ignition.Start(cfg);
> }
> public static void Main(string[] args)
> {
> using (IIgnite ignite = StartLocalIgniteServer())
> {
> ignite.GetEv

[jira] [Updated] (IGNITE-7939) .NET client node throws IgniteClientDisconnectedCheckedException when listening to EVT_CLIENT_NODE_DISCONNECTED and all Java server nodes exit

2018-03-13 Thread Kevin Jin (JIRA)

 [ 
https://issues.apache.org/jira/browse/IGNITE-7939?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Kevin Jin updated IGNITE-7939:
--
Environment: 
.NET and JVM Ignite nodes running on the same Windows 7 6.1 amd64 machine.

Server node: Ignite JVM

Client node: Ignite.NET

  was:
.NET and JVM Ignite nodes running on the same Windows 7 6.1 am64 machine.

Server node: Ignite JVM

Client node: Ignite.NET


> .NET client node throws IgniteClientDisconnectedCheckedException when 
> listening to EVT_CLIENT_NODE_DISCONNECTED and all Java server nodes exit
> --
>
> Key: IGNITE-7939
> URL: https://issues.apache.org/jira/browse/IGNITE-7939
> Project: Ignite
>  Issue Type: Bug
>  Components: 2.3, messaging, platforms
>Affects Versions: 2.3
> Environment: .NET and JVM Ignite nodes running on the same Windows 7 
> 6.1 amd64 machine.
> Server node: Ignite JVM
> Client node: Ignite.NET
>Reporter: Kevin Jin
>Priority: Minor
> Fix For: None
>
>   Original Estimate: 672h
>  Remaining Estimate: 672h
>
> I'm using the following Java code to start an Ignite server node:
> {code:title=IgniteDotNetEventExample.java|borderStyle=solid}
> import org.apache.ignite.Ignite;
> import org.apache.ignite.Ignition;
> import org.apache.ignite.configuration.DataRegionConfiguration;
> import org.apache.ignite.configuration.DataStorageConfiguration;
> import org.apache.ignite.configuration.IgniteConfiguration;
> import org.apache.ignite.events.EventType;
> import org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi;
> import org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder;
> import java.io.IOException;
> import java.util.Collections;
> public class IgniteDotNetEventExample {
> @SuppressWarnings("Duplicates")
> private static Ignite startLocalIgniteServer() {
> IgniteConfiguration cfg = new IgniteConfiguration();
> // Do not persist the database to the disk.
> cfg.setDataStorageConfiguration(new 
> DataStorageConfiguration().setDefaultDataRegionConfiguration(new 
> DataRegionConfiguration().setPersistenceEnabled(false)));
> // Only discover other cluster nodes on the same machine.
> cfg.setDiscoverySpi(new TcpDiscoverySpi().setIpFinder(new 
> TcpDiscoveryVmIpFinder(true).setAddresses(Collections.singletonList("127.0.0.1";
> cfg.setIncludeEventTypes(EventType.EVT_CLIENT_NODE_DISCONNECTED, 
> EventType.EVT_CLIENT_NODE_RECONNECTED);
> cfg.setClientMode(false);
> return Ignition.start(cfg);
> }
> @SuppressWarnings({"try","unused"})
> public static void main(String[] args) throws IOException {
> try (Ignite ignite = startLocalIgniteServer()) {
> //noinspection ResultOfMethodCallIgnored
> System.in.read();
> }
> }
> }
> {code}
> I'm using the following C# code to start an Ignite client node:
> {code:title=IgniteDotNetEventExample.cs|borderStyle=solid}
> using Apache.Ignite.Core;
> using Apache.Ignite.Core.Configuration;
> using Apache.Ignite.Core.Discovery.Tcp;
> using Apache.Ignite.Core.Discovery.Tcp.Static;
> using Apache.Ignite.Core.Events;
> using System;
> using System.Threading;
> internal class DelegateBackedEventListener : IEventListener where T : 
> IEvent
> {
> private Func handler;
> internal DelegateBackedEventListener(Func handler)
> {
> this.handler = handler;
> }
> public bool Invoke(T evt)
> {
> return handler(evt);
> }
> }
> class IgniteDotNetEventExample
> {
> private static IIgnite StartLocalIgniteServer()
> {
> if (Environment.GetEnvironmentVariable("JAVA_HOME") == null)
> {
> if (Environment.Is64BitProcess)
> Environment.SetEnvironmentVariable("JAVA_HOME", @"C:\Program 
> Files\jdk\1.8");
> else
> Environment.SetEnvironmentVariable("JAVA_HOME", @"C:\Program 
> Files (x86)\jdk\1.8");
> }
> var cfg = new IgniteConfiguration()
> {
> DataStorageConfiguration = new DataStorageConfiguration()
> {
> DefaultDataRegionConfiguration = new DataRegionConfiguration()
> {
> Name = "default",
> PersistenceEnabled = false
> }
> },
> DiscoverySpi = new TcpDiscoverySpi
> {
> IpFinder = new TcpDiscoveryStaticIpFinder
> {
> Endpoints = new string[] { "127.0.0.1" }
> }
> },
> IncludedEventTypes = new int[] {
> EventType.ClientNodeDisconnected, 
> EventType.ClientNodeReconnected
> },
>