Akka.NET에서 remoting을 시작하는 방법을 보여준 모든 데모는 두 명의 액터가 localhost를 사용하여 동일한 컴퓨터에서 실행되는 가장 간단한 사용 사례를 보여줍니다.원격 주소에 연결하기 위해 Akka.NET 가져 오기
원격 컴퓨터에 연결하기 위해 Akka.NET 액터를 얻으려고하고 있는데 어려움에 처했습니다.
코드는 매우 간단하다 :
클라이언트 코드 :
var config = ConfigurationFactory.ParseString(@"
akka {
log-config-on-start = on
stdout-loglevel = DEBUG
loglevel = DEBUG
actor {
provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote""
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
deployment {
/remoteactor {
router = round-robin-pool
nr-of-instances = 5
remote = ""akka.tcp://[email protected]:666""
}
}
}
remote {
dot-netty.tcp {
port = 0
hostname = localhost
}
}
}
");
using (var system = ActorSystem.Create("system1", config))
{
Console.ReadLine();
}
서버 코드 : 나는 다른에 배우 프로세스를 실행할 때
var config = ConfigurationFactory.ParseString(@"
akka {
log-config-on-start = on
stdout-loglevel = DEBUG
loglevel = DEBUG
actor {
provider = ""Akka.Remote.RemoteActorRefProvider, Akka.Remote""
debug {
receive = on
autoreceive = on
lifecycle = on
event-stream = on
unhandled = on
}
}
remote {
dot-netty.tcp {
transport-protocol = tcp
port = 666
hostname = ""10.0.0.4"" //This is the local IP address
}
}
}
");
using (ActorSystem.Create("system2", config))
{
Console.ReadLine();
}
내가 성공적으로 연결할 수 있습니다 내 로컬 네트워크에 있지만 동일한 간단한 예제를 배포 할 때 구름 VM에 나는 다음과 같은 오류가 나타납니다 나는 또한 "127.0.0.1"을 사용하여 시도
[ERROR][11/9/2017 3:58:45 PM][Thread 0008][[akka://system2/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2Fsystem1%40localhost%3A28456-1/endpointWriter#1657012126]] Dropping message [Akka.Remote.DaemonMsgCreate] for non-local recipient [[akka.tcp://[email protected]:666/remote]] arriving at [akka.tcp://[email protected]:666] inbound addresses [akka.tcp://[email protected]:666]
Cause: Unknown
을하지만 그 중 하나가 로컬 또는 인터넷을 통해 작동하지 않습니다.
누구나 내가 잘못하고있는 것에 대한 입력을 제공 할 수 있습니까?
UPDATE는 :
나는 바인드 호스트 이름을 사용하고 이것이 내가 고통하고 믿는 NAT 문제를 해결하기 위해 예정대로 Akka.NET에서 사용할 수있는 옵션 포트에 결합하는 것을 시도했다. 불행하게도이 중 하나가 작동하지 않는 것 같습니다 아래와 같이, 나는 그런 호스트 이름과 IP 주소를 사용하여 다양한 구성 옵션을 시도 :
remote {
dot-netty.tcp {
port = 666
hostname = "13.73.xx.xx"
bind-port = 666
bind-hostname = "0.0.0.0"
}
}
내가 위의 구성은 시도 할 때 나타나는 오류 메시지 :
[ERROR][11/12/2017 5:19:58 AM][Thread 0003][Akka.Remote.Transport.DotNetty.TcpTransport] Failed to bind to 13.73.xx.xx:666; shutting down DotNetty transport.
Cause: System.AggregateException: One or more errors occurred. ---> System.Net.Sockets.SocketException: The requested address is not valid in its context
액터 시스템을 원격으로 실행할 때 첫 번째 로그 라인 중 하나는 실행 된 주소 정보입니다. 확인하고 싶을 수도 있습니다. – Horusiath
당신은 이것을 말하고 있습니까? [정보] [11/10/2017 3:22:57 PM] [스레드 0001] [remoting] 원격 시작; Remoting은 이제 주소를 수신합니다. [akka.tcp : //[email protected] : 666] [INFO] [11/10/2017 3:22:57 PM] [Thread 0001] [remoting] akka.tcp : //[email protected] : 666] –
'public-hostname = xxx.australiasoutheast.cloudapp.azure.com'를 원격 설정에 추가하면 어떨까요? – Evk