Amazon ec2 akka aws ec2连接被拒绝

Amazon ec2 akka aws ec2连接被拒绝,amazon-ec2,akka,Amazon Ec2,Akka,我有一个客户端/服务器软件在本地运行得非常好,但我不明白为什么,当我在远程aws ec2实例上设置服务器时,它不工作。当客户端尝试连接时,我收到以下错误: [08/03/2016 12:47:36.231] [ClientSystem1213-akka.remote.default-remote-dispatcher-6] [akka.tcp://ClientSystem1213@127.0.0.1:2555/system/endpointManager/reliableEndpoint

我有一个客户端/服务器软件在本地运行得非常好,但我不明白为什么,当我在远程aws ec2实例上设置服务器时,它不工作。当客户端尝试连接时,我收到以下错误:

    [08/03/2016 12:47:36.231] [ClientSystem1213-akka.remote.default-remote-dispatcher-6] [akka.tcp://ClientSystem1213@127.0.0.1:2555/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FSolarServerSystem%4052.59.106.25%3A2552-0/endpointWriter] AssociationError [akka.tcp://ClientSystem1213@127.0.0.1:2555] -> [akka.tcp://SolarServerSystem@52.59.106.25:2552]: Error [Association failed with [akka.tcp://SolarServerSystem@52.59.106.25:2552]] [
akka.remote.EndpointAssociationException: Association failed with [akka.tcp://SolarServerSystem@52.59.106.25: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安全组入站和出站对所有流量开放(所有协议-所有端口)

客户端和服务器共用的akka 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从复制粘贴消除故障和缓冲部分)

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-swing-dispatch.conf是:

javafx-dispatcher {
  type = "Dispatcher"
  executor = "akka.dispatch.gui.JavaFXEventThreadExecutorServiceConfigurator"
  throughput = 1
}

swing-dispatcher {
  type = "Dispatcher"
  executor = "akka.dispatch.gui.SwingEventThreadExecutorServiceConfigurator"
  throughput = 1
}
(摘自)


有问题的线索吗?

您需要在ec2实例的安全配置中允许流量,因为您需要打开用于akka系统的端口

您需要在ec2实例的安全配置中允许流量,因为您需要打开用于akka系统的端口

这实际上是一个akka配置问题。aws ec2实例具有公共和私有ip。公共ip在aws控制台的运行实例屏幕上可见。私有ip在同一屏幕底部的“描述”选项卡中可见(默认情况下在实例提示中可见)

这两个不同的地址必须通知akka配置,如下所示:

akka.remote.netty.tcp {
     hostname = "XX.XX.XX.XX"      # external/public (logical) hostname
     port = 2555                   # external/public (logical) port

     bind-hostname = "192.168.0.4" # internal/private (bind) hostname
     bind-port = 2555              # internal/private (bind) port
}

这实际上是一个akka配置问题。aws ec2实例具有公共和私有ip。公共ip在aws控制台的运行实例屏幕上可见。私有ip在同一屏幕底部的“描述”选项卡中可见(默认情况下在实例提示中可见)

这两个不同的地址必须通知akka配置,如下所示:

akka.remote.netty.tcp {
     hostname = "XX.XX.XX.XX"      # external/public (logical) hostname
     port = 2555                   # external/public (logical) port

     bind-hostname = "192.168.0.4" # internal/private (bind) hostname
     bind-port = 2555              # internal/private (bind) port
}

aws ec2安全组入站和出站对所有流量开放(所有协议-所有端口)。运行akka系统的ec2实例是否在vpc中?它有一个vpc id,因此我想是的,请检查实例是否能够通过从实例运行ping命令来相互ping。这里有一些需要挖掘的内容。我已经尝试成功地从我的计算机ping实例,但我没有尝试相反的方法>\u<而且我确实无法从实例ping我的计算机aws ec2安全组入站和出站对所有流量开放(所有协议-所有端口).运行akka系统的ec2实例是否在vpc中?它有一个vpc id,因此我想是的,请检查实例是否能够通过从实例运行ping命令来相互ping。这里有一些需要挖掘的内容。我已经尝试成功地从我的计算机ping实例,但我没有尝试相反的方法>\u<,而且实际上我无法从实例ping我的计算机,因为它只与私有IP一起工作。我不需要有公共IP部分。但是谢谢你的提问,因为它只使用了私有IP。我不需要有公共IP部分。但是谢谢你的提问