我有一个客户端/服务器软件在本地工作完美,但我不明白为什么,当我在远程aws ec2实例上设置服务器时,它不起作用。当客户端试图连接我得到了以下错误:akka aws ec2连接被拒绝
[08/03/2016 12:47:36.231] [ClientSystem1213-akka.remote.default-remote-dispatcher-6] [akka.tcp://[email protected]:2555/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FSolarServerSystem%4052.59.106.25%3A2552-0/endpointWriter] AssociationError [akka.tcp://[email protected]:2555] -> [akka.tcp://[email protected]:2552]: Error [Association failed with [akka.tcp://[email protected]:2552]] [
akka.remote.EndpointAssociationException: Association failed with [akka.tcp://[email protected]:2552]
Caused by: akka.remote.transport.netty.NettyTransportExceptionNoStack: Connection refused: /52.59.106.25:2552
]
在服务器上运行netstat的-tnlp给出如下:
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 ::ffff:127.0.0.1:2552 :::* LISTEN 4516/java
在AWS EC2安全组入站和出站开放所有TRAFIC (所有协议 - 所有端口)。
常见到客户端和服务器的阿卡CONF是
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = "127.0.0.1"
send-buffer-size = 5000000b
receive-buffer-size = 5000000b
maximum-frame-size = 2500000b
}
watch-failure-detector {
threshold = 100
acceptable-heartbeat-pause = 20 s
}
transport-failure-detector {
heartbeat-interval = 4 s
acceptable-heartbeat-pause = 20 s
}
}
}
(I复制粘贴德故障和缓冲来自Amazon AWS EC2 ports: connection refused一部分)
服务器只通过conf的部分是:
include "common"
akka {
remote.netty.tcp.port = 2552
}
客户端部分是:
include "common"
include "javafx-swing-dispatch"
akka {
remote.netty.tcp.port = 2555
remote {
log-config-on-start = on
log-sent-messages = on
log-received-messages = on
}
}
JavaFX的摇摆dispatch.conf感:
javafx-dispatcher {
type = "Dispatcher"
executor = "akka.dispatch.gui.JavaFXEventThreadExecutorServiceConfigurator"
throughput = 1
}
swing-dispatcher {
type = "Dispatcher"
executor = "akka.dispatch.gui.SwingEventThreadExecutorServiceConfigurator"
throughput = 1
}
(从https://gist.github.com/mucaho/8973013拍摄)
那里的问题来自任何线索?
在AWS EC2安全组入站和出站是开放的所有TRAFIC(所有协议 - 所有端口)。 – lorilan
运行akka系统的ec2实例是否在vpc中? –
它有一个vpc ID,所以我想是 – lorilan