With akka-cluster 2.3.11 I seem to be able to have configuration below work 
as well, contrary to the claim here (
https://groups.google.com/forum/#!searchin/akka-user/seed$20node/akka-user/Wehd8AcN1pw/Tc0PYBq2DQAJ)
 
that it doesn't work.

Node 1:
akka.remote.netty.tcp.hostname = 127.0.0.1
akka.remote.netty.tcp.port = 2551
akka.cluster.seed-nodes = ["akka.tcp://[email protected]:2551
", "akka.tcp://[email protected]:2552"]

Node 2:
akka.remote.netty.tcp.hostname = 127.0.0.1
akka.remote.netty.tcp.port = 2552
akka.cluster.seed-nodes = ["akka.tcp://[email protected]:255 
<http://[email protected]:2551/>2", "akka.tcp://
[email protected]:255 <http://[email protected]:2552/>1"]

Is it a fluke? The reason I tried this because I thought if it works it may 
be more flexible in cases where I don't want to run first seed node which 
in Patrick's configuration would prevent cluster from initializing.
So, if you list all known nodes in seed nodes and first one is always the 
running node (rather weird) this may allow to start any number of nodes in 
any order and always guarantee cluster is initialized.
Am I missing something here?

Thanks,
Andre Piwoni

On Sunday, June 29, 2014 at 11:05:45 AM UTC-7, Patrik Nordwall wrote:
>
> I'm not sure I understand your problem. You should used something like 
> this:
>
> Node 1:
> akka.remote.netty.tcp.hostname = 127.0.0.1
> akka.remote.netty.tcp.port = 2551
> akka.cluster.seed-nodes = ["akka.tcp://[email protected]:2551
> ", "akka.tcp://[email protected]:2552"]
>
> Node 2:
> akka.remote.netty.tcp.hostname = 127.0.0.1
> akka.remote.netty.tcp.port = 2552
> akka.cluster.seed-nodes = ["akka.tcp://[email protected]:2551
> ", "akka.tcp://[email protected]:2552"]
>
> Node 3:
> akka.remote.netty.tcp.hostname = 127.0.0.1
> akka.remote.netty.tcp.port = 2553
> akka.cluster.seed-nodes = ["akka.tcp://[email protected]:2551
> ", "akka.tcp://[email protected]:2552"]
>
> When you run on multiple machines you should change hostname to the real 
> host name or ip address instead of 127.0.0.1.
>
> Read more here: 
> http://doc.akka.io/docs/akka/2.3.3/scala/cluster-usage.html#Joining_to_Seed_Nodes
>
> /Patrik
>
>
>
> On Fri, Jun 27, 2014 at 6:49 PM, Rohit Kumar <[email protected] 
> <javascript:>> wrote:
>
>> Hi,
>>
>> I am working with akka distributed worker template available on typesafe. 
>> I am using it to write a backend job which takes data from siebel using 
>> soap calls and inserts in mongo. This job is supposed to run once a week 
>> for few hours.
>>
>> Based on the cluster-usage and other documentation on AKKA website, I 
>> imported akka-cluster.jar and configured the application configuration file 
>> with SEED nodes (akka.cluster.seed-nodes). But when I start the first node 
>> (MASTER NODE) with the configuration I mentioned (seed nodes etc), I start 
>> getting errors on the server console saying failed to join the seed node 
>> which is obvious (as it is the first node and there is nothing to join). 
>> Now I start the second node with akka.cluster.seed-nodes configured with 
>> the ip-address and port of the process where master node is running. I once 
>> again get the errors on the server console.
>>
>> Now what I do next is - take the first join address of the master actor 
>>  from the MASTER NODE and set it dynamically in the slave node in the code 
>> (construct an Address object and pass it to the actors on the slave node). 
>> THIS WORKS!!! If I take the same join address and configure it in the 
>> application configuration akka.cluster.seed-nodes, it throws me error and 
>> slave doesn't join the cluster.
>>
>> So I have following questions :-
>> 1. How to configure the akka.cluster.seed-node configuration in 
>> application. I could never make it work/count in the configuration.
>> 2. Is there any way to pre-configure the seed nodes in the configuration. 
>> As per me trying it out, it looks like the configuration is dynamic i.e. to 
>> take the join address of actor on the master node from the logs and 
>> configure the slave's seed-node configuration with that address ?
>>
>> -- 
>> >>>>>>>>>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> 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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to