ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krzysztof <yaz...@gmail.com>
Subject Re: Ignite Cluster Communication with SSH Tunnels
Date Tue, 04 Oct 2016 11:40:26 GMT
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
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:

System.setProperty("IGNITE_QUIET", "false");


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



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




IgniteConfiguration cfg = new IgniteConfiguration();

// Override default discovery SPI.

cfg.setAddressResolver(basicResolver); // it does not change anything
(spi, commSpi have the resolve set too).


// 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:...





// Overriding communication SPI.


// 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");



Any hints?


On Tue, Oct 4, 2016 at 1:15 AM, vkulichenko [via Apache Ignite Users]
<ml-node+s70518n8066h50@n6.nabble.com> 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.

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.
View raw message