Hi Vladislav Thanks. I got this to work by re-constructing the IgniteConfiguration. However, the Javadoc of the IgniteConfiguration copy constructor is incorrect or there is a bug in the copy constructor. I will create a JIRA.
http://ignite.apache.org/releases/1.0.0/javadoc/org/apache/ignite/configuration/IgniteConfiguration.html#IgniteConfiguration(org.apache.ignite.configuration.IgniteConfiguration) -- anand From: Vladislav Pyatkov <[email protected]> Reply-To: "[email protected]" <[email protected]> Date: Monday, August 29, 2016 at 2:00 AM To: "[email protected]" <[email protected]> Subject: Re: SPI has already been started (always create new configuration instance for each starting Ignite instances) Error Hello Anand, Ignite configuration is not reusable, because SPI stores data in internal fields. You can made copy of configuration before first start of Ignite instance. I see a solution do it, using Spring scope bean attribute (if youuse Spring configuration) like this: <bean id="ignite.cfg" class="org.apache.ignite.configuration.IgniteConfiguration" scope="prototype"> On Sun, Aug 28, 2016 at 7:19 PM, Anand Kumar Sankaran <[email protected]<mailto:[email protected]>> wrote: Hi I am coding a segmentation resolver that’s restarting Ignite in the case of a Segmentation Event. I copy the current Ignite Configuration and use it to start a new Ignite. this.ignite.close(); final org.apache.ignite.configuration.IgniteConfiguration copy = new org.apache.ignite.configuration.IgniteConfiguration(this.config); this.ignite = Ignition.start(copy); This still fails with the following message: java.lang.IllegalStateException: SPI has already been started (always create new configuration instance for each starting Ignite instances) [spi=TcpCommunicationSpi [connectGate=org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$ConnectGateway@7106a8d2, srvLsnr=org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$2@240b62af, locAddr=null, locHost=0.0.0.0/0.0.0.0<https://urldefense.proofpoint.com/v2/url?u=http-3A__0.0.0.0_0.0.0.0&d=DQMFaQ&c=DS6PUFBBr_KiLo7Sjt3ljp5jaW5k2i9ijVXllEdOozc&r=qU_93SngJY3bPFd_cHFzZ8u3Owp9FHXx0iQE6zMz3jc&m=OzHCeE6fHmkLcfV-YDXzlidXXHsqe7e-YZH1O2wOGyM&s=DvDpKrtPZ6iJAk_aKX200UfNd6wYKuHgxCQodbGSwoc&e=>, locPort=16500, locPortRange=50, shmemPort=-1, directBuf=true, directSndBuf=false, idleConnTimeout=30000, connTimeout=5000, maxConnTimeout=600000, reconCnt=10, sockSndBuf=32768, sockRcvBuf=32768, msgQueueLimit=1024, slowClientQueueLimit=0, nioSrvr=null, shmemSrv=null, tcpNoDelay=true, ackSndThreshold=16, unackedMsgsBufSize=0, sockWriteTimeout=2000, lsnr=null, boundTcpPort=-1, boundTcpShmemPort=-1, selectorsCnt=2, addrRslvr=null, rcvdMsgsCnt=103, sentMsgsCnt=105, rcvdBytesCnt=134129, sentBytesCnt=214242, ctxInitLatch=java.util.concurrent.CountDownLatch@6bc31a98[Count = 0], stopping=true, metricsLsnr=org.apache.ignite.spi.communication.tcp.TcpCommunicationSpi$3@57e640a9]] at org.apache.ignite.spi.IgniteSpiAdapter.onBeforeStart(IgniteSpiAdapter.java:129) at org.apache.ignite.internal.managers.GridManagerAdapter.startSpi(GridManagerAdapter.java:217) at org.apache.ignite.internal.managers.communication.GridIoManager.start(GridIoManager.java:243) at org.apache.ignite.internal.IgniteKernal.startManager(IgniteKernal.java:1478) at org.apache.ignite.internal.IgniteKernal.start(IgniteKernal.java:828) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start0(IgnitionEx.java:1740) at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1590) at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1043) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:570) at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:517) at org.apache.ignite.Ignition.start(Ignition.java:322) How can I restart an Ignite with the same configuration in such a case? -- anand -- Vladislav Pyatkov
