简体   繁体   English

远程客户端无法连接到在 Azure VM 中运行的 redisai docker 容器

[英]Remote client can't connect to redisai docker container running in an Azure VM

I am running two VM's in Azure.我在 Azure 中运行两个虚拟机。 One contains the docker container running RedisAI.一个包含运行 RedisAI 的 docker 容器。 Accessing that one via the local VM (by ssh-ing into it) works just fine.通过本地虚拟机(通过 ssh-ing 进入)访问该虚拟机就可以了。

The redisai container is run on this VM via the command: redisai 容器通过以下命令在此 VM 上运行:

sudo docker run -p 6379:6379 --gpus all -it --rm redisai/redisai:latest-gpu

The other VM runs a remote client trying to access the other VM redis-cli -h <IP-ADDR> which results in Could not connect to Redis at <IP-ADDR>:6379: Connection timed out另一个 VM 运行一个远程客户端,试图访问另一个 VM redis-cli -h <IP-ADDR> ,这导致Could not connect to Redis at <IP-ADDR>:6379: Connection timed out

While typing up the question, I figured out the answer.在输入问题时,我想出了答案。

I had to allow inbound port 6379 from all sources on both of the VM's in order to a connection to occur over the NSG.我必须允许两个 VM 上所有来源的入站端口 6379 才能通过 NSG 进行连接。

入站端口规则

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM