0

원격 IP 주소로 배우 시스템을 초기화하는 데 문제가 있습니다. 나는 akka 배우와 연극을 사용하고 있습니다! 뼈대. 코드와 원격 액터 시스템은 모두 원격 랙 공간 서버에 있습니다. 다른 서버에 원격 액터 시스템을 만들려고하면 해당 IP 주소에 바인딩되지 않습니다. 나는 Rackspace가 서버 간의 모든 연결을 열었 기 때문에 네트워크 또는 방화벽 문제라고 생각하지 않습니다.Akka 배우 시스템에 대한 원격 IP 주소에 바인딩하지 못했습니다.

[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] 

내가 여기에 원격 배우 시스템을 만드는 오전 :

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://[email protected]:2554" 
          #  router = "round-robin" 
          #  nr-of-instances = 10 
          #  target { 
          #    nodes = ["akka://[email protected]:2554", "akka://[email protected]:2554"] 
          #  } 
          } 
        } 
      } 
    } 
} 
: 난 내 Application.conf 파일에 remotecreation을 정의하는 경우

다음
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") 
    ... 
} 

이입니다 이것은 내가 무엇입니까 오류 메시지입니다

정의에 포함 된 common.conf 파일은 다음과 같습니다.

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 

    } 
    } 
} 

답변

1

아마도 다른 컴퓨터에서 해당 포트를 사용 중입니다. 해당 시스템에 로그인하고 netstat -anp | grep 2554을 루트로 실행하고 포트가 LISTEN 상태인지 확인하십시오. 그렇다면 프로세스 ID가 마지막 열에있게됩니다.

+0

답장을 보내 주셔서 감사합니다. 나는 원격 기계에 ssh 접속하여 수퍼 유저가되어 그 명령을 입력했다. 아무것도 반환되지 않았습니다. 그리고 grep없이이 작업을 수행했을 때 2554 포트를 찾을 수 없었습니다. netstat -l을 시도해 보았습니다.이 포트는 모든 수신 포트를 나열하고 거기에서 찾을 수 없었습니다. 또한 뭔가 듣고있는 모든 포트를 사용하고있는 것 같습니다. 나는 그들 중 한 곳으로 바꾸고 당신에게 업데이트를 줄 것이다. 당신의 도움을 주셔서 감사합니다 :). – BRS

+0

네, 구속력이 없었습니다. 나는 열린 것을 찾으려고 노력할 것이다. – BRS

+0

자, 이제 원격 IP 및 포트에 응용 프로그램 서비스를 만들어야했습니다. https://groups.google.com/forum/?fromgroups=#!topic/akka-user/-QMuZPQHiF0 – BRS