Thanks for the hint!
I was trying to use BasicAddressResolver from 1.7.1, but it was never
called for the list returned by the discovery.
I reckon the whole cluster must be the same version? With 1.8 on the
client only, even discovery does not work, just stays in the endless
loop.
I will convert the full cluster (not only client outside the cluster) into 1.8.
I noticed also some different behaviour with log4j module in 1.8 -
should it be configured differently?
for completeness trimmed sample code I am trying to run:
<java>
System.setProperty("IGNITE_QUIET", "false");
Ignition.setClientMode(true);
TcpDiscoverySpi spi = new TcpDiscoverySpi();
TcpDiscoveryVmIpFinder ipFinder = new TcpDiscoveryVmIpFinder();
// Set initial IP addresses.
// Note that you can optionally specify a port or a port range.
ipFinder.setAddresses(Arrays.asList("localhost:48500")); // this is
pointing to one of the cluster nodes via the ssh tunnel, works in 1.7,
list is returned, not in 1.8 vs 1.7
spi.setIpFinder(ipFinder);
spi.setLocalAddress("localhost");
Map<String,String> resolverAddresses = new HashMap<String,String>();
for(int i=0; i< 55 ;i++){
String orig = String.format("192.168.168.%d:47100", 1+i); / I would
expect this IPs returned
String dest = String.format("localhost:%03d", 47101 + i);
resolverAddresses.put(orig, dest);
}
BasicAddressResolver basicResolver = null;
try {
basicResolver = new BasicAddressResolver(resolverAddresses);
} catch (UnknownHostException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
spi.setAddressResolver(basicResolver);
IgniteConfiguration cfg = new IgniteConfiguration();
// Override default discovery SPI.
cfg.setDiscoverySpi(spi);
cfg.setAddressResolver(basicResolver); // it does not change anything
(spi, commSpi have the resolve set too).
cfg.setFailureDetectionTimeout(15000);
// Explicitly configure TCP communication SPI by changing local port number for
// the nodes from the first cluster.
TcpCommunicationSpi commSpi=new TcpCommunicationSpi();
commSpi.setLocalPort(47099); //exposed via reverse channel -R:47099:...
commSpi.setLocalPortRange(1);
commSpi.setLocalAddress("localhost");
commSpi.setAddressResolver(basicResolver);
commSpi.setSharedMemoryPort(-1);
// Overriding communication SPI.
cfg.setCommunicationSpi(commSpi);
// logging
cfg.setGridLogger(new Log4JLogger("config/ignite-log4j.xml")); //has
effect in 1.7 but not in 1.8
// Start Ignite node.
Ignite ignite = Ignition.start(cfg);
CacheConfiguration cacheCfg = new CacheConfiguration("run_cache");
cacheCfg.setCacheMode(CacheMode.PARTITIONED);
cacheCfg.setBackups(0);
</java>
Any hints?
Cheers
On Tue, Oct 4, 2016 at 1:15 AM, vkulichenko [via Apache Ignite Users]
<[email protected]> wrote:
> Hi Krzysztof,
>
> This issue was fixed some time ago, so in 1.8 Ignite will publish public
> addresses in the IP finder. You can with the nightly build [1] in the
> meantime.
>
> [1] https://cwiki.apache.org/confluence/display/IGNITE/Nightly+Builds
>
> -Val
>
> ________________________________
> If you reply to this email, your message will be added to the discussion
> below:
> http://apache-ignite-users.70518.x6.nabble.com/Ignite-Cluster-Communication-with-SSH-Tunnels-tp273p8066.html
> To unsubscribe from Ignite Cluster Communication with SSH Tunnels, click
> here.
> NAML
--
View this message in context:
http://apache-ignite-users.70518.x6.nabble.com/Ignite-Cluster-Communication-with-SSH-Tunnels-tp273p8081.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.