Unable to Connect remote Ignite server from local

classic Classic list List threaded Threaded
3 messages Options
bhargav bhargav
Reply | Threaded
Open this post in threaded view
|

Unable to Connect remote Ignite server from local

This post has NOT been accepted by the mailing list yet.
Hi,

Ignite is ran in one of the machines in the server. From my computer trying to connect to the server and cache data and retrieve based on requirement. I am getting following error

Nov 27, 2015 7:25:26 PM org.apache.ignite.logger.java.JavaLogger error
SEVERE: Failed to send local partitions to oldest node (will retry after timeout) [oldestNodeId=f18e4748-53d9-415a-b623-e469a33fe1ee, exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=37, minorTopVer=0], nodeId=d72096d0, evt=NODE_JOINED]]
class org.apache.ignite.IgniteCheckedException: Failed to send message (node may have left the grid or TCP connection cannot be established due to firewall issues) [node=TcpDiscoveryNode [id=f18e4748-53d9-415a-b623-e469a33fe1ee, addrs=[0:0:0:0:0:0:0:1%1, 127.0.0.1, 192.168.1.211], sockAddrs=[/0:0:0:0:0:0:0:1%1:47500, /0:0:0:0:0:0:0:1%1:47500, /127.0.0.1:47500, /192.168.1.211:47500], discPort=47500, order=36, intOrder=19, lastExchangeTime=1448632485171, loc=false, ver=1.4.0#20150924-sha1:c2def5f6, isClient=false], topic=TOPIC_CACHE, msg=GridDhtPartitionsSingleMessage [parts={-2100569601=GridDhtPartitionMap [nodeId=d72096d0-e47c-46bd-9004-7fdc47ed42d3, updateSeq=1, moving=0, size=0], 1254100233=GridDhtPartitionMap [nodeId=d72096d0-e47c-46bd-9004-7fdc47ed42d3, updateSeq=1, moving=0, size=0], 689859866=GridDhtPartitionMap [nodeId=d72096d0-e47c-46bd-9004-7fdc47ed42d3, updateSeq=1, moving=0, size=0], 1325947219=GridDhtPartitionMap [nodeId=d72096d0-e47c-46bd-9004-7fdc47ed42d3, updateSeq=1, moving=0, size=0]}, client=true, super=GridDhtPartitionsAbstractMessage [exchId=GridDhtPartitionExchangeId [topVer=AffinityTopologyVersion [topVer=37, minorTopVer=0], nodeId=d72096d0, evt=NODE_JOINED], lastVer=GridCacheVersion [topVer=0, nodeOrderDrId=0, globalTime=0, order=1448632480057], super=GridCacheMessage [msgId=1, depInfo=null, err=null, skipPrepare=false]]], policy=2]
        at org.apache.ignite.internal.managers.communication.GridIoManager.send(GridIoManager.java:1071)
        at org.apache.ignite.internal.managers.communication.GridIoManager.send(GridIoManager.java:1214)
        at org.apache.ignite.internal.processors.cache.GridCacheIoManager.send(GridCacheIoManager.java:652)
        at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.sendLocalPartitions(GridDhtPartitionsExchangeFuture.java:965)
        at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.sendPartitions(GridDhtPartitionsExchangeFuture.java:1006)
        at org.apache.ignite.internal.processors.cache.distributed.dht.preloader.GridDhtPartitionsExchangeFuture.init(GridDhtPartitionsExchangeFuture.java:623)
        at org.apache.ignite.internal.processors.cache.GridCachePartitionExchangeManager$ExchangeWorker.body(GridCachePartitionExchangeManager.java:1182)
        at org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:110)
        at java.lang.Thread.run(Unknown Source)
Caused by: class org.apache.ignite.spi.IgniteSpiException: Failed to send message to remote node: TcpDiscoveryNode [id=f18e4748-53d9-415a-b623-e469a33fe1ee, addrs=[0:0:0:0:0:0:0:1%1, 127.0.0.1, 192.168.1.211], sockAddrs=[/0:0:0:0:0:0:0:1%1:47500, /0:0:0:0:0:0:0:1%1:47500, /127.0.0.1:47500, /192.168.1.211:47500], discPort=47500, order=36, intOrder=19, lastExchangeTime=1448632485171, loc=false, ver=1.4.0#20150924-sha1:c2def5f6, isClient=false]
        at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.sendMessage0(TcpCommunicationSpi.java:1940)
        at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.sendMessage(TcpCommunicationSpi.java:1880)
        at org.apache.ignite.internal.managers.communication.GridIoManager.send(GridIoManager.java:1066)
        ... 8 more
Caused by: class org.apache.ignite.IgniteCheckedException: Failed to connect to node (is node still alive?). Make sure that each GridComputeTask and GridCacheTransaction has a timeout set in order to prevent parties from waiting forever in case of network issues [nodeId=f18e4748-53d9-415a-b623-e469a33fe1ee, addrs=[/192.168.1.211:47100, /0:0:0:0:0:0:0:1%1:47100, /127.0.0.1:47100]]
        at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2421)
        at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createNioClient(TcpCommunicationSpi.java:2074)
        at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.reserveClient(TcpCommunicationSpi.java:1978)
        at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.sendMessage0(TcpCommunicationSpi.java:1914)
        ... 10 more
        Suppressed: class org.apache.ignite.IgniteCheckedException: Failed to connect to address: /192.168.1.211:47100
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2426)
                ... 13 more
        Caused by: java.net.SocketTimeoutException
                at sun.nio.ch.SocketAdaptor.connect(Unknown Source)
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2285)
                ... 13 more
        Suppressed: class org.apache.ignite.IgniteCheckedException: Failed to connect to address: /0:0:0:0:0:0:0:1%1:47100
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2426)
                ... 13 more
        Caused by: java.net.BindException: Cannot assign requested address: no further information
                at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
                at sun.nio.ch.SocketChannelImpl.finishConnect(Unknown Source)
                at sun.nio.ch.SocketAdaptor.connect(Unknown Source)
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2285)
                ... 13 more
        Suppressed: class org.apache.ignite.IgniteCheckedException: Failed to connect to address: /127.0.0.1:47100
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2426)
                ... 13 more
        Caused by: class org.apache.ignite.IgniteCheckedException: Remote node ID is not as expected [expected=f18e4748-53d9-415a-b623-e469a33fe1ee, rcvd=b07b5f20-4530-468a-95db-f8cae48d43b0]
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.safeHandshake(TcpCommunicationSpi.java:2539)
                at org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi.createTcpClient(TcpCommunicationSpi.java:2293)
                ... 13 more

Could some one please help me, as I m stuck here and could not proceed further. And this is the code snippet I am using for this process.


                                String cacheId = "partitioned";
                                TcpDiscoverySpi spi = new TcpDiscoverySpi();
                                TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
                                TcpDiscoveryMulticastIpFinder tcMp = new TcpDiscoveryMulticastIpFinder();
                                tcMp.setAddresses(Arrays.asList("108.48.19.91"));
                                spi.setIpFinder(tcMp);
                                IgniteConfiguration cfg = new IgniteConfiguration();
                                cfg.setDiscoverySpi(spi);
                                CacheConfiguration cacheCfg = new CacheConfiguration();
                                cacheCfg.setName(cacheId);
                                cacheCfg.setCacheMode(CacheMode.PARTITIONED);
                                cfg.setCacheConfiguration(cacheCfg);
                                Ignition.setClientMode(true);
                                System.out.println("cfg=="+cfg);
                                Ignite ignite = Ignition.start(cfg);
                                IgniteCluster cluster = ignite.cluster();



Thanks




Anton Vinogradov Anton Vinogradov
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect remote Ignite server from local

Hi,

Can you please subscribe to the mailing list so that we receive email notification for your posts? You can refer to this instruction:
http://apache-ignite-users.70518.x6.nabble.com/mailing_list/MailingListOptions.jtp?forum=1
VE VE
Reply | Threaded
Open this post in threaded view
|

Re: Unable to Connect remote Ignite server from local

In reply to this post by bhargav
Hi bhargav,
It looks like you have an issue with your firewall configuration. Please, check, that port 47100 is available from your client node. You may also need to add a rule for the range of ports, to which cluster nodes may be assigned.

Also, I can suggest you to use TcpDiscoveryVmIpFinder instead of TcpDiscoveryMulticastIpFinder. TcpDiscoveryVmIpFinder is a static IP Based Discovery mechanism which is described here:
https://apacheignite.readme.io/v1.4/docs/cluster-config

If nothing helps, then please reply with full description of your issue. Client and server code and ip also could be useful.

Thanks!