无法从同一 VPC 中的 EC2 实例连接到 DAX
Can't connect to DAX from EC2 instance in same VPC
我在我的 EC2 实例中,在与我的 DAX 集群相同的 VPC 中....集群的 SG 是默认的(允许所有),但我仍然无法连接
这是一个简短的代码示例:
from amazondax import AmazonDaxClient
dax = AmazonDaxClient(
endpoint_url="mycluster.i5cagb.clustercfg.dax.use1.cache.amazonaws.com:8111"
)
稍等片刻后,我收到此错误:
Failed to configure cluster endpoints from
[('mycluster.i5cagb.clustercfg.dax.use1.cache.amazonaws.com', 8111)]
我也尝试用 nc
进行诊断:
$ nc -zv mycluster.i5cagb.clustercfg.dax.use1.cache.amazonaws.com 8111
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection to 172.31.43.69 failed: Connection timed out.
Ncat: Trying next address...
Ncat: Connection to 172.31.58.224 failed: Connection timed out.
Ncat: Trying next address...
Ncat: Connection timed out.
正如@AbdelrahmanElhaddad 在他的评论中指出的那样,这最终成为一个安全组问题。
我在我的 EC2 实例中,在与我的 DAX 集群相同的 VPC 中....集群的 SG 是默认的(允许所有),但我仍然无法连接
这是一个简短的代码示例:
from amazondax import AmazonDaxClient
dax = AmazonDaxClient(
endpoint_url="mycluster.i5cagb.clustercfg.dax.use1.cache.amazonaws.com:8111"
)
稍等片刻后,我收到此错误:
Failed to configure cluster endpoints from
[('mycluster.i5cagb.clustercfg.dax.use1.cache.amazonaws.com', 8111)]
我也尝试用 nc
进行诊断:
$ nc -zv mycluster.i5cagb.clustercfg.dax.use1.cache.amazonaws.com 8111
Ncat: Version 7.50 ( https://nmap.org/ncat )
Ncat: Connection to 172.31.43.69 failed: Connection timed out.
Ncat: Trying next address...
Ncat: Connection to 172.31.58.224 failed: Connection timed out.
Ncat: Trying next address...
Ncat: Connection timed out.
正如@AbdelrahmanElhaddad 在他的评论中指出的那样,这最终成为一个安全组问题。