Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Remote communication with ActorSytems started on single JVM
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  21 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 8:10 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 05:10:59 -0700 (PDT)
Local: Fri, Jun 1 2012 8:10 am
Subject: Remote communication with ActorSytems started on single JVM

Hi,

There is something inconvenient for me.
I'm using akka 2.0.1

> 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)
>   }
> }
> object TestClient extends App {
>   ActorSystem().actorFor("akka://l...@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 JVM
However *I can not send message to ActorSystem which was not initialized
first*.

15:00:33.475 INFO  [first-akka.actor.default-dispatcher-1]


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 8:15 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 14:15:51 +0200
Local: Fri, Jun 1 2012 8:15 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

I have the same bug on my phone! If I start talking before the callee picks
up the phone they won't hear it :(

--
Viktor Klang

Akka Tech Lead
Typesafe <http://www.typesafe.com/> - The software stack for applications
that scale

Twitter: @viktorklang


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jonas Bonér  
View profile  
 More options Jun 1 2012, 8:24 am
From: Jonas Bonér <jo...@jonasboner.com>
Date: Fri, 1 Jun 2012 14:24:40 +0200
Local: Fri, Jun 1 2012 8:24 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

My wife has the same problem. If she starts speaking to me while I'm
hacking, before I get a chance to fully switch context, then I won't
hear anything she is saying. Drives her nuts, but can be quite
convenient sometimes.

--
Jonas Bonér
CTO
Typesafe - The software stack for applications that scale
Phone: +46 733 777 123
Twitter: @jboner

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 8:27 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 14:27:48 +0200
Local: Fri, Jun 1 2012 8:27 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

Haha, I get tons of crap from Sandra for that. Glad to hear it's not just
me!

--
Viktor Klang

Akka Tech Lead
Typesafe <http://www.typesafe.com/> - The software stack for applications
that scale

Twitter: @viktorklang


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 8:31 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 05:31:03 -0700 (PDT)
Local: Fri, Jun 1 2012 8:31 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 8:33 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 14:33:53 +0200
Local: Fri, Jun 1 2012 8:33 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

You can't use the same host and port for more than one ActorSystem

Cheers,

--
Viktor Klang

Akka Tech Lead
Typesafe <http://www.typesafe.com/> - The software stack for applications
that scale

Twitter: @viktorklang


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derek Wyatt  
View profile  
 More options Jun 1 2012, 8:37 am
From: Derek Wyatt <de...@derekwyatt.org>
Date: Fri, 1 Jun 2012 08:37:32 -0400
Local: Fri, Jun 1 2012 8:37 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

On 2012-06-01, at 8:33 AM, √iktor Ҡlang wrote:

> You can't use the same host and port for more than one ActorSystem

If that's the case then I think there's a potential ticket here, no?

> >>> RemoteServerStarted@akka://fi...@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://l...@127.0.0.1:2552
> >>> 15:00:47.508 INFO  [first-akka.actor.default-dispatcher-3]

How is it possible that "RemoteServerStarted @ akka://l...@127.0.0.1:2552" appears?  Why wouldn't it be "RemoteServerNOTStarted due to 'port already in use' error"?

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 8:45 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 14:45:34 +0200
Local: Fri, Jun 1 2012 8:45 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

On Fri, Jun 1, 2012 at 2:37 PM, Derek Wyatt <de...@derekwyatt.org> wrote:

> On 2012-06-01, at 8:33 AM, √iktor Ҡlang wrote:

> You can't use the same host and port for more than one ActorSystem

> If that's the case then I think there's a potential ticket here, no?

There is already a ticket, but IMHO it doesn't make sense. What would it
mean? When would you shut the port down? It's global state, so how do you
test it?

Also, I do not know if he's running in daemonic mode or not, so I don't
know if his TestServer is exiting after init or not.

Cheers,

--
Viktor Klang

Akka Tech Lead
Typesafe <http://www.typesafe.com/> - The software stack for applications
that scale

Twitter: @viktorklang


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derek Wyatt  
View profile  
 More options Jun 1 2012, 8:48 am
From: Derek Wyatt <de...@derekwyatt.org>
Date: Fri, 1 Jun 2012 08:48:50 -0400
Local: Fri, Jun 1 2012 8:48 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

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?

On 2012-06-01, at 8:45 AM, √iktor Ҡlang wrote:

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 8:58 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 14:58:05 +0200
Local: Fri, Jun 1 2012 8:58 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

On Fri, Jun 1, 2012 at 2:48 PM, Derek Wyatt <de...@derekwyatt.org> wrote:

> 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?

Well.... this is what I get:

scala> val as = akka.actor.ActorSystem("foo", parseString("""
     | akka {
     |   actor.provider = "akka.remote.RemoteActorRefProvider"
     |   remote.netty {
     |     hostname = localhost
     |     port = 12345
     |   }
     | }"""))
[INFO] [06/01/2012 14:56:55.818] [run-main] [ActorSystem(foo)]
RemoteServerStarted@akka://foo@localhost:12345
as: akka.actor.ActorSystem = akka://foo

scala> val as = akka.actor.ActorSystem("bar", parseString("""
     |       akka {
     |         actor.provider = "akka.remote.RemoteActorRefProvider"
     |         remote.netty {
     |           hostname = localhost
     |           port = 12345
     |         }
     |       }"""))
org.jboss.netty.channel.ChannelException: Failed to bind to: localhost/
127.0.0.1:12345
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:298)
at akka.remote.netty.NettyRemoteServer.start(Server.scala:55)
at
akka.remote.netty.NettyRemoteTransport.start(NettyRemoteSupport.scala:161)
at akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:83)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:576)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:583)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:99)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:94)
at .<init>(<console>:8)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:704)
at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:914)
at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:546)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:577)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:543)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:694)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:651)
at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:542)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:550)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:822)
at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:851)
at xsbt.ConsoleInterface.run(ConsoleInterface.scala:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:57)
at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:48)
at sbt.Console.console0$1(Console.scala:23)
at
sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:24 )
at sbt.TrapExit$.executeMain$1(TrapExit.scala:33)
at sbt.TrapExit$$anon$1.run(TrapExit.scala:42)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServ erSocketPipelineSink.java:140)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServer Socket(NioServerSocketPipelineSink.java:92)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(Ni oServerSocketPipelineSink.java:66)
at org.jboss.netty.channel.Channels.bind(Channels.java:462)
at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:186)
at
org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstra p.java:343)
at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:170)
at
org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerS ocketChannel.java:77)
at
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel (NioServerSocketChannelFactory.java:137)
at
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel (NioServerSocketChannelFactory.java:85)
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:277)
... 53 more

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Derek Wyatt  
View profile  
 More options Jun 1 2012, 8:59 am
From: Derek Wyatt <de...@derekwyatt.org>
Date: Fri, 1 Jun 2012 08:59:33 -0400
Local: Fri, Jun 1 2012 8:59 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

Well, that sure as hell looks right to me :)

On 2012-06-01, at 8:45 AM, √iktor Ҡlang wrote:

  signature.asc
< 1K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 9:21 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 06:21:42 -0700 (PDT)
Local: Fri, Jun 1 2012 9:21 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

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?

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 9:24 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 15:24:45 +0200
Local: Fri, Jun 1 2012 9:24 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

On Fri, Jun 1, 2012 at 3:21 PM, Yaroslav Klymko <t3h...@gmail.com> wrote:
> 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?

I do not know. Enable logging and verify.

Cheers,

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 9:31 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 06:31:08 -0700 (PDT)
Local: Fri, Jun 1 2012 9:31 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

16:30:13.249 INFO  [first-akka.actor.default-dispatcher-1]
akka.event.slf4j.Slf4jEventHandler - Slf4jEventHandler started
16:30:13.294 DEBUG [first-akka.actor.default-dispatcher-2]
akka.event.EventStream - logger log1-Slf4jEventHandler started
16:30:13.294 DEBUG [first-akka.actor.default-dispatcher-2]
akka.event.EventStream - Default Loggers started
16:30:13.299 DEBUG [first-akka.actor.default-dispatcher-2]
akka.event.EventStream - unsubscribing StandardOutLogger from all channels
16:30:13.828 INFO  [first-akka.actor.default-dispatcher-2]
akka.actor.ActorSystemImpl - REMOTE:
RemoteServerStarted@akka://fi...@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.RemoteLifeCycleEvent
16: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 started
16:30:14.053 DEBUG [last-akka.actor.default-dispatcher-3]
akka.event.EventStream - logger log1-Slf4jEventHandler started
16:30:14.054 DEBUG [last-akka.actor.default-dispatcher-3]
akka.event.EventStream - Default Loggers started
16: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://l...@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.RemoteLifeCycleEvent
16: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://defa...@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://defa...@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://defa...@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://l...@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://defa...@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://defa...@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:2553
16: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
16:30:22.478 DEBUG [first-akka.actor.default-dispatcher-4]
akka.actor.ActorSystemImpl - REMOTE:
RemoteServerClientConnected@akka://fi...@127.0.0.1:2552:
Client[akka://defa...@127.0.0.1:2553]
first

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 9:47 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 15:47:51 +0200
Local: Fri, Jun 1 2012 9:47 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

Sorry man, cannot reproduce:

scala> val as = akka.actor.ActorSystem("bar", parseString("""
     |       akka {
     |         actor.provider = "akka.remote.RemoteActorRefProvider"
     |         remote.netty {
     |           hostname = "127.0.0.1"
     |           port = 2552
     |         }
     |       }"""))
[INFO] [06/01/2012 15:47:00.203] [run-main] [ActorSystem(bar)]
RemoteServerStarted@akka://...@127.0.0.1:2552
as: akka.actor.ActorSystem = akka://bar

scala> val as = akka.actor.ActorSystem("foo", parseString("""
     |       akka {
     |         actor.provider = "akka.remote.RemoteActorRefProvider"
     |         remote.netty {
     |           hostname = "127.0.0.1"
     |           port = 2552
     |         }
     |       }"""))
org.jboss.netty.channel.ChannelException: Failed to bind to: /127.0.0.1:2552
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:298)
at akka.remote.netty.NettyRemoteServer.start(Server.scala:55)
at
akka.remote.netty.NettyRemoteTransport.start(NettyRemoteSupport.scala:161)
at akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:83)
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:576)
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:583)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:99)
at akka.actor.ActorSystem$.apply(ActorSystem.scala:94)
at .<init>(<console>:16)
at .<clinit>(<console>)
at .<init>(<console>:11)
at .<clinit>(<console>)
at $print(<console>)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at scala.tools.nsc.interpreter.IMain$ReadEvalPrint.call(IMain.scala:704)
at scala.tools.nsc.interpreter.IMain$Request.loadAndRun(IMain.scala:914)
at scala.tools.nsc.interpreter.IMain.loadAndRunReq$1(IMain.scala:546)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:577)
at scala.tools.nsc.interpreter.IMain.interpret(IMain.scala:543)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:694)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.reallyInterpret$1(ILoop.scala:712)
at scala.tools.nsc.interpreter.ILoop.interpretStartingWith(ILoop.scala:745)
at scala.tools.nsc.interpreter.ILoop.command(ILoop.scala:651)
at scala.tools.nsc.interpreter.ILoop.processLine$1(ILoop.scala:542)
at scala.tools.nsc.interpreter.ILoop.loop(ILoop.scala:550)
at scala.tools.nsc.interpreter.ILoop.process(ILoop.scala:822)
at scala.tools.nsc.interpreter.ILoop.main(ILoop.scala:851)
at xsbt.ConsoleInterface.run(ConsoleInterface.scala:57)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3 9)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp l.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sbt.compiler.AnalyzingCompiler.call(AnalyzingCompiler.scala:57)
at sbt.compiler.AnalyzingCompiler.console(AnalyzingCompiler.scala:48)
at sbt.Console.console0$1(Console.scala:23)
at
sbt.Console$$anonfun$apply$2$$anonfun$apply$1.apply$mcV$sp(Console.scala:24 )
at sbt.TrapExit$.executeMain$1(TrapExit.scala:33)
at sbt.TrapExit$$anon$1.run(TrapExit.scala:42)
Caused by: java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServ erSocketPipelineSink.java:140)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServer Socket(NioServerSocketPipelineSink.java:92)
at
org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(Ni oServerSocketPipelineSink.java:66)
at org.jboss.netty.channel.Channels.bind(Channels.java:462)
at org.jboss.netty.channel.AbstractChannel.bind(AbstractChannel.java:186)
at
org.jboss.netty.bootstrap.ServerBootstrap$Binder.channelOpen(ServerBootstra p.java:343)
at org.jboss.netty.channel.Channels.fireChannelOpen(Channels.java:170)
at
org.jboss.netty.channel.socket.nio.NioServerSocketChannel.<init>(NioServerS ocketChannel.java:77)
at
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel (NioServerSocketChannelFactory.java:137)
at
org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory.newChannel (NioServerSocketChannelFactory.java:85)
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:277)
... 53 more

Cheers,

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 9:51 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 16:51:44 +0300
Local: Fri, Jun 1 2012 9:51 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

Why don't take my code and run it?
And not forget to have different application.conf

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 {

object TestClient extends App {

>   ActorSystem().actorFor("akka://l...@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

      }

    }

}

On 1 June 2012 16:47, √iktor Ҡlang <viktor.kl...@gmail.com> wrote:

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Patrik Nordwall  
View profile  
 More options Jun 1 2012, 9:58 am
From: Patrik Nordwall <patrik.nordw...@gmail.com>
Date: Fri, 1 Jun 2012 15:58:17 +0200
Local: Fri, Jun 1 2012 9:58 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

What I can see is that you start on 2552 and 2553, but client is only using
2552

  ActorSystem().actorFor("akka://l...@127.0.0.1:2552/user/test") ! "last"
  ActorSystem().actorFor("akka://fi...@127.0.0.1:2552/user/test") ! "first"

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 9:58 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 15:58:59 +0200
Local: Fri, Jun 1 2012 9:58 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

On Fri, Jun 1, 2012 at 3:51 PM, Yaroslav Klymko <t3h...@gmail.com> wrote:
> Why don't take my code and run it?

Simply because I do not have time.

If someone else has time, please feel free to try it out. But I think you
have a better chance if you package it in something that require less
manual work to try it out.
I strongly recommend against not passing in config to your ActorSystem if
you're running multiple since they are going to get the same config.

Also, why do you create 2 ActorSystems just to do actorFor (as well as
omitting system name for them)?

Cheers,

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 10:04 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 07:04:45 -0700 (PDT)
Local: Fri, Jun 1 2012 10:04 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

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 :)

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
√iktor Ҡlang  
View profile  
 More options Jun 1 2012, 10:22 am
From: √iktor Ҡlang <viktor.kl...@gmail.com>
Date: Fri, 1 Jun 2012 16:22:28 +0200
Local: Fri, Jun 1 2012 10:22 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

On Fri, Jun 1, 2012 at 4:04 PM, Yaroslav Klymko <t3h...@gmail.com> wrote:
> 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...

How about you opening up 2 REPLs and start _1_ server in the first and 1
client in the other and take it from there?

> Further I'm not going to create 2 systems. However it doesn't mean there
> is no bug :)

I'm still unconvinced, the unit tests pass ;-)

Cheers,

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Yaroslav Klymko  
View profile  
 More options Jun 1 2012, 10:41 am
From: Yaroslav Klymko <t3h...@gmail.com>
Date: Fri, 1 Jun 2012 07:41:07 -0700 (PDT)
Local: Fri, Jun 1 2012 10:41 am
Subject: Re: [akka-user] Remote communication with ActorSytems started on single JVM

Welcome to Scala version 2.9.2 (Java HotSpot(TM) 64-Bit Server VM, Java
1.7.0_03).
Type in expressions to have them evaluated.
Type :help for more information.

scala>  import akka.actor.ActorSystem
import com.typesafe.config.ConfigFactory

ActorSystem("a", ConfigFactory.parseString( """
          akka {
            actor.provider = "akka.remote.RemoteActorRefProvider"
            remote.netty {
              hostname = localhost
              port = 12345
            }
          }"""))
import akka.actor.ActorSystem

scala> import com.typesafe.config.ConfigFactory

scala>      |      |      |      |      |      |      | [INFO] [06/01/2012
17:37:42.3] [main] [ActorSystem(a)] REMOTE:
RemoteServerStarted@akka://a@localhost:12345
res0: akka.actor.ActorSystem = akka://a

scala>  ActorSystem("c", ConfigFactory.parseString( """
          akka {
            actor.provider = "akka.remote.RemoteActorRefProvider"
            remote.netty {
              hostname = localhost
              port = 12345
            }
          }"""))
     |      |      |      |      |      |      | [INFO] [06/01/2012
17:37:46.693] [main] [ActorSystem(c)] REMOTE:
RemoteServerStarted@akka://c@localhost:12345
res1: akka.actor.ActorSystem = akka://c

scala>

I'm using windows 7 :)

And also debugged that *NettyRemoteServer.start called twice without
exceptions on same port*... So most probably I need start looking in that
area.

...

read more »


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »