Closed anup-krai closed 1 year ago
This has more to do with accessing redis. You can try to verify that you can indeed connect to redis on the tyk-redis-master.tyk.svc.cluster.local:6379
You need to have redis installed and working for tyk to operate. This will eventually go away though if the redis service is available and tyk has successfully established the connection.
can you please share the result of
kubectl get svc -n tyk
Below is the output -
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
gateway-svc-tyk-headless NodePort 10.73.32.165 <none> 443:30716/TCP 127m
tyk-redis-headless ClusterIP None <none> 6379/TCP 151m
tyk-redis-master ClusterIP 10.73.71.169 <none> 6379/TCP 151m
tyk-redis-slave ClusterIP 10.73.37.126 <none> 6379/TCP 151m
Lost far too many hours on this warning message trying to resolve this redis "problem" which wasn't one.
There should be a following "Redis connected successfully" message in the gateway logs IMHO.
I checked all the gateway pod logs and all have same error and this is running for quite some time-
time="Apr 07 15:48:55" level=error msg="Redis health check failed" error="storage: Redis is either down or ws not configured" liveness-check=true prefix=main
time="Apr 07 15:48:56" level=warning msg="Reconnecting storage: Redis is either down or ws not configured" prefix=pub-sub
What happens when you make api calls to the gateway ?
This error can be sometime ignored, try creating api's and make api calls.
You can try to get more context from the logs by elevating log level to debug
. In th gateway
on values.yaml
set extaenv like this
extraEnvs:
- name: TYK_LOGLEVEL
value: debug
This might help us to know what is going on.
I tried setting the loglevel but looks like its not getting set, still info/error logs are coming. Below is the gateway config on values.yaml
gateway:
kind: DaemonSet
replicaCount: 1
hostName: "gateway.tykbeta.com"
tls: false
containerPort: 8080
tags: ""
image:
repository: tykio/tyk-gateway
tag: v3.1.2
pullPolicy: IfNotPresent
service:
type: NodePort
port: 443
externalTrafficPolicy: Local
annotations: {}
control:
enabled: false
containerPort: 9696
port: 9696
type: ClusterIP
annotations: {}
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
path: /
hosts:
- tyk-gw.local
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
extraEnvs:
- name: TYK_LOGLEVEL
value: debug
resources: {}
I asked, what you get after making calls to the gateway? Ignore the logs for now.
Sorry for the delayed response. We have installed tyk gateway though [https://github.com/TykTechnologies/tyk-oss-k8s-deployment#tyk-oss-deployment](Tyk OSS K8s Deployment) and redis error did not come.
But when we install through helm chat we are getting this error. Below is the response when we do an API call to the gateway -
404 page not found
404 page not found
This isn't an error that the Gateway normally generates. What else could be creating that message?
Sorry for the delayed response. We have installed tyk gateway though [https://github.com/TykTechnologies/tyk-oss-k8s-deployment#tyk-oss-deployment](Tyk OSS K8s Deployment) and redis error did not come.
But when we install through helm chat we are getting this error. Below is the response when we do an API call to the gateway -
404 page not found
What endpoint did you hit on the GW?
We are able to call gateway both through control port and service port successfully. Also we have enabled redis with TLS.
We are able to connect to redis through redis client successfully and also there are no errors in gateway. We also created few keys and those are also visible in redis.
But in redis pod I can see below logs -
1:M 21 Apr 2021 12:40:56.830 # Error accepting a client connection: error:14094412:SSL routines:ssl3_read_bytes:sslv3 alert bad certificate
Is there any change we need to do in gateway configs?
Any progress on this? We're still running into the same error and the /hello
route gives us following JSON response:
{
"status": "fail",
"version": "v3.1.2",
"description": "Tyk GW",
"details": {
"redis": {
"status": "fail",
"output": "storage: Redis is either down or ws not configured",
"componentType": "datastore",
"time": "2021-06-06T21:26:04Z"
}
}
}
I was able to solve this issue. Just use my shell script here and it should install & configure Tyk-CE and Tyk-Operator on a k8s cluster without any problem.
I was able to solve this issue
Could you please let us know what you did to solve the issue?
Of course I solve it 5 minutes after asking for help! I was missing the port from the addrs
section:
redis:
addrs:
- my-redis-master:6379
now works :tada:
We are installing Tyk gateway(oss) through helm chart but seeing some error in gateway pods. Below are the gateway pod logs -
Below is the values.yaml file -
We tried with both useSSL to true and false but getting same error in both. Are we missing anything here?