Tyk-Dashboard on GKE

Hi all,

I ran the command “kubectl exec --namespace=tyk tyk-dashboard-64f9cd846-v2psq /opt/tyk-dashboard/install/bootstrap.sh x.x.x.x”

xxxx is my External-IP

Creating Organisation
ORG DATA: {“Status”:“OK”,“Message”:“Org created”,“Meta”:“5c72e9cb93b0910001d89df9”}
ORG ID: 5c72e9cb93b0910001d89df9

Adding new user

Traceback (most recent call last):
File “”, line 1, in
File “/usr/lib/python2.7/json/init.py”, line 290, in load
**kw)
File “/usr/lib/python2.7/json/init.py”, line 338, in loads
return _default_decoder.decode(s)
File “/usr/lib/python2.7/json/decoder.py”, line 366, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File “/usr/lib/python2.7/json/decoder.py”, line 382, in raw_decode
obj, end = self.scan_once(s, idx)
ValueError: Invalid control character at: line 1 column 35 (char 34)
ERROR: Unable to parse JSON
command terminated with exit code 4

I followed guide on GitHub - TykTechnologies/tyk-kubernetes: Tyk + Kubernetes integration (guide).

Here’s my log:
time=“Feb 24 19:37:19” level=info msg=“mongo connection established”
time=“Feb 24 19:37:19” level=info msg=“Creating new Redis connection pool”
time=“Feb 24 19:37:19” level=info msg=“Creating new Redis connection pool”
time=“Feb 24 19:37:19” level=info msg=“Creating new Redis connection pool”
time=“Feb 24 19:37:19” level=info msg=“Creating new Redis connection pool”
time=“Feb 24 19:37:19” level=info msg=“Adding available nodes…”
time=“Feb 24 19:40:11” level=error msg=“Failed to add NodeID to register: could not complete command”
time=“Feb 24 19:40:11” level=info msg=“Tyk Analytics Dashboard v1.7.5”
time=“Feb 24 19:40:11” level=info msg=“Copyright Martin Buhr 2016”
time=“Feb 24 19:40:11” level=info msg=“https://www.tyk.io
time=“Feb 24 19:40:11” level=info msg=“Listening on port: 3000”
time=“Feb 24 19:40:11” level=info msg=“Registering nodes…”
time=“Feb 24 19:40:11” level=info msg=“Adding available nodes…”
time=“Feb 24 19:40:11” level=info msg=“Socket server started”
time=“Feb 24 19:40:11” level=info msg=“–> Standard listener (http) for UI notifications” addr=“:5000”
time=“Feb 24 19:40:11” level=info msg=“Creating new Redis connection pool”
time=“Feb 24 19:43:03” level=error msg=“Failed to add NodeID to register: could not complete command”
time=“Feb 24 19:43:03” level=info msg=“–> Standard listener (http) for dashboard and API”
time=“Feb 24 19:43:03” level=info msg=“Starting zeroconf heartbeat”
time=“Feb 24 19:43:03” level=info msg=“Starting notification handler for gateway cluster”
time=“Feb 24 19:43:03” level=info msg=“Loading routes…”
time=“Feb 24 19:45:15” level=warning msg=“User pasword is empty! Please reset!”
time=“Feb 24 19:47:03” level=error msg=“Couldn’t create session” error=“could not complete command” sessionID=5dc4aaa54d2c43256ceb0ad776cb0177
time=“Feb 24 19:47:03” level=error msg=“Could not create API session for new user” error=“could not complete command”

Any help is much appreciated.

Thanks

Hi

At a guess i would say redis is unreachable - we also have newer k8s instructions here that may work better for you https://tyk.io/docs/get-started/with-tyk-on-premise/installation/docker/with-kubernetes/

Hi - thanks for the response. I can confirm Redis is running and reachable within K8 cluster.

Any further suggestion or input, welcomed.

Thanks

Hi Experts

Is there any solution to issue I’m facing. Any input is much appreciated.

Thanks

HI

This could be an issue with the connection pool in a redis driver being blocked which only occurs in docker based environments - set the following environment variable in all your Tyk deployments (gateway, pump and dashboard):

REDIGOCLUSTER_SHARDCOUNT=128

Or if that does not work

REDIGOCLUSTER_SHARDCOUNT=256

This should hopefully unblock the Redis connection pool.