I recently upgraded ignite 2.14.0 (let's call App version 2.X) from 2.10.0(app version 1.X). After upgrade my upgraded spring application(v2.X) is failing to start as it tries to connect to another Ignite node (app v1.x) (un-upgraded version's spring app) on remote host. This leads to error like following.
2023-03-27 14:32:23.180 ERROR [TLM-Services,,] 4915 --- [ServerService Thread Pool -- 89] o.a.i.i.IgniteKernal%rate-limiting : Failed to start manager: GridManagerAdapter [enabled=true, name=o.a.i.i.managers.discovery.GridDiscoveryManager]
org.apache.ignite.IgniteCheckedException: Failed to start SPI: TcpDiscoverySpi [addrRslvr=null, addressFilter=null, sockTimeout=5000, ackTimeout=5000, marsh=JdkMarshaller [clsFilter=org.apache.ignite.marshaller.MarshallerUtils$1@69749b3c], reconCnt=10, reconDelay=2000, maxAckTimeout=600000, soLinger=0, forceSrvMode=false, clientReconnectDisabled=false, internalLsnr=null, skipAddrsRandomization=false]
...
Caused by: org.apache.ignite.spi.IgniteSpiException: Local node and remote node have different version numbers (node will not join, Ignite does not support rolling updates, so versions must be exactly the same) [locBuildVer=2.10.0, rmtBuildVer=2.14.0, locNodeAddrs=[bripfm005/192.168.200.205], rmtNodeAddrs=[192.168.200.206], locNodeId=8ff94531-125c-4d2d-815b-cc2106c5e24d, rmtNodeId=6c2799d7-5bb7-4c71-96c7-8c96ab3987cc]
The spring config is identical in both versions which looks like following,
@Configuration
@ConditionalOnProperty(prefix= RateLimitingProperties.PROPERTY_PREFIX, value = {"enabled"}, havingValue = "true")
@EnableIgniteRepositories(basePackages = "com.example", includeFilters = {
@ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = { IgniteRepository.class })
})
public class RateLimitingIgniteCacheConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(RateLimitingIgniteCacheConfig.class);
@SuppressWarnings("rawtypes")
private final List<CacheConfiguration> cacheConfigurations;
@Autowired
public RateLimitingIgniteCacheConfig(@SuppressWarnings("rawtypes") List<CacheConfiguration> cacheConfigurations) {
LOGGER.info(SAFE, "Detected {} cache configurations to start", cacheConfigurations.size());
this.cacheConfigurations = cacheConfigurations;
}
@Bean
public Ignite igniteInstance() {
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setGridLogger(new Slf4jLogger());
cfg.setMetricsLogFrequency(0);
cfg.setCacheConfiguration(cacheConfigurations.toArray(new CacheConfiguration[0]));
return Ignition.start(cfg);
}
@Bean
public RateLimitingIgniteCacheResolver rateLimitingIgniteCacheResolver() {
return new RateLimitingIgniteCacheResolver(igniteInstance());
}
}
Application v1.x can't be changed yet as it's production system.
Given the upgraded version somehow enables auto discovery I tried disabling with following,
#1 adding IGNITE_LOCAL_HOST jvm argument for both applications.
JAVA_OPTS="$JAVA_OPTS -DIGNITE_LOCAL_HOST=192.168.200.206"
#2 Adding discovery SPI in above config like so,
TcpDiscoverySpi spi = new TcpDiscoverySpi()
.setIpFinder(new TcpDiscoverySpi().getIpFinder());
IgniteConfiguration cfg = new IgniteConfiguration();
cfg.setDiscoverySpi(spi);
Neither of these seems to work, is there another way to disable auto-discovery in apache ignite v2.14?