I was having trouble with initializing an actor system on a remote IP address. I am using akka actors and the play! framework. The code and the remote actor system are both on the remote rackspace servers. When I try to create a remote actor system on the the other server it fails to bind to that IP address. I don't think it is a network or firewall issue because Rackspace says that they opened up all connections between servers. This is the error message I am getting:I am creating the remote actor system here:[error] application -
! Internal server error, for request [POST /payment/] ->
java.lang.ExceptionInInitializerError: null
at Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.apply(routes_routing.scala:44) ~[classes/:na]
at Routes$$anonfun$routes$1$$anonfun$apply$3$$anonfun$apply$4.apply(routes_routing.scala:44) ~[classes/:na]
at play.core.Router$HandlerInvoker$$anon$3.call(Router.scala:1080) ~[play_2.9.1-2.0.1.jar:2.0.1]
at play.core.Router$Routes$class.invokeHandler(Router.scala:1255) ~[play_2.9.1-2.0.1.jar:2.0.1]
at Routes$.invokeHandler(routes_routing.scala:14) ~[classes/:na]
at Routes$$anonfun$routes$1$$anonfun$apply$3.apply(routes_routing.scala:44) ~[classes/:na]
Caused by: org.jboss.netty.channel.ChannelException: Failed to bind to: /172.17.100.232:2554
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:298) ~[netty-3.3.0.Final.jar:na]
at akka.remote.netty.NettyRemoteServer.start(Server.scala:53) ~[akka-remote-2.0.2.jar:2.0.2]
at akka.remote.netty.NettyRemoteTransport.start(NettyRemoteSupport.scala:73) ~[akka-remote-2.0.2.jar:2.0.2]
at akka.remote.RemoteActorRefProvider.init(RemoteActorRefProvider.scala:95) ~[akka-remote-2.0.2.jar:2.0.2]
at akka.actor.ActorSystemImpl._start(ActorSystem.scala:568) ~[akka-actor-2.0.2.jar:2.0.2]
at akka.actor.ActorSystemImpl.start(ActorSystem.scala:575) ~[akka-actor-2.0.2.jar:2.0.2]
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind(Native Method) ~[na:1.6.0_26]
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:126) ~[na:1.6.0_26]
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59) ~[na:1.6.0_26]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.bind(NioServerSocketPipelineSink.java:140) ~[netty-3.3.0.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.handleServerSocket(NioServerSocketPipelineSink.java:92) ~[netty-3.3.0.Final.jar:na]
at org.jboss.netty.channel.socket.nio.NioServerSocketPipelineSink.eventSunk(NioServerSocketPipelineSink.java:66) ~[netty-3.3.0.Final.jar:na]Here is where i define remotecreation in my Application.conf file:object Payment extends Controller {
var goodies: AuthNetActorObject = null
val system = ActorSystem("RemoteCreation", ConfigFactory.load.getConfig("remotecreation"))
val myActor = system.actorOf(Props[authNetActor.AuthNetActorMain], name = "remoteActor")
...
}Here is my common.conf file that I include in the definition:remotecreation{ #user defined name for the configuration
include "common"
akka {
actor{
#serializer{
# proto = "akka.serialization.ProtobufSerializer"
# daemon-create = "akka.serialization.DaemonMsgCreateSerializer"
#}
#serialization-bindings{
# "com.google.protobuf.GeneratedMessage" = proto
# "akka.remote.DaemonMsgCreate" = daemon-create
#}
deployment{
/remoteActor{ #Specifically has to be the name of the remote actor
remote="akka://RemoteC...@172.17.100.232:2554"
# router = "round-robin"
# nr-of-instances = 10
# target {
# nodes = ["akka://RemoteC...@172.17.100.232:2554", "akka://RemoteC...@172.17.100.224:2554"]
# }
}
}
}
}
}akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
transport = "akka.remote.netty.NettyRemoteTransport"
log-received-messages = on
log-sent-messages = on
log-remote-lifecycle-events = on
netty {
hostname = "172.17.100.232" #Broadcast IP address of remote system
port = 2554
log-received-messages = on
log-sent-messages = on
log-remote-lifecycle-events = on
}
}
}--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.
Roland Kuhn
Typesafe – The software stack for applications that scale.
twitter: @rolandkuhn
Thanks for the reply!I see what you are saying, however I am using the local ip address another server and it is not working. To clarify what I am trying to do here is that I am trying to create remote akka actors on a remote server from another server. I tried using the local ip address of the remote server in the configuration files and it still isn't able to bind. Is there anything that I'm missing or have to set up on the remote server in order to create remote actors there?Any help is appreciated. Thanks.-Louis
#<span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initi...
Show original
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ: http://akka.io/faq/
>>>>>>>>>> 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 post to this group, send email to akka...@googlegroups.com.
To unsubscribe from this group, send email to akka-user+...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user?hl=en.