You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by gunman524 <gu...@126.com> on 2017/11/17 08:43:45 UTC

Failed to connect to address issue

Hi there,

My cluster always has the exception like below

at
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.processDiscoveryMessage(ClientImpl.java:1874)
[ignite-core-2.3.0.jar!/:2.3.0]
        at
org.apache.ignite.spi.discovery.tcp.ClientImpl$MessageWorker.body(ClientImpl.java:1758)
[ignite-core-2.3.0.jar!/:2.3.0]
        at
org.apache.ignite.spi.IgniteSpiThread.run(IgniteSpiThread.java:62)
[ignite-core-2.3.0.jar!/:2.3.0]
    Caused by:
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$HandshakeException:
*Remote node ID is not as expected
*[expected=367d0c21-90d8-4717-a909-593392dd9ba1,
rcvd=4903508d-2b22-4fbc-88ad-01cd9f17f364]
        at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.safeHandshake(TcpCommunicationSpi.java:3442)
~[ignite-core-2.3.0.jar!/:2.3.0]
        at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:3135)
~[ignite-core-2.3.0.jar!/:2.3.0]
        ... 94 more
*    Suppressed: org.apache.ignite.IgniteCheckedException: Failed to connect
to address [addr=/127.0.0.1:47100, err=Remote node ID is not as expected
[expected=367d0c21-90d8-4717-a909-593392dd9ba1,
rcvd=4903508d-2b22-4fbc-88ad-01cd9f17f364]]*
        at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:3293)
~[ignite-core-2.3.0.jar!/:2.3.0]
        at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createNioClient(TcpCommunicationSpi.java:2839)
~[ignite-core-2.3.0.jar!/:2.3.0]
        at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.reserveClient(TcpCommunicationSpi.java:2726)
~[ignite-core-2.3.0.jar!/:2.3.0]
        at
org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.sendMessage0(TcpCommunicationSpi.java:2587)
~[ignite-core-2.3.0.jar!/:2.3.0]

Why Ignite tried to connect 127.0.0.1 because I use static IP finder and my
config file looks like 

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd">
    
    <bean class="org.apache.ignite.configuration.IgniteConfiguration">
        <property name="communicationSpi">
             <bean
class="org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi">
                 <property name="messageQueueLimit" value="1024"/>
             </bean>
         </property>
        <property name="deploymentMode" value="PRIVATE"/>
        <property name="peerClassLoadingEnabled" value="true"/>
        <property name="dataStorageConfiguration">
            <bean
class="org.apache.ignite.configuration.DataStorageConfiguration">
                <property name="defaultDataRegionConfiguration">
                    <bean
class="org.apache.ignite.configuration.DataRegionConfiguration">
                        <property name="persistenceEnabled" value="true"/>
                    </bean>
                </property>
            </bean>
        </property>
        <property name="gridLogger">
            <bean class="org.apache.ignite.logger.log4j2.Log4J2Logger">
                <constructor-arg type="java.lang.String"
value="config/ignite-log4j2.xml"/>
            </bean>
        </property>
        <property name="discoverySpi">
            <bean
class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
                <property name="ipFinder">
                    
                    <bean
class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
                        <property name="addresses">
                            <list>
                                <value>10.xxx.xxx.xxx:47500..47509</value>
                                <value>10.xxx.xxx.xxx:47500..47509</value>
                            </list>
                        </property>
                    </bean>
                </property>
            </bean>
        </property>
    
    </bean>
</beans>



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

Re: Failed to connect to address issue

Posted by Mikhail <mi...@gmail.com>.
Hi

looks like you didn't close all ignite instances, try to terminate all
ignite processes and re-try you run( killall java ).

Thanks,
Mike.



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

Re: Failed to connect to address issue

Posted by gunman524 <gu...@126.com>.
Mikhail,

The log is not easy to get and I'll try to get it.

The top of my cluster looks like 
Hosts: 2
+==========================================================================================================================+
|   Int./Ext. IPs    |   Node ID8(@)    | Node Type |               OS              
| CPUs |       MACs        | CPU Load |
+==========================================================================================================================+
| 0:0:0:0:0:0:0:1    | 1: AF24846C(@n1) | Server    | Windows 7 amd64 6.1           
| 4    | 0A:00:27:00:00:0D | 0.00 %   |
| 10.xxx.xxx.205     |                  |           |                               
|      | 28:6E:D4:89:79:4E |          |
| 127.0.0.1          |                  |           |                               
|      |                   |          |
| 192.168.56.1       |                  |           |                               
|      |                   |          |
+--------------------+------------------+-----------+--------------------------------+------+-------------------+----------+
| 0:0:0:0:0:0:0:1%lo | 1: E0370B02(@n0) | Server    | Linux amd64
3.13.0-107-generic | 8    | 02:42:46:99:28:C9 | 0.07 %   |
| 10.xxx.xxx.196     |                  |           |                               
|      | 28:6E:D4:86:82:AD |          |
| 127.0.0.1          |                  |           |                               
|      | EE:9A:8A:04:24:36 |          |
| 172.17.0.1         |                  |           |                               
|      |                   |          |
+--------------------------------------------------------------------------------------------------------------------------+

Is that normal?  only 10.xxx.xxx.205  and 10.xxx.xxx.196 is what i
configured but what about others?  Does ignite will try to connect other
IPs?



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

Re: Failed to connect to address issue

Posted by Mikhail <mi...@gmail.com>.
Hi, 

could you please share the full logs from all your nodes?

Thanks,
Mike.



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