You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by eugene miretsky <eu...@gmail.com> on 2018/08/31 04:10:00 UTC

How to set node Id?

Hello,

Is it possible to set a nodeId when restarting a node? How is the id
generated?

Sometimes after the cluster crashes, when I restart a node I get the
following error: Caused by: class org.apache.ignite.spi.IgniteSpiException:
Failed to add node to topology because it has the same hash code for
partitioned affinity as one of existing nodes
[cacheName=SQL_PUBLIC_GAL3EC2,
existingNodeId=598e3ead-99b8-4c49-b7df-04d578dcbf5f]

It looks like the node is trying to start with another nodeId, and cannot
because it's old nodeId owns the same partitions.

Cheers,
Eugene

Re: How to set node Id?

Posted by "slava.koptilin" <sl...@gmail.com>.
Hi,

> Any ideas on how we can end up having consistent IDs conflict on restarts?
Well, I see only one reason that can lead to this behavior.
This is the case when a new node is trying to join the cluster with a
`consistentId` which is already in use,
i.e. there is a node with the same `consistentId` (to be more precise, hash
codes of consitentIds are the same).
Perhaps, someone started a node locally, that joined the cluster and has the
same consistentId.

Thanks,
S.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: How to set node Id?

Posted by Denis Magda <dm...@apache.org>.
Nikolay,

Could you look into the Spark related question.

Alex, Ivan,

Any ideas on how we can end up having consistent IDs conflict on restarts?

--
Denis

On Fri, Aug 31, 2018 at 5:54 AM eugene miretsky <eu...@gmail.com>
wrote:

> Thanks Denis,
>
> The version is 2.5 and we are indeed using persistence. Full config
> attached.
>
> Another weird thing that happened is that after restarting the node a few
> time it starts properly and joins the cluster. However, when I try to
> create a SQL table (from spark) using template "ga_template" (defined in
> the config) I get the error *Cache doesn't exist. *After some time, with
> the same code and settings, creating the table starts working.
>
> I know it sounds odd, but I have observed both a few times.
>
> Based on the link you sent, the node Id should be automatically picked up
> from the name of the file in persistence directory. Is it possible that the
> pst lock was not being released properly, so when the node was restarted it
> tried to create a new UUID?
>
> Cheers,
> Eugene
>
> On Fri, Aug 31, 2018 at 1:57 AM Denis Magda <dm...@apache.org> wrote:
>
>> Strange, I've never seen consistent IDs collisions before. Are you using
>> Ignite persistence and what's your version? If you scroll to the end of
>> this paragraph, you'll find an explanation on how the IDs are generated:
>>
>> https://apacheignite.readme.io/docs/distributed-persistent-store#section-usage
>>
>> --
>> Denis
>>
>> On Thu, Aug 30, 2018 at 9:10 PM eugene miretsky <
>> eugene.miretsky@gmail.com> wrote:
>>
>>> Hello,
>>>
>>> Is it possible to set a nodeId when restarting a node? How is the id
>>> generated?
>>>
>>> Sometimes after the cluster crashes, when I restart a node I get the
>>> following error: Caused by: class
>>> org.apache.ignite.spi.IgniteSpiException: Failed to add node to topology
>>> because it has the same hash code for partitioned affinity as one of
>>> existing nodes [cacheName=SQL_PUBLIC_GAL3EC2,
>>> existingNodeId=598e3ead-99b8-4c49-b7df-04d578dcbf5f]
>>>
>>> It looks like the node is trying to start with another nodeId, and
>>> cannot because it's old nodeId owns the same partitions.
>>>
>>> Cheers,
>>> Eugene
>>>
>>

Re: How to set node Id?

Posted by eugene miretsky <eu...@gmail.com>.
Thanks Denis,

The version is 2.5 and we are indeed using persistence. Full config
attached.

Another weird thing that happened is that after restarting the node a few
time it starts properly and joins the cluster. However, when I try to
create a SQL table (from spark) using template "ga_template" (defined in
the config) I get the error *Cache doesn't exist. *After some time, with
the same code and settings, creating the table starts working.

I know it sounds odd, but I have observed both a few times.

Based on the link you sent, the node Id should be automatically picked up
from the name of the file in persistence directory. Is it possible that the
pst lock was not being released properly, so when the node was restarted it
tried to create a new UUID?

Cheers,
Eugene

On Fri, Aug 31, 2018 at 1:57 AM Denis Magda <dm...@apache.org> wrote:

> Strange, I've never seen consistent IDs collisions before. Are you using
> Ignite persistence and what's your version? If you scroll to the end of
> this paragraph, you'll find an explanation on how the IDs are generated:
>
> https://apacheignite.readme.io/docs/distributed-persistent-store#section-usage
>
> --
> Denis
>
> On Thu, Aug 30, 2018 at 9:10 PM eugene miretsky <eu...@gmail.com>
> wrote:
>
>> Hello,
>>
>> Is it possible to set a nodeId when restarting a node? How is the id
>> generated?
>>
>> Sometimes after the cluster crashes, when I restart a node I get the
>> following error: Caused by: class
>> org.apache.ignite.spi.IgniteSpiException: Failed to add node to topology
>> because it has the same hash code for partitioned affinity as one of
>> existing nodes [cacheName=SQL_PUBLIC_GAL3EC2,
>> existingNodeId=598e3ead-99b8-4c49-b7df-04d578dcbf5f]
>>
>> It looks like the node is trying to start with another nodeId, and cannot
>> because it's old nodeId owns the same partitions.
>>
>> Cheers,
>> Eugene
>>
>

Re: How to set node Id?

Posted by Denis Magda <dm...@apache.org>.
Strange, I've never seen consistent IDs collisions before. Are you using
Ignite persistence and what's your version? If you scroll to the end of
this paragraph, you'll find an explanation on how the IDs are generated:
https://apacheignite.readme.io/docs/distributed-persistent-store#section-usage

--
Denis

On Thu, Aug 30, 2018 at 9:10 PM eugene miretsky <eu...@gmail.com>
wrote:

> Hello,
>
> Is it possible to set a nodeId when restarting a node? How is the id
> generated?
>
> Sometimes after the cluster crashes, when I restart a node I get the
> following error: Caused by: class
> org.apache.ignite.spi.IgniteSpiException: Failed to add node to topology
> because it has the same hash code for partitioned affinity as one of
> existing nodes [cacheName=SQL_PUBLIC_GAL3EC2,
> existingNodeId=598e3ead-99b8-4c49-b7df-04d578dcbf5f]
>
> It looks like the node is trying to start with another nodeId, and cannot
> because it's old nodeId owns the same partitions.
>
> Cheers,
> Eugene
>