ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Miron Aseev (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (IGNITE-2405) Ignite is blocking the thread in case it can't connect to the node
Date Sat, 13 Feb 2016 11:07:18 GMT

    [ https://issues.apache.org/jira/browse/IGNITE-2405?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15145925#comment-15145925
] 

Miron Aseev edited comment on IGNITE-2405 at 2/13/16 11:06 AM:
---------------------------------------------------------------

{quote}In any case your static IP finder is useless because it contains address and port of
one possible host. Why do you need this? {quote}
In this particular example, I could use the multicast discovery approach. But I've got another
use case when I have a bunch of interconnected servers. So I'd like to create isolated Ignite
clusters on a subset of the available machines by using static IP finder.

By the way, here's what Ignite's documentation says about static IP discovery:

{code}By default, the TcpDiscoveryVmIpFinder is used in non-shared mode. In this mode, the
**list of IP addresses should also contain the address of the local node**, so the node can
become the 1st node in the cluster, in case if other remote nodes have not been started yet.{code}

Basically, I didn't do anything wrong. I specified the local node address and tried to start
the Ignite node.

{quote}
Please do the following:
* set IgniteConfiguration.setLocalHost(host);
* ipFindes.addresses = host:47500..47520 
{quote}

Actually, when I did this:

{code}
configuration.setLocalHost(nodeHost);
{code}

and not specified any port or port range, everything is working perfectly. It's a bit strange
that documentation doesn't say anything about it.
I uploaded the latest version of the project on github.


was (Author: maseev):
??In any case your static IP finder is useless because it contains address and port of one
possible host. Why do you need this? ??
In this particular example, I could use the multicast discovery approach. But I've got another
use case when I have a bunch of interconnected servers. So I'd like to create isolated Ignite
clusters on a subset of the available machines by using static IP finder.

By the way, here's what Ignite's documentation says about static IP discovery:

??By default, the TcpDiscoveryVmIpFinder is used in non-shared mode. In this mode, the **list
of IP addresses should also contain the address of the local node**, so the node can become
the 1st node in the cluster, in case if other remote nodes have not been started yet.??

Basically, I didn't do anything wrong. I specified the local node address and tried to start
the Ignite node.

?? 
Please do the following:
* set IgniteConfiguration.setLocalHost(host);
* ipFindes.addresses = host:47500..47520 
??

Actually, when I did this:

{code}
configuration.setLocalHost(nodeHost);
{code}

and not specified any port or port range, everything is working perfectly. It's a bit strange
that documentation doesn't say anything about it.
I uploaded the latest version of the project on github.

> Ignite is blocking the thread in case it can't connect to the node
> ------------------------------------------------------------------
>
>                 Key: IGNITE-2405
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2405
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 1.5.0.final
>            Reporter: Miron Aseev
>              Labels: community, newbie
>         Attachments: log.out, log.out, log.out
>
>
> It seems that Apache Ignite runs an infinite loop if it can't connect to the resolved
hostname.
> For example, if you specify the hostname of the local machine as an address for the TCPSpi,
then Apache Ignite resolves it [here|https://github.com/apache/ignite/blob/b3d347e35a254928fd1c4a0473f1b17d642c72f3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java#L915].

> But after that, for some reasons, it fails to connect to the resolved address [here|https://github.com/apache/ignite/blob/b3d347e35a254928fd1c4a0473f1b17d642c72f3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java#L925].

> As a result, the control flow goes to the catch block where the exception is logged (It's
an IgniteSpiException. It seems it can't get acces to the host according to the exception
message - "Network operation timed out. Increase 'failureDetectionTimeout' configuration property
[failureDetectionTimeout=10000]"). 
> In the end, we get an infinite loop.
> On the other hand, If I set an ip address (127.0.0.1) instead of the hostname, Ignite
gets an empty list [here|https://github.com/apache/ignite/blob/b3d347e35a254928fd1c4a0473f1b17d642c72f3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java#L915]
and the control flow breaks the loop [here|https://github.com/apache/ignite/blob/b3d347e35a254928fd1c4a0473f1b17d642c72f3/modules/core/src/main/java/org/apache/ignite/spi/discovery/tcp/ServerImpl.java#L918]
and goes forward.
> Here's a log information which Ignite produces during its work.
> {code}
> Jan 19, 2016 7:33:02 PM java.util.logging.LogManager$RootLogger log
> SEVERE: Failed to resolve default logging config file: config/java.util.logging.properties
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: 
> >>>    __________  ________________  
> >>>   /  _/ ___/ |/ /  _/_  __/ __/  
> >>>  _/ // (7 7    // /  / / / _/    
> >>> /___/\___/_/|_/___/ /_/ /___/   
> >>> 
> >>> ver. 1.5.0-final#20151229-sha1:f1f8cda2
> >>> 2015 Copyright(C) Apache Software Foundation
> >>> 
> >>> Ignite documentation: http://ignite.apache.org
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Config URL: n/a
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Daemon mode: off
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: OS: Linux 3.13.0-74-generic amd64
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: OS user: maseev
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Language runtime: Java Platform API Specification ver. 1.8
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: VM information: Java(TM) SE Runtime Environment 1.8.0_40-b26 Oracle Corporation
Java HotSpot(TM) 64-Bit Server VM 25.40-b25
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: VM total memory: 3.5GB
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Remote Management [restart: off, REST: on, JMX (remote: off)]
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: IGNITE_HOME=null
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: VM arguments: [-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51947,suspend=y,server=n,
-ea, -DIGNITE_QUIET=false, -Didea.junit.sm_runner, -Dfile.encoding=UTF-8]
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Configured caches ['ignite-marshaller-sys-cache', 'ignite-sys-cache', 'ignite-atomics-sys-cache']
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger warning
> WARNING: Initial heap size is 250MB (should be no less than 512MB, use -Xms512m -Xmx512m).
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Non-loopback local IPs: 172.17.0.1, 192.168.88.252, fe80:0:0:0:42:2aff:feff:fe3d%docker0,
fe80:0:0:0:f2de:f1ff:feb6:5301%eth0
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Enabled local MACs: 02422AFFFE3D, F0DEF1B65301
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Configured plugins:
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO:   ^-- None
> Jan 19, 2016 7:33:03 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: 
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: IPC shared memory server endpoint started [port=48103, tokDir=/tmp/ignite/work/ipc/shmem/62396752-fb2f-4402-bff6-9f5f2d4fc0b3-8658]
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Successfully bound shared memory communication to TCP port [port=48103, locHost=0.0.0.0/0.0.0.0]
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Successfully bound to TCP port [port=47103, locHost=0.0.0.0/0.0.0.0]
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger warning
> WARNING: Checkpoints are disabled (to enable configure any GridCheckpointSpi implementation)
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger warning
> WARNING: Collision resolution is disabled (all jobs will be activated upon arrival).
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger warning
> WARNING: Swap space is disabled. To enable use FileSwapSpaceSpi.
> Jan 19, 2016 7:33:04 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Security status [authentication=off, tls/ssl=off]
> Jan 19, 2016 7:33:05 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Command protocol successfully started [name=TCP binary, host=0.0.0.0/0.0.0.0, port=11214]
> Jan 19, 2016 7:33:05 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Successfully bound to TCP port [port=47503, localHost=0.0.0.0/0.0.0.0]
> Jan 19, 2016 7:33:13 PM org.apache.ignite.logger.java.JavaLogger info
> INFO: Your version is up to date.
> {code}
> And here's a simple [test|https://github.com/maseev/ignite/blob/master/src/test/java/io/github/maseev/IgniteTest.java#L23]
which reproduces the problem. You can run it with maven by executing it with {code}mvn test{code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message