Restart of node with same hostname and port will be simplified by this
feature: https://github.com/akka/akka/issues/16726
In summary how it is implemented: When new uid is seen in join attempt we
can down existing member and thereby new restarted node will be able to
join in later retried join attempt without relying on auto-down.

This will be released in upcoming 2.3.10!

Cheers,
Patrik

On Mon, Apr 13, 2015 at 8:29 AM, Endre Varga <endre.va...@typesafe.com>
wrote:

>
>
> On Sat, Apr 11, 2015 at 1:36 AM, Andrey Ilinykh <ailin...@gmail.com>
> wrote:
>
>> Thank you! It works. But still there is a slim chance something goes
>> wrong (for example java process crashed). What a reason not to allow the
>> same actor system join multiple times? As far as I understand each actor
>> system has internal UUID which is generated every time you start akka. If
>> some how this UUID persists between restarts will akka cluster allow to
>> join multiple times?
>>
>
> The UID is not persisted, it does not need to. It is randomly generated
> for every ActorSystem instance at startup. This means that if you restart a
> system then that will be considered as a new system (because the UID will
> differ) and will be allowed to join.
>
> -Endre
>
>
>>
>> Thank you,
>>   Andrey
>>
>> On Friday, April 10, 2015 at 2:29:41 AM UTC-7, Akka Team wrote:
>>>
>>> Hi,
>>>
>>> Even if you turn off auto-downing you still have the programmatic API:
>>> Cluster(system).down(address)
>>>
>>> So if you have a logic for downing that can be automatized (i.e.
>>> expressed in Scala) the you can implement it by using the above API.
>>>
>>> But if I understood correctly, you want to stop a node gracefully before
>>> starting up it again with new code. In this case (
>>> http://doc.akka.io/docs/akka/2.3.9/scala/cluster-usage.html#Leaving):
>>>
>>> A more graceful exit can be performed if you tell the cluster that a
>>> node shall leave. This can be performed using *JMX*
>>> <http://doc.akka.io/docs/akka/2.3.9/scala/cluster-usage.html#cluster-jmx-scala>
>>>  or*Command Line Management*
>>> <http://doc.akka.io/docs/akka/2.3.9/scala/cluster-usage.html#cluster-command-line-scala>.
>>> It can also be performed programatically with Cluster(system).leave(
>>> address).
>>>
>>> Note that this command can be issued to any member in the cluster, not
>>> necessarily the one that is leaving. The cluster extension, but not the
>>> actor system or JVM, of the leaving member will be shutdown after the
>>> leader has changed status of the member to Exiting. Thereafter the
>>> member will be removed from the cluster. Normally this is handled
>>> automatically, but in case of network failures during this process it might
>>> still be necessary to set the node’s status toDown in order to complete
>>> the removal.
>>> So if you have an API that can tell the node to restart, you can just
>>>  - leave the cluster manually
>>>  - after successfully leaving or timing out, shut down the actor system
>>>
>>> -Endre
>>>
>>> On Thu, Apr 9, 2015 at 8:52 PM, Andrey Ilinykh <aili...@gmail.com>
>>> wrote:
>>>
>>>> Hello everybody!
>>>>
>>>>
>>>> I have a simple cluster with disabled auto downing. (I don't want a
>>>> cluster to be partitioned eventually). As result every time I deploy new
>>>> code node becomes unreachable. I have to down it manually. Which is
>>>> annoying even you have two nodes. For big cluster it become nightmare. So,
>>>> my question is - how to restart node easily. Or what is the best practice
>>>> to deploy new code?
>>>>
>>>> Thank you,
>>>>    Andrey
>>>>
>>>> --
>>>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>>>> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/
>>>> current/additional/faq.html
>>>> >>>>>>>>>> Search the archives: https://groups.google.com/
>>>> group/akka-user
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Akka User List" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to akka-user+...@googlegroups.com.
>>>> To post to this group, send email to akka...@googlegroups.com.
>>>> Visit this group at http://groups.google.com/group/akka-user.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>>
>>>
>>> --
>>> Akka Team
>>> Typesafe - Reactive apps on the JVM
>>> Blog: letitcrash.com
>>> Twitter: @akkateam
>>>
>>  --
>> >>>>>>>>>> Read the docs: http://akka.io/docs/
>> >>>>>>>>>> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>  --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at http://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 

Patrik Nordwall
Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to