Hi,

You example required external connection for running it and does not have
atomicConfiguration, which was recommended.
Hence I created own sample, please look at attachment.
The example does not fail, until last one server would by online.

PS
You need to start ignite.sh with same configuration default-config.xml

On Fri, Sep 23, 2016 at 1:46 PM, hitansu <[email protected]> wrote:

> class org.apache.ignite.IgniteException: null
>         at
> org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.
> java:908)
>         at
> org.apache.ignite.internal.processors.datastructures.
> GridCacheAtomicSequenceImpl.incrementAndGet(GridCacheAtomicSequenceImpl.
> java:178)
>         at
> ignite.IdGenerationServiceCacheLayer.getId(IdGenerationServiceCacheLayer.
> java:61)
>         at
> idgen_service.IdGenerationServiceDataLayer.generateId(
> IdGenerationServiceDataLayer.java:56)
>         at client.IdGenTask.generateSequnceId(IdGenTask.java:43)
>         at client.IdGenTask.run(IdGenTask.java:33)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: class org.apache.ignite.IgniteCheckedException: null
>         at
> org.apache.ignite.internal.processors.cache.GridCacheUtils.outTx(
> GridCacheUtils.java:921)
>         at
> org.apache.ignite.internal.processors.datastructures.
> GridCacheAtomicSequenceImpl.internalUpdate(GridCacheAtomicSequenceImpl.
> java:255)
>         at
> org.apache.ignite.internal.processors.datastructures.
> GridCacheAtomicSequenceImpl.incrementAndGet(GridCacheAtomicSequenceImpl.
> java:175)
>         ... 5 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.ignite.internal.processors.datastructures.
> GridCacheAtomicSequenceImpl$2.call(GridCacheAtomicSequenceImpl.java:504)
>         at
> org.apache.ignite.internal.processors.datastructures.
> GridCacheAtomicSequenceImpl$2.call(GridCacheAtomicSequenceImpl.java:477)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheUtils$23.call(
> GridCacheUtils.java:1672)
>         at
> org.apache.ignite.internal.processors.cache.GridCacheUtils.outTx(
> GridCacheUtils.java:915)
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/AtomicSequence-not-working-
> when-shutting-down-one-server-node-from-a-cluster-tp7770p7905.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Vladislav Pyatkov
<?xml version="1.0" encoding="UTF-8"?>

<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<beans xmlns="http://www.springframework.org/schema/beans";
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
       xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd";>
    <!--
        Alter configuration below as needed.
    -->
    <bean id="grid.cfg" class="org.apache.ignite.configuration.IgniteConfiguration">
		<property name="gridName" value="def_ign"/>
	
		<property name="discoverySpi">
		  <bean class="org.apache.ignite.spi.discovery.tcp.TcpDiscoverySpi">
			<!-- Initial local port to listen to. -->
			<property name="localPort" value="47543"/>

			<!-- Changing local port range. This is an optional action. -->
			<property name="localPortRange" value="7"/>

			<property name="ipFinder">
			  <!--
				  Ignite provides several options for automatic discovery that can be used
				  instead os static IP based discovery. For information on all options refer
				  to our documentation: http://apacheignite.readme.io/docs/cluster-config
			  -->
			  <!-- Uncomment static IP finder to enable static-based discovery of initial nodes. -->
			  <bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.vm.TcpDiscoveryVmIpFinder">
				<!--<bean class="org.apache.ignite.spi.discovery.tcp.ipfinder.multicast.TcpDiscoveryMulticastIpFinder">-->
				<property name="addresses">
				  <list>
					<!-- In distributed environment, replace with actual host IP address. -->
					<value>127.0.0.1:47543..47550</value>
				  </list>
				</property>
			  </bean>
			</property>
		  </bean>
		</property>

		<property name="atomicConfiguration">
			<bean class="org.apache.ignite.configuration.AtomicConfiguration">
				<!-- Set number of backups. -->
				<property name="backups" value="1"/>

				<!-- Set number of sequence values to be reserved. -->
				<property name="atomicSequenceReserveSize" value="5"/>
			</bean>
		</property>
	</bean>
</beans>

Attachment: Main.java
Description: Binary data

Reply via email to