Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cluster_manager.py script fails when stopping multiple instanses #849

Open
Yury-Fridlyand opened this issue Jan 22, 2024 · 2 comments
Open
Labels
bug Something isn't working tools Dev tools and utils

Comments

@Yury-Fridlyand
Copy link
Collaborator

Yury-Fridlyand commented Jan 22, 2024

Describe the bug

Script stops instanses, but causes and error though

Expected Behavior

No error should be there

Current Behavior

python3 utils/cluster_manager.py stop --prefix redis-cluster
INFO:root:## Executing cluster_manager.py with the following args:
  Namespace(host='127.0.0.1', tls=False, auth=None, log='info', logfile=None, action='stop', folder_path='/mnt/c/GitHub/babushka/utils/clusters', prefix='redis-cluster', cluster_folder=None, keep_folder=False)
INFO:root:2024-01-22 17:47:48.174133+00:00 Stopping script for cluster/s redis-cluster* in /mnt/c/GitHub/babushka/utils/clusters
LOG_FILE=/mnt/c/GitHub/babushka/utils/clusters/redis-cluster-2024-01-22T17:46:17Z-9JlZYa/cluster_manager.log
LOG_FILE=/mnt/c/GitHub/babushka/utils/clusters/redis-cluster-2024-01-22T17:46:46Z-6RPaER/cluster_manager.log
LOG_FILE=/mnt/c/GitHub/babushka/utils/clusters/redis-cluster-2024-01-22T17:47:26Z-zSuIPx/cluster_manager.log
ERROR:root:Failed to shutdown host 127.0.0.1:8000:
 Could not connect to Redis at 127.0.0.1:8000: Connection refused

Traceback (most recent call last):
  File "/mnt/c/GitHub/babushka/java/../utils/cluster_manager.py", line 1030, in <module>
    main()
  File "/mnt/c/GitHub/babushka/java/../utils/cluster_manager.py", line 1015, in main
    stop_clusters(
  File "/mnt/c/GitHub/babushka/java/../utils/cluster_manager.py", line 779, in stop_clusters
    stop_cluster(host, folder, use_tls, auth, logfile, keep_folder)
  File "/mnt/c/GitHub/babushka/java/../utils/cluster_manager.py", line 796, in stop_cluster
    stop_server(RedisServer(host, int(port)), cluster_folder, use_tls, auth)
  File "/mnt/c/GitHub/babushka/java/../utils/cluster_manager.py", line 681, in stop_server
    raise Exception(
Exception: Failed to execute command: ['redis-cli', '-h', '127.0.0.1', '-p', '8000', 'shutdown', 'nosave']
 Return code: 1
 Error: Could not connect to Redis at 127.0.0.1:8000: Connection refused

Reproduction Steps

Start standalone

python3 utils/cluster_manager.py start -p 6380 6381

Start cluster

python3 utils/cluster_manager.py start --cluster-mode -p 8000 8001 8002 8003 8004 8005

Try to stop all

python3 utils/cluster_manager.py stop --prefix redis-cluster

Possible Solution

No response

Additional Information/Context

No response

Client version used

N/A

Redis Version

6.0.16

OS

Linux

Language

Python

Language Version

3.10.12

Cluster information

No response

Logs

No response

Other information

No response

@Yury-Fridlyand Yury-Fridlyand added bug Something isn't working tools Dev tools and utils labels Jan 22, 2024
@Yury-Fridlyand
Copy link
Collaborator Author

UPD
I found that it happens when stop was called with --keep-folder or server(s) were stopped manually.

@shachlanAmazon
Copy link
Contributor

@barshaul @shohamazon was this fixed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working tools Dev tools and utils
Projects
None yet
Development

No branches or pull requests

2 participants