Repository: redis/redis

Issue:
[BUG] cannot create cluster with docker compose service name
**Describe the bug**

Use docker compose to launch 6 Redis instances and create a cluster. But cannot use `redis-cli --cluster create rc-node-1:6379 rc-node-2:6379 ...` as stated in PR https://github.com/redis/redis/pull/10436.

The error message is:

```
ee-redis-cluster-create-1     | Node rc-node-2:6379 replied with error:
ee-redis-cluster-create-1     | ERR Invalid node address specified: rc-node-1:6379
```

Tried both on Mac M1 and Redhat.

**To reproduce**

Use the following docker compose file to reproduce: `docker compose -f docker-compose.yaml up`.

```yaml
version: '3.5'
name: ee-redis-cluster
services:
  rc-node-1:
    image: redis:latest
    command: redis-server --port 6379 --cluster-enabled yes --cluster-port 16379 --cluster-config-file rc-node-1.conf --cluster-node-timeout 5000 --appendonly yes --cluster-announce-ip 192.168.16.11 --cluster-announce-port 6379 --cluster-announce-bus-port 16379 --loglevel notice
    networks:
      default:
        ipv4_address: 192.168.16.11
  rc-node-2:
    image: redis:latest
    command: redis-server --port 6379 --cluster-enabled yes --cluster-port 16379 --cluster-config-file rc-node-2.conf --cluster-node-timeout 5000 --appendonly yes --cluster-announce-ip 192.168.16.12 --cluster-announce-port 6379 --cluster-announce-bus-port 16379 --loglevel notice
    networks:
      default:
        ipv4_address: 192.168.16.12
  rc-node-3:
    image: redis:latest
    command: redis-server --port 6379 --cluster-enabled yes --cluster-port 16379 --cluster-config-file rc-node-3.conf --cluster-node-timeout 5000 --appendonly yes --cluster-announce-ip 192.168.16.13 --cluster-announce-port 6379 --cluster-announce-bus-port 16379 --loglevel notice
    networks:
      default:
        ipv4_address: 192.168.16.13
  rc-node-4:
    image: redis:latest
    command: redis-server --port 6379 --cluster-enabled yes --cluster-port 16379 --cluster-config-file rc-node-4.conf --cluster-node-timeout 5000 --appendonly yes --cluster-announce-ip 192.168.16.14 --cluster-announce-port 6379 --cluster-announce-bus-port 16379 --loglevel notice
    networks:
      default:
        ipv4_address: 192.168.16.14
  rc-node-5:
    image: redis:latest
    command: redis-server --port 6379 --cluster-enabled yes --cluster-port 16379 --cluster-config-file rc-node-5.conf --cluster-node-timeout 5000 --appendonly yes --cluster-announce-ip 192.168.16.15 --cluster-announce-port 6379 --cluster-announce-bus-port 16379 --loglevel notice
    networks:
      default:
        ipv4_address: 192.168.16.15
  rc-node-6:
    image: redis:latest
    command: redis-server --port 6379 --cluster-enabled yes --cluster-port 16379 --cluster-config-file rc-node-6.conf --cluster-node-timeout 5000 --appendonly yes --cluster-announce-ip 192.168.16.16 --cluster-announce-port 6379 --cluster-announce-bus-port 16379 --loglevel notice
    networks:
      default:
        ipv4_address: 192.168.16.16
  create:
    image: redis:latest
    ## Must add option `--cluster-yes`
    ## Must use IP address instead of service name
    # command: redis-cli --cluster create 192.168.16.11:6379 192.168.16.12:6379 192.168.16.13:6379 192.168.16.14:6379 192.168.16.15:6379 192.168.16.16:6379 --cluster-replicas 1 --cluster-yes
    command: redis-cli --cluster create rc-node-1:6379 rc-node-2:6379 rc-node-3:6379 rc-node-4:6379 rc-node-5:6379 rc-node-6:6379 --cluster-replicas 1 --cluster-yes
    depends_on:
    - rc-node-1
    - rc-node-2
    - rc-node-3
    - rc-node-4
    - rc-node-5
    - rc-node-6
    networks:
      default:
        ipv4_address: 192.168.16.17

## define new newwork
networks:
  default:
    name: ee-redis-cluster_default
    driver: bridge
    attachable: true
    ipam:
      config:
      - subnet: 192.168.16.0/20
        gateway: 192.168.16.1
```

**Expected behavior**

Should create Redis cluster but not. Here is debug error:

```
[+] Running 8/7
 ⠿ Network ee-redis-cluster_default        Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-rc-node-4-1  Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-rc-node-1-1  Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-rc-node-5-1  Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-rc-node-6-1  Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-rc-node-3-1  Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-rc-node-2-1  Created                                                                                                                                                                                                                       0.1s
 ⠿ Container ee-redis-cluster-create-1     Created                                                                                                                                                                                                                       0.0s
Attaching to ee-redis-cluster-create-1, ee-redis-cluster-rc-node-1-1, ee-redis-cluster-rc-node-2-1, ee-redis-cluster-rc-node-3-1, ee-redis-cluster-rc-node-4-1, ee-redis-cluster-rc-node-5-1, ee-redis-cluster-rc-node-6-1
ee-redis-cluster-rc-node-4-1  | 1:C 18 Aug 2022 09:24:11.269 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
ee-redis-cluster-rc-node-4-1  | 1:C 18 Aug 2022 09:24:11.270 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
ee-redis-cluster-rc-node-4-1  | 1:C 18 Aug 2022 09:24:11.270 # Configuration loaded
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.270 * monotonic clock: POSIX clock_gettime
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.270 * No cluster configuration found, I'm 161a3059adb4f1b42f78386225e366e8700c716d
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.272 * Running mode=cluster, port=6379.
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.272 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.272 # Server initialized
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.272 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.272 . The AOF directory appendonlydir doesn't exist
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.279 * Creating AOF base file appendonly.aof.1.base.rdb on server start
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.293 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.293 * Ready to accept connections
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.293 . 0 clients connected (0 replicas), 1587464 bytes in use
ee-redis-cluster-rc-node-3-1  | 1:C 18 Aug 2022 09:24:11.377 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
ee-redis-cluster-rc-node-3-1  | 1:C 18 Aug 2022 09:24:11.377 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
ee-redis-cluster-rc-node-3-1  | 1:C 18 Aug 2022 09:24:11.377 # Configuration loaded
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.377 * monotonic clock: POSIX clock_gettime
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.378 * No cluster configuration found, I'm 9884d05c506f9191beb6cf482ed4f6275d3e5aa3
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.380 * Running mode=cluster, port=6379.
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.380 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.380 # Server initialized
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.380 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.381 . The AOF directory appendonlydir doesn't exist
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.382 * Creating AOF base file appendonly.aof.1.base.rdb on server start
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.390 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.390 * Ready to accept connections
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.390 . 0 clients connected (0 replicas), 1587528 bytes in use
ee-redis-cluster-rc-node-6-1  | 1:C 18 Aug 2022 09:24:11.445 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
ee-redis-cluster-rc-node-6-1  | 1:C 18 Aug 2022 09:24:11.445 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
ee-redis-cluster-rc-node-6-1  | 1:C 18 Aug 2022 09:24:11.445 # Configuration loaded
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.445 * monotonic clock: POSIX clock_gettime
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.445 * No cluster configuration found, I'm 8a221b622e251b04dcae6eb648ac1003e57729ce
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.448 * Running mode=cluster, port=6379.
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.448 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.448 # Server initialized
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.448 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.448 . The AOF directory appendonlydir doesn't exist
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.450 * Creating AOF base file appendonly.aof.1.base.rdb on server start
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.453 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.453 * Ready to accept connections
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.454 . 0 clients connected (0 replicas), 1587528 bytes in use
ee-redis-cluster-rc-node-5-1  | 1:C 18 Aug 2022 09:24:11.465 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
ee-redis-cluster-rc-node-5-1  | 1:C 18 Aug 2022 09:24:11.465 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
ee-redis-cluster-rc-node-5-1  | 1:C 18 Aug 2022 09:24:11.465 # Configuration loaded
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.466 * monotonic clock: POSIX clock_gettime
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.466 * No cluster configuration found, I'm d332030650d88ace8c5e2cc658ce74cf76b3f89d
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.470 * Running mode=cluster, port=6379.
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.470 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.470 # Server initialized
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.470 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.470 . The AOF directory appendonlydir doesn't exist
ee-redis-cluster-rc-node-1-1  | 1:C 18 Aug 2022 09:24:11.474 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
ee-redis-cluster-rc-node-1-1  | 1:C 18 Aug 2022 09:24:11.474 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
ee-redis-cluster-rc-node-1-1  | 1:C 18 Aug 2022 09:24:11.474 # Configuration loaded
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.474 * monotonic clock: POSIX clock_gettime
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.474 * No cluster configuration found, I'm 653a659d24c40d3e9ec64cf0ce2beb5eea09b9fb
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.476 * Creating AOF base file appendonly.aof.1.base.rdb on server start
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.476 * Running mode=cluster, port=6379.
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.476 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.476 # Server initialized
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.476 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.477 . The AOF directory appendonlydir doesn't exist
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.479 * Creating AOF base file appendonly.aof.1.base.rdb on server start
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.479 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.479 * Ready to accept connections
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.479 . 0 clients connected (0 replicas), 1587432 bytes in use
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.481 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.481 * Ready to accept connections
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.481 . 0 clients connected (0 replicas), 1587528 bytes in use
ee-redis-cluster-rc-node-2-1  | 1:C 18 Aug 2022 09:24:11.490 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
ee-redis-cluster-rc-node-2-1  | 1:C 18 Aug 2022 09:24:11.490 # Redis version=7.0.4, bits=64, commit=00000000, modified=0, pid=1, just started
ee-redis-cluster-rc-node-2-1  | 1:C 18 Aug 2022 09:24:11.490 # Configuration loaded
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.491 * monotonic clock: POSIX clock_gettime
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.491 * No cluster configuration found, I'm 2ca6a2cab16d73eb3624d19f0d35e4037761b8f6
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.496 * Running mode=cluster, port=6379.
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.496 # WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.496 # Server initialized
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.496 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.496 . The AOF directory appendonlydir doesn't exist
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.498 * Creating AOF base file appendonly.aof.1.base.rdb on server start
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.500 * Creating AOF incr file appendonly.aof.1.incr.aof on server start
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.500 * Ready to accept connections
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.500 . 0 clients connected (0 replicas), 1587432 bytes in use
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.818 - Accepted 192.168.16.17:53354
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.819 - Accepted 192.168.16.17:39396
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.820 - Accepted 192.168.16.17:40206
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.821 - Accepted 192.168.16.17:49758
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.821 - Accepted 192.168.16.17:45876
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.822 - Accepted 192.168.16.17:59426
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.828 # configEpoch set to 1 via CLUSTER SET-CONFIG-EPOCH
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.828 # configEpoch set to 2 via CLUSTER SET-CONFIG-EPOCH
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.828 # configEpoch set to 3 via CLUSTER SET-CONFIG-EPOCH
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.828 # configEpoch set to 4 via CLUSTER SET-CONFIG-EPOCH
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.828 # configEpoch set to 5 via CLUSTER SET-CONFIG-EPOCH
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.828 # configEpoch set to 6 via CLUSTER SET-CONFIG-EPOCH
ee-redis-cluster-create-1     | >>> Performing hash slots allocation on 6 nodes...
ee-redis-cluster-create-1     | Master[0] -> Slots 0 - 5460
ee-redis-cluster-create-1     | Master[1] -> Slots 5461 - 10922
ee-redis-cluster-create-1     | Master[2] -> Slots 10923 - 16383
ee-redis-cluster-create-1     | Adding replica rc-node-5:6379 to rc-node-1:6379
ee-redis-cluster-create-1     | Adding replica rc-node-6:6379 to rc-node-2:6379
ee-redis-cluster-create-1     | Adding replica rc-node-4:6379 to rc-node-3:6379
ee-redis-cluster-create-1     | M: 653a659d24c40d3e9ec64cf0ce2beb5eea09b9fb rc-node-1:6379
ee-redis-cluster-create-1     |    slots:[0-5460] (5461 slots) master
ee-redis-cluster-create-1     | M: 2ca6a2cab16d73eb3624d19f0d35e4037761b8f6 rc-node-2:6379
ee-redis-cluster-create-1     |    slots:[5461-10922] (5462 slots) master
ee-redis-cluster-create-1     | M: 9884d05c506f9191beb6cf482ed4f6275d3e5aa3 rc-node-3:6379
ee-redis-cluster-create-1     |    slots:[10923-16383] (5461 slots) master
ee-redis-cluster-create-1     | S: 161a3059adb4f1b42f78386225e366e8700c716d rc-node-4:6379
ee-redis-cluster-create-1     |    replicates 9884d05c506f9191beb6cf482ed4f6275d3e5aa3
ee-redis-cluster-create-1     | S: d332030650d88ace8c5e2cc658ce74cf76b3f89d rc-node-5:6379
ee-redis-cluster-create-1     |    replicates 653a659d24c40d3e9ec64cf0ce2beb5eea09b9fb
ee-redis-cluster-create-1     | S: 8a221b622e251b04dcae6eb648ac1003e57729ce rc-node-6:6379
ee-redis-cluster-create-1     |    replicates 2ca6a2cab16d73eb3624d19f0d35e4037761b8f6
ee-redis-cluster-create-1     | >>> Nodes configuration updated
ee-redis-cluster-create-1     | >>> Assign a different config epoch to each node
ee-redis-cluster-create-1     | >>> Sending CLUSTER MEET messages to join the cluster
ee-redis-cluster-create-1     | Node rc-node-2:6379 replied with error:
ee-redis-cluster-create-1     | ERR Invalid node address specified: rc-node-1:6379
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:11.829 - Client closed connection id=3 addr=192.168.16.17:39396 laddr=192.168.16.12:6379 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=37632 events=r cmd=cluster|meet user=default redir=-1 resp=2
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:11.829 - Client closed connection id=3 addr=192.168.16.17:40206 laddr=192.168.16.13:6379 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=37632 events=r cmd=cluster|set-config-epoch user=default redir=-1 resp=2
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:11.829 - Client closed connection id=3 addr=192.168.16.17:53354 laddr=192.168.16.11:6379 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=37632 events=r cmd=cluster|set-config-epoch user=default redir=-1 resp=2
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:11.829 - Client closed connection id=3 addr=192.168.16.17:45876 laddr=192.168.16.15:6379 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=37632 events=r cmd=cluster|set-config-epoch user=default redir=-1 resp=2
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:11.829 - Client closed connection id=3 addr=192.168.16.17:49758 laddr=192.168.16.14:6379 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=37632 events=r cmd=cluster|set-config-epoch user=default redir=-1 resp=2
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:11.829 - Client closed connection id=3 addr=192.168.16.17:59426 laddr=192.168.16.16:6379 fd=12 name= age=0 idle=0 flags=N db=0 sub=0 psub=0 ssub=0 multi=-1 qbuf=0 qbuf-free=20474 argv-mem=0 multi-mem=0 rbs=16384 rbp=16384 obl=0 oll=0 omem=0 tot-mem=37632 events=r cmd=cluster|set-config-epoch user=default redir=-1 resp=2
ee-redis-cluster-create-1 exited with code 1
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:16.303 . 0 clients connected (0 replicas), 1711544 bytes in use
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:16.399 . 0 clients connected (0 replicas), 1711448 bytes in use
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:16.464 . 0 clients connected (0 replicas), 1711480 bytes in use
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:16.489 . 0 clients connected (0 replicas), 1711512 bytes in use
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:16.490 . 0 clients connected (0 replicas), 1711448 bytes in use
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:16.510 . 0 clients connected (0 replicas), 1736200 bytes in use
ee-redis-cluster-rc-node-4-1  | 1:M 18 Aug 2022 09:24:21.311 . 0 clients connected (0 replicas), 1711544 bytes in use
ee-redis-cluster-rc-node-3-1  | 1:M 18 Aug 2022 09:24:21.407 . 0 clients connected (0 replicas), 1711448 bytes in use
ee-redis-cluster-rc-node-6-1  | 1:M 18 Aug 2022 09:24:21.474 . 0 clients connected (0 replicas), 1711480 bytes in use
ee-redis-cluster-rc-node-5-1  | 1:M 18 Aug 2022 09:24:21.498 . 0 clients connected (0 replicas), 1711512 bytes in use
ee-redis-cluster-rc-node-1-1  | 1:M 18 Aug 2022 09:24:21.498 . 0 clients connected (0 replicas), 1711448 bytes in use
ee-redis-cluster-rc-node-2-1  | 1:M 18 Aug 2022 09:24:21.518 . 0 clients connected (0 replicas), 1736200 bytes in use
```

**Additional information**

Docker info:

```
~ $ docker info
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.8.2-docker)
  compose: Docker Compose (Docker Inc., v2.6.0)
  scan: Docker Scan (Docker Inc., v0.17.0)

Server:
 Containers: 7
  Running: 0
  Paused: 0
  Stopped: 7
 Images: 1
 Server Version: 20.10.17
 Storage Driver: overlay2
  Backing Filesystem: xfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 0197261a30bf81f1ee8e6a4dd2dea0ef95d67ccb
 runc version: v1.1.3-0-g6724737
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.18.0-372.19.1.el8_6.x86_64
 Operating System: Red Hat Enterprise Linux 8.6 (Ootpa)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 7.238GiB
 Name: ip-172-31-85-34.ec2.internal
 ID: 47GA:NWUI:TVSE:RS7U:4RGM:PCSW:4KDL:HV4Y:PFGK:SM5H:H7BP:6QHP
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
```

Docker compose:

```
~ $ docker compose version
Docker Compose version v2.6.0
```


Discussion:
(Please understand that my English is not good enough.)
I have the same problem.

I think it's a 7.0.3 release version problem.
Isn't there a problem with Commit https://github.com/redis/redis/commit/35e8ae3eb5f80ebb5cad5b509d1fde56176bca0d

File: redis_cli.c
Original Line: 6330~6331

Original Code
```
reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d",
                                first_ip, first->port);
```
Changed Code
```
if (first->bus_port == 0 || (first->bus_port == first->port + CLUSTER_MANAGER_PORT_INCR)) {
    /* CLUSTER MEET bus-port parameter was added in 4.0.
     * So if (bus_port == 0) or (bus_port == port + CLUSTER_MANAGER_PORT_INCR),
     * we just call CLUSTER MEET with 2 arguments, using the old form. */
    reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d",
                                    first->ip, first->port);
} else {
    reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d %d",
                                    first->ip, first->port, first->bus_port);
}
```
Cause: Use the third parameter as 'first->ip' instead of 'first_ip' in the process of reusing the function from the old code.

P.S. I may not be the cause because I have no knowledge of the Redis source.

@seesoon9 can you try older version? like 7.0.2, before the commit. i will take a deep look this weekend
@enjoy-binbin confirmed @seesoon9's comments.

7.0.2 works but 7.0.3 onwards does not work. The code should use `first_ip` instead `first->ip` as `first_ip` stores the resolved IP addresses.
@outsinre thanks, i also verified it, sorry, it was my bad, somehow i break #10436 , i guess due to come conflict
and i didn't read the PR and #10436 doesn't have test cases for some reason (see top comment and the discussion)
it will be fix in the next release

Patch:
diff --git a/src/redis-cli.c b/src/redis-cli.c
index 131e79a7854..0a22598d2ea 100644
--- a/src/redis-cli.c
+++ b/src/redis-cli.c
@@ -6341,10 +6341,10 @@ static int clusterManagerCommandCreate(int argc, char **argv) {
                  * So if (bus_port == 0) or (bus_port == port + CLUSTER_MANAGER_PORT_INCR),
                  * we just call CLUSTER MEET with 2 arguments, using the old form. */
                 reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d",
-                                                first->ip, first->port);
+                                                first_ip, first->port);
             } else {
                 reply = CLUSTER_MANAGER_COMMAND(node, "cluster meet %s %d %d",
-                                                first->ip, first->port, first->bus_port);
+                                                first_ip, first->port, first->bus_port);
             }
             int is_err = 0;
             if (reply != NULL) {
@@ -6535,7 +6535,7 @@ static int clusterManagerCommandAddNode(int argc, char **argv) {
                                         first_ip, first->port);
     } else {
         reply = CLUSTER_MANAGER_COMMAND(new_node, "CLUSTER MEET %s %d %d",
-                                        first->ip, first->port, first->bus_port);
+                                        first_ip, first->port, first->bus_port);
     }
 
     if (!(success = clusterManagerCheckRedisReply(new_node, reply, NULL)))