Hi,There is something inconvenient for me.I'm using akka 2.0.1object TestServer extends App {
val first = ActorSystem("first")
val last = ActorSystem("last")
last.actorOf(Props(new LogActor), "test")
first.actorOf(Props(new LogActor), "test")
}
class LogActor extends Actor {
protected def receive = {
case x => println(x)
}
}
object TestClient extends App {
ActorSystem().actorFor("akka://la...@127.0.0.1:2552/user/test") ! "last"
ActorSystem().actorFor("akka://fi...@127.0.0.1:2552/user/test") ! "first"
}I have two systems (first and last) started on on JVM and trying to send messages to both of them from different JVMHowever I can not send message to ActorSystem which was not initialized first.
15:00:33.475 INFO [first-akka.actor.default-dispatcher-1] akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started15:00:33.974 INFO [first-akka.actor.default-dispatcher-1] akka.actor.ActorSystemImpl - REMOTE: RemoteServerStarted@akka://fi...@127.0.0.1:255215:00:34.199 INFO [last-akka.actor.default-dispatcher-2] akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started15:00:34.222 INFO [last-akka.actor.default-dispatcher-2] akka.actor.ActorSystemImpl - REMOTE: RemoteServerStarted@akka://la...@127.0.0.1:255215:00:47.508 INFO [first-akka.actor.default-dispatcher-3] akka.actor.ActorSystemImpl - REMOTE: RemoteClientStarted@akka://def...@127.0.0.1:255315:00:47.550 ERROR [first-akka.actor.default-dispatcher-5] NettyRemoteTransport(null) - dropping message last for non-local recipient akka://la...@127.0.0.1:2552/user/test at akka://fi...@127.0.0.1:2552 local is akka://fi...@127.0.0.1:255215:00:47.570 INFO [first-akka.actor.default-dispatcher-5] akka.actor.ActorSystemImpl - REMOTE: RemoteClientStarted@akka://def...@127.0.0.1:255315:00:47.576 INFO [first-akka.actor.default-dispatcher-5] akka.actor.ActorSystemImpl - REMOTE: RemoteClientShutdown@akka://def...@127.0.0.1:2553first--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/s38Sl9uX-UEJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
Haha very funny :)However,I meant that the message will go only to second system and will be dropped from the first one...So whenever I have more then one ActorSystem on the single JVM I can't reach remotely one of them....Could you please read logs I'v attached ?Best regards.
>>> RemoteServerStarted@akka://firs...@127.0.0.1:2552
>>> 15:00:34.199 INFO [last-akka.actor.default-dispatcher-2]
>>> akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started
>>> 15:00:34.222 INFO [last-akka.actor.default-dispatcher-2]
>>> akka.actor.ActorSystemImpl - REMOTE:
>>> RemoteServerStarted@akka://last...@127.0.0.1:2552
>>> 15:00:47.508 INFO [first-akka.actor.default-dispatcher-3]
>>> akka.actor.ActorSystemImpl - REMOTE:
>>> RemoteClientStarted@akka://defau...@127.0.0.1:2553
>>> 15:00:47.550 ERROR [first-akka.actor.default-dispatcher-5]
>>> NettyRemoteTransport(null) - dropping message last for non-local recipient
>>> akka://la...@127.0.0.1:2552/user/test at akka://fi...@127.0.0.1:2552 local is
>>> akka://fi...@127.0.0.1:2552
>>> 15:00:47.570 INFO [first-akka.actor.default-dispatcher-5]
>>> akka.actor.ActorSystemImpl - REMOTE:
>>> RemoteClientStarted@akka://defau...@127.0.0.1:2553
>>> 15:00:47.576 INFO [first-akka.actor.default-dispatcher-5]
>>> akka.actor.ActorSystemImpl - REMOTE:
>>> RemoteClientShutdown@akka://defa...@127.0.0.1:2553
>>> first
>>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msg/akka-user/-/s38Sl9uX-UEJ.
>> To post to this group, send email to akka...@googlegroups.com.
>> To unsubscribe from this group, send email to
>> For more options, visit this group at
>> http://groups.google.com/group/akka-user?hl=en.
>
>
>
>
> --
> Viktor Klang
>
> Akka Tech Lead
> Typesafe - The software stack for applications that scale
>
> Twitter: @viktorklang
>
> --
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To post to this group, send email to akka...@googlegroups.com.
> To unsubscribe from this group, send email to
> For more options, visit this group at
> http://groups.google.com/group/akka-user?hl=en.
--
Jonas Bonér
CTO
Typesafe - The software stack for applications that scale
Phone: +46 733 777 123
Twitter: @jboner
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/GAKn5Jg7OM4J.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
You can't use the same host and port for more than one ActorSystem
>>> RemoteServerStarted@akka://firs...@127.0.0.1:2552
>>> 15:00:34.199 INFO [last-akka.actor.default-dispatcher-2]
>>> akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started
>>> 15:00:34.222 INFO [last-akka.actor.default-dispatcher-2]
>>> akka.actor.ActorSystemImpl - REMOTE:
>>> RemoteServerStarted@akka://last...@127.0.0.1:2552
>>> 15:00:47.508 INFO [first-akka.actor.default-dispatcher-3]
On 2012-06-01, at 8:33 AM, √iktor Ҡlang wrote:You can't use the same host and port for more than one ActorSystemIf that's the case then I think there's a potential ticket here, no?
>>> RemoteServerStarted@akka://firs...@127.0.0.1:2552
>>> 15:00:34.199 INFO [last-akka.actor.default-dispatcher-2]
>>> akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started
>>> 15:00:34.222 INFO [last-akka.actor.default-dispatcher-2]
>>> akka.actor.ActorSystemImpl - REMOTE:
>>> RemoteServerStarted@akka://last...@127.0.0.1:2552
>>> 15:00:47.508 INFO [first-akka.actor.default-dispatcher-3]
How is it possible that "RemoteServerStarted @ akka://la...@127.0.0.1:2552" appears? Why wouldn't it be "RemoteServerNOTStarted due to 'port already in use' error"?
There is a ton of historical precedent here. The "port already in use" error is a well known error condition as I'm sure you know. I get what you're saying but might you be getting buried in the corner cases?
However I'm not getting this one...I think that's because both of my ActorSystem use the same application.conf.Is it the case?
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/pQ2e3F_lbgIJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
16:30:13.249 INFO [first-akka.actor.default-dispatcher-1] akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started16:30:13.294 DEBUG [first-akka.actor.default-dispatcher-2] akka.event.EventStream - logger log1-Slf4jEventHandler started16:30:13.294 DEBUG [first-akka.actor.default-dispatcher-2] akka.event.EventStream - Default Loggers started16:30:13.299 DEBUG [first-akka.actor.default-dispatcher-2] akka.event.EventStream - unsubscribing StandardOutLogger from all channels16:30:13.828 INFO [first-akka.actor.default-dispatcher-2] akka.actor.ActorSystemImpl - REMOTE: RemoteServerStarted@akka://fi...@127.0.0.1:255216:30:13.830 DEBUG [first-akka.actor.default-dispatcher-2] akka.event.EventStream - subscribing Actor[akka://first/system/RemoteClientLifeCycleListener] to channel interface akka.remote.RemoteLifeCycleEvent16:30:13.832 DEBUG [first-akka.actor.default-dispatcher-1] a.a.LocalActorRefProvider$SystemGuardian - now supervising Actor[akka://first/system/RemoteClientLifeCycleListener]16:30:13.855 DEBUG [first-akka.actor.default-dispatcher-3] a.r.RemoteActorRefProvider$$anonfun$1$$anon$1 - started (akka.remote.RemoteActorRefProvider$$anonfun$1$$anon$1@10e155fb)16:30:14.051 INFO [last-akka.actor.default-dispatcher-3] akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started16:30:14.053 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - logger log1-Slf4jEventHandler started16:30:14.054 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - Default Loggers started16:30:14.054 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - unsubscribing StandardOutLogger from all channels16:30:14.075 INFO [last-akka.actor.default-dispatcher-3] akka.actor.ActorSystemImpl - REMOTE: RemoteServerStarted@akka://la...@127.0.0.1:255216:30:14.076 DEBUG [last-akka.actor.default-dispatcher-3] a.r.RemoteActorRefProvider$$anonfun$1$$anon$1 - started (akka.remote.RemoteActorRefProvider$$anonfun$1$$anon$1@66edadfa)16:30:14.077 DEBUG [last-akka.actor.default-dispatcher-3] a.a.LocalActorRefProvider$SystemGuardian - now supervising Actor[akka://last/system/RemoteClientLifeCycleListener]16:30:14.077 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - subscribing Actor[akka://last/system/RemoteClientLifeCycleListener] to channel interface akka.remote.RemoteLifeCycleEvent16:30:14.083 DEBUG [last-akka.actor.default-dispatcher-3] a.a.LocalActorRefProvider$Guardian - now supervising Actor[akka://last/user/test]16:30:14.085 DEBUG [first-akka.actor.default-dispatcher-1] a.a.LocalActorRefProvider$Guardian - now supervising Actor[akka://first/user/test]16:30:14.088 DEBUG [first-akka.actor.default-dispatcher-3] c.t.chargenetwork.server.LogActor - started (com.thenewmotion.chargenetwork.server.LogActor@1cbbddb2)16:30:14.089 DEBUG [last-akka.actor.default-dispatcher-2] c.t.chargenetwork.server.LogActor - started (com.thenewmotion.chargenetwork.server.LogActor@12036483)16:30:22.374 INFO [first-akka.actor.default-dispatcher-2] akka.actor.ActorSystemImpl - REMOTE: RemoteClientStarted@akka://def...@127.0.0.1:255316:30:22.375 DEBUG [first-akka.actor.default-dispatcher-2] RemoteClient(akka://first) - Starting remote client connection to [akka://def...@127.0.0.1:2553]16:30:22.381 DEBUG [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteServerClientConnected@akka://fi...@127.0.0.1:2552: Client[akka://def...@127.0.0.1:2553]16:30:22.414 ERROR [first-akka.actor.default-dispatcher-4] NettyRemoteTransport(null) - dropping message last for non-local recipient akka://la...@127.0.0.1:2552/user/test at akka://fi...@127.0.0.1:2552 local is akka://fi...@127.0.0.1:255216:30:22.472 INFO [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteClientStarted@akka://def...@127.0.0.1:255316:30:22.473 DEBUG [first-akka.actor.default-dispatcher-4] RemoteClient(akka://first) - Starting remote client connection to [akka://def...@127.0.0.1:2553]16:30:22.475 DEBUG [first-akka.actor.default-dispatcher-4] RemoteClient(akka://first) - Shutting down remote client [PassiveRemoteClient@akka://def...@127.0.0.1:2553]16:30:22.478 INFO [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteClientShutdown@akka://def...@127.0.0.1:255316:30:22.478 DEBUG [first-akka.actor.default-dispatcher-4] RemoteClient(akka://first) - [PassiveRemoteClient@akka://def...@127.0.0.1:2553] has been shut down16:30:22.478 DEBUG [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteServerClientConnected@akka://fi...@127.0.0.1:2552: Client[akka://def...@127.0.0.1:2553]first
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/AOS6A3-DkCQJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
object TestServer extends App {
val first = ActorSystem("first")
val last = ActorSystem("last")
last.actorOf(Props(new LogActor), "test")
first.actorOf(Props(new LogActor), "test")
}
class LogActor extends Actor {
protected def receive = {
case x => println(x)
}
}
akka {
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
http{
system-name = chargenetwork
timeout = 1000
endpoint-retrieval-timeout = 300
}
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
netty {
hostname = "127.0.0.1"
port = 2552
}
}
}
object TestClient extends App {
ActorSystem().actorFor("akka://la...@127.0.0.1:2552/user/test") ! "last"
ActorSystem().actorFor("akka://fi...@127.0.0.1:2552/user/test") ! "first"
}
akka {
event-handlers = ["akka.event.slf4j.Slf4jEventHandler"]
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
netty {
hostname = "127.0.0.1"
port = 2553
Patrik Nordwall
Typesafe - The software stack for applications that scale
Twitter: @patriknw
Why don't take my code and run it?
2 ActorSystems were created by mistake in different scopes which was not obvious and no errors about that...However I spent a lot of time to find out why remote messaging doesn't work...
Further I'm not going to create 2 systems. However it doesn't mean there is no bug :)
}}}
Sorry man, cannot reproduce:
[INFO] [06/01/2012 15:47:00.203] [run-main] [ActorSystem(bar)] RemoteServerStarted@akka://bar@127.0.0.1:2552
Cheers,√
16:30:13.828 INFO [first-akka.actor.default-dispatcher-2] akka.actor.ActorSystemImpl - REMOTE: RemoteServerStarted@akka://firs...@127.0.0.1:2552
16:30:13.830 DEBUG [first-akka.actor.default-dispatcher-2] akka.event.EventStream - subscribing Actor[akka://first/system/RemoteClientLifeCycleListener] to channel interface akka.remote.RemoteLifeCycleEvent16:30:13.832 DEBUG [first-akka.actor.default-dispatcher-1] a.a.LocalActorRefProvider$SystemGuardian - now supervising Actor[akka://first/system/RemoteClientLifeCycleListener]16:30:13.855 DEBUG [first-akka.actor.default-dispatcher-3] a.r.RemoteActorRefProvider$$anonfun$1$$anon$1 - started (akka.remote.RemoteActorRefProvider$$anonfun$1$$anon$1@10e155fb)16:30:14.051 INFO [last-akka.actor.default-dispatcher-3] akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started16:30:14.053 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - logger log1-Slf4jEventHandler started16:30:14.054 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - Default Loggers started16:30:14.054 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - unsubscribing StandardOutLogger from all channels
16:30:14.075 INFO [last-akka.actor.default-dispatcher-3] akka.actor.ActorSystemImpl - REMOTE: RemoteServerStarted@akka://last...@127.0.0.1:2552
16:30:14.076 DEBUG [last-akka.actor.default-dispatcher-3] a.r.RemoteActorRefProvider$$anonfun$1$$anon$1 - started (akka.remote.RemoteActorRefProvider$$anonfun$1$$anon$1@66edadfa)16:30:14.077 DEBUG [last-akka.actor.default-dispatcher-3] a.a.LocalActorRefProvider$SystemGuardian - now supervising Actor[akka://last/system/RemoteClientLifeCycleListener]16:30:14.077 DEBUG [last-akka.actor.default-dispatcher-3] akka.event.EventStream - subscribing Actor[akka://last/system/RemoteClientLifeCycleListener] to channel interface akka.remote.RemoteLifeCycleEvent16:30:14.083 DEBUG [last-akka.actor.default-dispatcher-3] a.a.LocalActorRefProvider$Guardian - now supervising Actor[akka://last/user/test]16:30:14.085 DEBUG [first-akka.actor.default-dispatcher-1] a.a.LocalActorRefProvider$Guardian - now supervising Actor[akka://first/user/test]16:30:14.088 DEBUG [first-akka.actor.default-dispatcher-3] c.t.chargenetwork.server.LogActor - started (com.thenewmotion.chargenetwork.server.LogActor@1cbbddb2)16:30:14.089 DEBUG [last-akka.actor.default-dispatcher-2] c.t.chargenetwork.server.LogActor - started (com.thenewmotion.chargenetwork.server.LogActor@12036483)
16:30:22.374 INFO [first-akka.actor.default-dispatcher-2] akka.actor.ActorSystemImpl - REMOTE: RemoteClientStarted@akka://defau...@127.0.0.1:2553
16:30:22.375 DEBUG [first-akka.actor.default-dispatcher-2] RemoteClient(akka://first) - Starting remote client connection to [akka://def...@127.0.0.1:2553]16:30:22.381 DEBUG [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteServerClientConnected@akka://fi...@127.0.0.1:2552: Client[akka://def...@127.0.0.1:2553]16:30:22.414 ERROR [first-akka.actor.default-dispatcher-4] NettyRemoteTransport(null) - dropping message last for non-local recipient akka://la...@127.0.0.1:2552/user/test at akka://fi...@127.0.0.1:2552 local is akka://fi...@127.0.0.1:2552
16:30:22.472 INFO [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteClientStarted@akka://defau...@127.0.0.1:2553
16:30:22.473 DEBUG [first-akka.actor.default-dispatcher-4] RemoteClient(akka://first) - Starting remote client connection to [akka://def...@127.0.0.1:2553]
16:30:22.475 DEBUG [first-akka.actor.default-dispatcher-4] RemoteClient(akka://first) - Shutting down remote client [PassiveRemoteClient@akka://defa...@127.0.0.1:2553]16:30:22.478 INFO [first-akka.actor.default-dispatcher-4] akka.actor.ActorSystemImpl - REMOTE: RemoteClientShutdown@akka://defa...@127.0.0.1:255316:30:22.478 DEBUG [first-akka.actor.default-dispatcher-4] RemoteClient(akka://first) - [PassiveRemoteClient@akka://defa...@127.0.0.1:2553] has been shut down
--
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.
--
Viktor Klang
Akka Tech Lead
--
You received this message because you are subscribed to the Google Groups "Akka User List" group.
To view this discussion on the web visit https://groups.google.com/d/msg/akka-user/-/QonjBtzUm6sJ.
To post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/akka-user?hl=en.