Search code examples
gridgainignite

Ignite startup error : SPI has already been started


After porting our source from gridgain to ignite, I'm attempting to run tests that invoke ignite. We typically start a couple of grids with different names.

The cause of the error seems to be that the SPI is already started. How do we ensure that different config instances are generated for each ignite grid ? Or is there something else we need to look at fixing

ERROR IgniteKernal%grid-vinayb-master - Got exception while starting (will rollback startup routine). [] 
java.lang.IllegalStateException: SPI has already been started 
(always create new configuration instance for each starting Ignite instances) 
[spi=RoundRobinLoadBalancingSpi [balancer=RoundRobinGlobalLoadBalancer

Gist of the test case / error log at https://gist.github.com/anonymous/aa665f3cdf239f2fefc46e3637fa46d9

Gist of the config at https://gist.github.com/anonymous/8cbb027bb747c4a047f3dcadcd7ca314

Thanks much


Solution

  • Each SPI has its own lifecycle, so you should not use the same instance in two nodes started in the same JVM. Create separate SPI beans for two nodes instead of sharing singletons between them.