davy@davy-Aspire-E5-476G:~/7002$ cat n*
port 7002
cluster-enabled yes
cluster-config-file nodes.conf
cluster-node-timeout 5000
appendonly yes
davy@davy-Aspire-E5-476G:~/7002$ redis-server n2_redis.conf &
[3] 4534
davy@davy-Aspire-E5-476G:~/7002$ 4534:C 30 Oct 2023 20:57:41.182 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
4534:C 30 Oct 2023 20:57:41.182 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=4534, just started
4534:C 30 Oct 2023 20:57:41.182 # Configuration loaded
4534:M 30 Oct 2023 20:57:41.183 * Increased maximum number of open files to 10032 (it was originally set to 1024).
4534:M 30 Oct 2023 20:57:41.183 # Could not create server TCP listening socket *:7002: bind: Address already in use
[3]+ Exit 1 redis-server n2_redis.conf
davy@davy-Aspire-E5-476G:~/7002$ redis-cli -p 7002
127.0.0.1:7002> set k2 v2
(error) CLUSTERDOWN The cluster is down
I wonder why CLUSTERDOWN ? I thought I already activated it? with this redis-server n2_redis.conf &
The error message "CLUSTERDOWN The cluster is down" indicates that the Redis cluster is not running or is not properly configured.
Based on the provided information, it seems that the Redis server on port 7002 failed to start because the address is already in use. This could be due to another Redis instance running on the same port or another process using the port.
To resolve this issue, you can try the following steps:
Check if there are any other Redis instances running on the same port. You can use the lsof command to find the process using the port:
lsof -i :7002
If there is another process using the port, you can either stop that process or choose a different port for your Redis instance.
If there are no other processes using the port, it's possible that the previous Redis instance did not shut down properly and is still holding the port. In this case, you can try killing the previous Redis process using the kill command:
kill <pid>
Replace <pid> with the process ID of the previous Redis instance.
Once you have resolved the port conflict, you can start the Redis server again using the redis-server command:
redis-server n2_redis.conf &
Finally, you can connect to the Redis server using the redis-cli command and check if the cluster is up and running:
redis-cli -p 7002
If you continue to experience issues, please provide more details about your Redis configuration and any error messages you encounter.
davy@davy-Aspire-E5-476G:~$ lsof -i :7002
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
redis-ser 4475 davy 6u IPv6 49112 0t0 TCP *:7002 (LISTEN)
redis-ser 4475 davy 7u IPv4 49113 0t0 TCP *:7002 (LISTEN)
davy@davy-Aspire-E5-476G:~$ cd 7002
davy@davy-Aspire-E5-476G:~/7002$ redis-server n2_redis.conf &
[1] 5442
davy@davy-Aspire-E5-476G:~/7002$ 5442:C 30 Oct 2023 21:38:21.274 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
5442:C 30 Oct 2023 21:38:21.274 # Redis version=6.0.16, bits=64, commit=00000000, modified=0, pid=5442, just started
5442:C 30 Oct 2023 21:38:21.274 # Configuration loaded
5442:M 30 Oct 2023 21:38:21.276 * Increased maximum number of open files to 10032 (it was originally set to 1024).
5442:M 30 Oct 2023 21:38:21.277 # Could not create server TCP listening socket *:7002: bind: Address already in use
[1]+ Exit 1 redis-server n2_redis.conf
davy@davy-Aspire-E5-476G:~/7002$ redis-cli -p 7002
127.0.0.1:7002> redis-cli -p 7002
(error) ERR unknown command `redis-cli`, with args beginning with: `-p`, `7002`,
127.0.0.1:7002> set k2 v2
(error) CLUSTERDOWN The cluster is down