Re: [akka-user] How to configure cluster for two machines
Hi, It would be very helpful if you give any hint on this. Thank you El jueves, 22 de septiembre de 2016, 13:12:59 (UTC-3), Gerard W escribió: > > I'm sorry, I did not mention (nor remember :-P) that I was overriding that > configuration setting to 2552 in my java code. > So, to make it coherent I removed the override from the code and changed > the configuration of HostA to the following: > > akka { > actor { > provider = "akka.cluster.ClusterActorRefProvider" > } > remote { > log-remote-lifecycle-events = off > netty.tcp { > hostname = "192.168.2.21" > port = 2552 > } > } > cluster { > seed-nodes = [ > "akka.tcp://MulticastPocCluster@192.168.2.21:2552"] > } > } > akka.cluster.metrics.enabled=off > akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] > > akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native > > In hostB the configuration remains unchanged: > > akka { > actor { > provider = "akka.cluster.ClusterActorRefProvider" > } > remote { > log-remote-lifecycle-events = off > netty.tcp { > hostname = "192.168.2.55" > port = 0 > } > } > cluster { > seed-nodes = [ > # Seed node in the other host > "akka.tcp://MulticastPocCluster@192.168.2.21:2552"] > } > } > akka.cluster.metrics.enabled=off > akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] > > akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native > > Again, when I try to start up the actor on HostB, I get the same error as > in my previous post: > > [INFO] [09/22/2016 11:21:45.895] > [MulticastPocCluster-akka.remote.default-remote-dispatcher-6] [akka.tcp:// > MulticastPocCluster@192.168.2.55:51361/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-1] > > No response from remote for outbound association. Associate timed out after > [15000 ms]. > [WARN] [09/22/2016 11:21:45.899] > [MulticastPocCluster-akka.remote.default-remote-dispatcher-5] [akka.tcp:// > MulticastPocCluster@192.168.2.55:51361/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-0] > > Association with remote system [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] has failed, address is now gated > for [5000] ms. Reason: [Association failed with [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552]] Caused by: [No response from > remote for outbound association. Associate timed out after [15000 ms].] > > Log from hostA: > > [INFO] [09/22/2016 11:20:59.344] [main] [akka.remote.Remoting] Starting > remoting > [INFO] [09/22/2016 11:20:59.610] [main] [akka.remote.Remoting] Remoting > started; listening on addresses :[akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] > [INFO] [09/22/2016 11:20:59.625] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] - Starting up... > [INFO] [09/22/2016 11:20:59.722] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] - Registered cluster JMX MBean > [akka:type=Cluster] > [INFO] [09/22/2016 11:20:59.722] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] - Started up successfully > [INFO] [09/22/2016 11:20:59.757] > [MulticastPocCluster-akka.actor.default-dispatcher-2] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] - Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] is JOINING, roles [] > [INFO] [09/22/2016 11:20:59.770] > [MulticastPocCluster-akka.actor.default-dispatcher-2] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] - Leader is moving node > [akka.tcp://MulticastPocCluster@192.168.2.21:2552] to [Up] > sep 22, 2016 11:21:00 AM kamon.sigar.SigarProvisioner provision > ADVERTENCIA: Sigar library is already provisioned. > [INFO] [09/22/2016 11:21:00.324] > [MulticastPocCluster-akka.actor.default-dispatcher-15] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] - Metrics collection has started > successfully > > Log from hostB: > > [INFO] [09/22/2016 11:21:30.579] [main] [akka.remote.Remoting] Starting > remoting > [INFO] [09/22/2016 11:21:30.749] [main] [akka.remote.Remoting] Remoting > started; listening on addresses :[akka.tcp:// > MulticastPocCluster@192.168.2.55:51361] > [INFO] [09/22/2016 11:21:30.759] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// > MulticastPocCluster@192.168.2.55:51361] - Starting up... > [INFO] [09/22/2016 11:21:30.829] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp:// >
Re: [akka-user] How to configure cluster for two machines
I'm sorry, I did not mention (nor remember :-P) that I was overriding that configuration setting to 2552 in my java code. So, to make it coherent I removed the override from the code and changed the configuration of HostA to the following: akka { actor { provider = "akka.cluster.ClusterActorRefProvider" } remote { log-remote-lifecycle-events = off netty.tcp { hostname = "192.168.2.21" port = 2552 } } cluster { seed-nodes = [ "akka.tcp://MulticastPocCluster@192.168.2.21:2552"] } } akka.cluster.metrics.enabled=off akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native In hostB the configuration remains unchanged: akka { actor { provider = "akka.cluster.ClusterActorRefProvider" } remote { log-remote-lifecycle-events = off netty.tcp { hostname = "192.168.2.55" port = 0 } } cluster { seed-nodes = [ # Seed node in the other host "akka.tcp://MulticastPocCluster@192.168.2.21:2552"] } } akka.cluster.metrics.enabled=off akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] akka.cluster.metrics.native-library-extract-folder=${user.dir}/target/native Again, when I try to start up the actor on HostB, I get the same error as in my previous post: [INFO] [09/22/2016 11:21:45.895] [MulticastPocCluster-akka.remote.default-remote-dispatcher-6] [akka.tcp://MulticastPocCluster@192.168.2.55:51361/system/transports/akkaprotocolmanager.tcp0/akkaProtocol-tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-1] No response from remote for outbound association. Associate timed out after [15000 ms]. [WARN] [09/22/2016 11:21:45.899] [MulticastPocCluster-akka.remote.default-remote-dispatcher-5] [akka.tcp://MulticastPocCluster@192.168.2.55:51361/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-0] Association with remote system [akka.tcp://MulticastPocCluster@192.168.2.21:2552] has failed, address is now gated for [5000] ms. Reason: [Association failed with [akka.tcp://MulticastPocCluster@192.168.2.21:2552]] Caused by: [No response from remote for outbound association. Associate timed out after [15000 ms].] Log from hostA: [INFO] [09/22/2016 11:20:59.344] [main] [akka.remote.Remoting] Starting remoting [INFO] [09/22/2016 11:20:59.610] [main] [akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://MulticastPocCluster@192.168.2.21:2552] [INFO] [09/22/2016 11:20:59.625] [main] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Starting up... [INFO] [09/22/2016 11:20:59.722] [main] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Registered cluster JMX MBean [akka:type=Cluster] [INFO] [09/22/2016 11:20:59.722] [main] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Started up successfully [INFO] [09/22/2016 11:20:59.757] [MulticastPocCluster-akka.actor.default-dispatcher-2] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] is JOINING, roles [] [INFO] [09/22/2016 11:20:59.770] [MulticastPocCluster-akka.actor.default-dispatcher-2] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Leader is moving node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] to [Up] sep 22, 2016 11:21:00 AM kamon.sigar.SigarProvisioner provision ADVERTENCIA: Sigar library is already provisioned. [INFO] [09/22/2016 11:21:00.324] [MulticastPocCluster-akka.actor.default-dispatcher-15] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Metrics collection has started successfully Log from hostB: [INFO] [09/22/2016 11:21:30.579] [main] [akka.remote.Remoting] Starting remoting [INFO] [09/22/2016 11:21:30.749] [main] [akka.remote.Remoting] Remoting started; listening on addresses :[akka.tcp://MulticastPocCluster@192.168.2.55:51361] [INFO] [09/22/2016 11:21:30.759] [main] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.55:51361] - Starting up... [INFO] [09/22/2016 11:21:30.829] [main] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.55:51361] - Registered cluster JMX MBean [akka:type=Cluster] [INFO] [09/22/2016 11:21:30.829] [main] [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.55:51361] - Started up successfully sep 22, 2016 11:21:30 AM kamon.sigar.SigarProvisioner provision ADVERTENCIA: Sigar library is already
Re: [akka-user] How to configure cluster for two machines
You're setting the port to 0 but are trying to connect to 2552? -- Cheers, √ On Sep 21, 2016 20:29, "Gerard W"wrote: > I'm using Akka 2.3.15 (java) and I'm trying to get a cluster with two > members in two different hosts. Everything runs fine when I start the two > nodes on a single machine, but then when I try to start up the second node > on a different machine, it keeps getting "Association with remote system > [...] has failed". > I know I'm probably not configuring it right, but I don't know exactly how > to do it. > > So in the hostA (ip 192.168.2.21) I'm running an actor on 2552 that joins > successfully to the cluster. The application.conf looks like: > > akka { > actor { > provider = "akka.cluster.ClusterActorRefProvider" > } > remote { > log-remote-lifecycle-events = off > netty.tcp { > hostname = "192.168.2.21" > port = 0 > } > } > cluster { > seed-nodes = [ > "akka.tcp://MulticastPocCluster@192.168.2.21:2552"] > > } > } > akka.cluster.metrics.enabled=off > akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] > akka.cluster.metrics.native-library-extract-folder=${user. > dir}/target/native > > I've copied everything over to hostB (ip 192.168.2.55), modified the > application.conf file to: > > akka { > actor { > provider = "akka.cluster.ClusterActorRefProvider" > } > remote { > log-remote-lifecycle-events = off > netty.tcp { > hostname = "192.168.2.55" > port = 0 > } > } > cluster { > seed-nodes = [ > # Seed node in the other host > "akka.tcp://MulticastPocCluster@192.168.2.21:2552"] > } > } > akka.cluster.metrics.enabled=off > akka.extensions=["akka.cluster.metrics.ClusterMetricsExtension"] > akka.cluster.metrics.native-library-extract-folder=${user. > dir}/target/native > > I've verified that I can ping hostA from hostB by ip address. But I get > this error when I try to start up an actor on hostB: > > INFO] [09/21/2016 12:52:53.229] [MulticastPocCluster-akka. > remote.default-remote-dispatcher-6] [akka.tcp://MulticastPocCluste > r@192.168.2.55:2552/system/transports/akkaprotocolmanager.tcp0/ > akkaProtocol-tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-1] No > response from remote for outbound association. Associate timed out after > [15000 ms]. > [WARN] [09/21/2016 12:52:53.232] [MulticastPocCluster-akka. > remote.default-remote-dispatcher-5] [akka.tcp://MulticastPocCluste > r@192.168.2.55:2552/system/endpointManager/reliableEndpointWriter-akka. > tcp%3A%2F%2FMulticastPocCluster%40192.168.2.21%3A2552-0] Association with > remote system [akka.tcp://MulticastPocCluster@192.168.2.21:2552] has > failed, address is now gated for [5000] ms. Reason: [Association failed > with [akka.tcp://MulticastPocCluster@192.168.2.21:2552]] Caused by: [No > response from remote for outbound association. Associate timed out after > [15000 ms].] > > Log from hostA: > > [INFO] [09/21/2016 12:51:14.402] [main] [akka.remote.Remoting] Starting > remoting > [INFO] [09/21/2016 12:51:14.649] [main] [akka.remote.Remoting] Remoting > started; listening on addresses :[akka.tcp://MulticastPocClust > er@192.168.2.21:2552] > [INFO] [09/21/2016 12:51:14.663] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] > Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - > Starting up... > [INFO] [09/21/2016 12:51:14.762] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] > Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - > Registered cluster JMX MBean [akka:type=Cluster] > [INFO] [09/21/2016 12:51:14.762] [main] > [akka.cluster.Cluster(akka://MulticastPocCluster)] > Cluster Node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Started > up successfully > [INFO] [09/21/2016 12:51:14.796] > [MulticastPocCluster-akka.actor.default-dispatcher-2] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node > [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Node [akka.tcp:// > MulticastPocCluster@192.168.2.21:2552] is JOINING, roles [] > [INFO] [09/21/2016 12:51:14.809] > [MulticastPocCluster-akka.actor.default-dispatcher-2] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node > [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Leader is moving > node [akka.tcp://MulticastPocCluster@192.168.2.21:2552] to [Up] > sep 21, 2016 12:51:15 PM kamon.sigar.SigarProvisioner provision > ADVERTENCIA: Sigar library is already provisioned. > [INFO] [09/21/2016 12:51:15.376] > [MulticastPocCluster-akka.actor.default-dispatcher-3] > [akka.cluster.Cluster(akka://MulticastPocCluster)] Cluster Node > [akka.tcp://MulticastPocCluster@192.168.2.21:2552] - Metrics collection > has started successfully > > Log from hostB: > > [INFO] [09/21/2016 12:52:37.915] [main] [akka.remote.Remoting] Starting > remoting > [INFO] [09/21/2016 12:52:38.087] [main] [akka.remote.Remoting] Remoting > started; listening on addresses