Skip to content

Redis Cluster connection on minikube times out #1691

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

Closed
gopherine opened this issue Mar 10, 2021 · 5 comments
Closed

Redis Cluster connection on minikube times out #1691

gopherine opened this issue Mar 10, 2021 · 5 comments

Comments

@gopherine
Copy link

gopherine commented Mar 10, 2021

Expected Behavior

Connect to redis cluster(running on minikube) on local machine

Current Behavior

connection times out when using NewClusterClient
get error https://serverfault.com/questions/812156/redis-cluster-error-moved redis cluster moved when using NewClient

Steps to Reproduce

  • Installed redis cluster using helm charts
  • expose using nodeport ot port forward on minikube
	redisClient := redis.NewClusterClient(&redis.ClusterOptions{
		Addrs:    []string{"127.0.0.1:6379"},
		Password: "M2eVOyDXqd",
	})

	result, err := redisClient.Ping(context.TODO()).Result()
	if err != nil {
		log.Panic(err)
	}
	fmt.Println("connected", result)

the above code times out, I am running this one macos bigsur

@gopherine gopherine changed the title Redis Cluster on minikube Redis Cluster connection on minikube times out Mar 10, 2021
@monkey92t
Copy link
Collaborator

the information you provided is too little. I think it might be a problem with the minikube network settings?
I have not used minikube, but I have not found any problems when using k8s redis cluster
you can try to use redis-cli to test, or use tools to track network packets

@gopherine
Copy link
Author

gopherine commented Mar 12, 2021

the information you provided is too little. I think it might be a problem with the minikube network settings?
I have not used minikube, but I have not found any problems when using k8s redis cluster
you can try to use redis-cli to test, or use tools to track network packets

If minikube settings had problem, it would also not help with a single instance connection but the problem happens only for cluster

I can successfully connect using redis-cli problem occurs only with the go program

Can you guide me through what extra info you need, Because all i did is launch redis cluster and basically try to run the above code. I am not using load balancer but nodeport to expose the endpoints. if that is something different here so i want to be able to connect to the cluster without using loadbalancer

@monkey92t
Copy link
Collaborator

can you provide the redis and minikube versions used? And the configuration items of minikube used (if any, such as yaml file) and go、go-redis version

I try to copy your environment tomorrow (it's now night in my country) to track the work of go-redis.

@monkey92t
Copy link
Collaborator

same #1698

@lily-lee
Copy link

lily-lee commented Mar 6, 2022

Expected Behavior

Connect to redis cluster(running on minikube) on local machine

Current Behavior

connection times out when using NewClusterClient get error https://serverfault.com/questions/812156/redis-cluster-error-moved redis cluster moved when using NewClient

Steps to Reproduce

  • Installed redis cluster using helm charts
  • expose using nodeport ot port forward on minikube
	redisClient := redis.NewClusterClient(&redis.ClusterOptions{
		Addrs:    []string{"127.0.0.1:6379"},
		Password: "M2eVOyDXqd",
	})

	result, err := redisClient.Ping(context.TODO()).Result()
	if err != nil {
		log.Panic(err)
	}
	fmt.Println("connected", result)

the above code times out, I am running this one macos bigsur

i met the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants