Comments (10)
Hi!
Do you have a sample container that we can use to reproduce the issue?
from charts.
Let me make a sample one.
from charts.
I don't have an image to share but I can share a code example and dockerfile config:
package main
import (
"log"
"time"
"github.com/redis/go-redis/v9"
)
func redis_connect() {
rdb = redis.NewClusterClient(&redis.ClusterOptions{
Addrs: []string{"redis-redis-cluster:6379"},
Password: "", // no password set
})
status := rdb.Set(appContext, "test", "5", 6*time.Second)
status2 := rdb.Set(appContext, "test2", "5", 6*time.Second)
if status.Val() != "OK" {
log.Fatalf("ERROR: Redis Key Set Failed: %s", status)
}
if status2.Val() != "OK" {
log.Fatalf("ERROR: Redis Key Set Failed: %s", status)
}
}
FROM golang:1.20 as builder
# Set the Current Working Directory inside the container
WORKDIR /app
# Copy go mod and sum files
COPY go.mod go.sum ./
# Download all dependencies. Dependencies will be cached if the go.mod and go.sum files are not changed
RUN go mod download
# Copy the source from the current directory to the Working Directory inside the container
COPY . .
# Build the command inside the container.
RUN CGO_ENABLED=0 GOOS=linux go build -v -o go-app
container can be run with /go-app
from charts.
I've tried multiple different configurations:
Using the normal client connection to a single node via the headless service as well as passing just the master nodes and then all the nodes to the cluster config.
No matter what, it will work for a few commands then fail when it gets to a node without any ip or port:
Redis Key Set Failed: ex 6: dial tcp :0: connect: connection refused
from charts.
I've also tried the standard redis chart, but get ERR This instance has cluster support disabled
when trying to connect to the cluster
from charts.
Is the client being used inside the cluster or outside the cluster?
from charts.
Inside the minikube cluster
from charts.
Did you try running the equivalent commands via the redis-client CLI directly? As explained in the Helm notes, you can run the client like this:
$ helm install redis oci://registry-1.docker.io/bitnamicharts/redis-cluster --version 10.0.2 --set "usePassword=false"
$ helm get notes redis
$ kubectl run redis-redis-cluster-client --rm -it --restart='Never' --image docker.io/bitnami/redis-cluster:7.2.4-debian-12-r12 -- bash
$$ redis-cli -c -h redis-redis-cluster
And then enter some commands:
10.244.0.117:6379> ping
PONG
10.244.0.117:6379> SET test '5' EX 6
OK
10.244.0.117:6379> SET test2 '5' EX 6
OK
10.244.0.117:6379> GET test
"5"
10.244.0.117:6379> GET test2
"5"
# wait some time to let the keys expire...
10.244.0.117:6379> GET test
(nil)
10.244.0.117:6379> GET test2
(nil)
Those commands work consistently for me without any "connection refused" errors. Could it be a bug in your code or any specific problem in your k8s cluster?
from charts.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
from charts.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.
from charts.
Related Issues (20)
- [bitnami/mastodon] Mastodon shows a blank page when the ingress otpion is enabled in the values file with traefik ingress controler
- [bitnami/keycloak] Keycloak parameters missing documentation for tag value HOT 1
- Back-off restarting failed container kafka-init in pod HOT 1
- [bitnami/keycloak] The default value of existingSecretHostKey, existingSecretUserKey, etc is not working HOT 5
- [bitnami/minio]Console web ui creating Access Keys failed, this causes the pod to restarted. HOT 3
- [bitnami/mongodb] replicaSetConfigurationSettings.sh script always has usernameAndPassword empty because we inject rootPassword from Vault HOT 1
- [bitnami/redis-cluster] Possibility to add labels on created PVC HOT 4
- Valkey: Metrics exporter uses wrong environment variables HOT 2
- [bitnami/redis] persistence.labels are ignored HOT 1
- helm upgrade: mediawikiPassword must not be empty HOT 2
- [bitnami/mlflow] MLFlow separate settings for Auth database HOT 1
- [bitnami/kafka] Could not find or load main class kafka.tools.StorageTool HOT 5
- Failing to helm repo update HOT 4
- [bitnami/keycloak] Admin URL no longer works for chart versions higher than 21.0.2 HOT 2
- MLFlow allow using other supported database backends as external database HOT 3
- [bitnami/mongodb] Allow templating for initdbScriptsConfigMap HOT 1
- External-DNS Chart Broken with 7.3.3 due to removal of protected CRD group annotation HOT 8
- [bitnami/thanos] receiveDistributor is not set up to work properly in the chart HOT 2
- [bitnami/kafka] accessing brokers from outside the cluster (GCP) via NodePort HOT 3
- Typo in postgresql-ha/templates/NOTES.txt causes deployment failure HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from charts.