-
Hello. Thank you for this! I'm trying to test a lambda function locally using SAM, running in a docker container. I'm able to make the initial RedisCluster() client connection but running any commands causes connection refused errors until it ends in a TTL Exhausted error. I've tried creating a network bridge, specifying host_port_remap but can't seem to make the two containers communicate properly. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Admittedly my Docker skills are a bit thin so it took me a while to understand what was going on. I figured it was an ip address mapping issue between the 2 containers and that I needed to implement a host_port_remap but wasn't sure what the right settings should be. I used docker container inspect to find the IP address and used that as the "to_host". I left out the ports in the mapping and it works! host_port_remap=[ |
Beta Was this translation helpful? Give feedback.
Admittedly my Docker skills are a bit thin so it took me a while to understand what was going on. I figured it was an ip address mapping issue between the 2 containers and that I needed to implement a host_port_remap but wasn't sure what the right settings should be.
I used docker container inspect to find the IP address and used that as the "to_host". I left out the ports in the mapping and it works!
host_port_remap=[
{
'from_host': '127.0.0.1',
'to_host': '172.27.0.2'
}
]