Issue with Kong backed by Cassandra

Team,

We are running an Operator based Kong for Kubernetes setup with istio enabled and have Postgres as our Database. Kong ingress controller is used as an entry point for this service mesh. But we have a usecase where we need to support API providers in multi region and hence we have to instal Kong with Cassandra for multi region datastore.

These are my properties in env portion of CR file.

cassandra_contact_points: XXXX
cassandra_port: 9001
cassandra_keyspace: kong
cassandra_ssl: off
cassandra_ssl_verify: off
cassandra_username: XXX
cassandra_password: XXXX
cassandra_data_centers: dc1:2

When we ran the CR, we see the below message. Can you please let us know the reason.

kong-kong-8669dfb84f-cww85 2/3 CrashLoopBackOff 10 25m
kong-kong-post-upgrade-migrations-wh5gr 0/1 Completed 0 25m
kong-kong-pre-upgrade-migrations-p74mz 0/1 Completed 0 25m
kong-operator-75cd9775dd-fhx7v 2/2 Running 1 101m

Logs from Kong instance -

time=“2021-05-21T16:37:12Z” level=info msg=“kong version: 2.4.1” kong_version=2.4.1

time=“2021-05-21T16:37:12Z” level=info msg=“datastore strategy for kong: cassandra”

time=“2021-05-21T16:37:12Z” level=fatal msg="Cassandra-backed deployments of Kong managed by the ingress controller are no longer supported;you must migrate to a Postgres-backed or DB-less deployment"

2021/05/21 16:35:18 [warn] 1#0: [lua] cluster.lua:618: refresh(): [lua-cassandra] found contact point with ‘0.0.0.0’ as rpc_address, using ‘XXXXXX’ to contact it instead. If this is incorrect you should avoid using ‘0.0.0.0’ in rpc_address

nginx: [warn] [lua] cluster.lua:618: refresh(): [lua-cassandra] found contact point with ‘0.0.0.0’ as rpc_address, using ‘XXXXXX’ to contact it instead. If this is incorrect you should avoid using ‘0.0.0.0’ in rpc_address

2021/05/21 16:35:18 [warn] 1#0: [lua] cluster.lua:182: set_peer_down(): [lua-cassandra] setting host at 10.32.12.1 DOWN

nginx: [warn] [lua] cluster.lua:182: set_peer_down(): [lua-cassandra] setting host at 10.32.12.1 DOWN

2021/05/21 16:35:18 [warn] 1#0: [lua] cluster.lua:182: set_peer_down(): [lua-cassandra] setting host at 10.32.10.2 DOWN

nginx: [warn] [lua] cluster.lua:182: set_peer_down(): [lua-cassandra] setting host at 10.32.10.2 DOWN

2021/05/21 16:35:19 [notice] 1#0: using the “epoll” event method

Sending it again for any thoughts from anyone.

Hey @Ragunath_Sudalaimuth , I’m running into a similar error. Have you made any progress on this?

kubectl logs denisovan-kong-785df65bd4-lrc6s
2021/08/17 23:49:46 [warn] 1#0: [lua] cluster.lua:182: set_peer_down(): [lua-cassandra] setting host at 127.0.0.1 DOWN
nginx: [warn] [lua] cluster.lua:182: set_peer_down(): [lua-cassandra] setting host at 127.0.0.1 DOWN
2021/08/17 23:49:46 [error] 1#0: init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:448: [Cassandra error] all hosts tried for query failed. 127.0.0.1: host seems unhealthy, considering it down (connection refused)
stack traceback:
	[C]: in function 'assert'
	/usr/local/share/lua/5.1/kong/init.lua:448: in function 'init'
	init_by_lua:3: in main chunk
nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/init.lua:448: [Cassandra error] all hosts tried for query failed. 127.0.0.1: host seems unhealthy, considering it down (connection refused)
stack traceback:
	[C]: in function 'assert'
	/usr/local/share/lua/5.1/kong/init.lua:448: in function 'init'
	init_by_lua:3: in main chunk

Setting up Kong with Cassandra.

I feel like I need to tell Kong to reference the cluster IP but I’m not sure how to do that in the values.yml… this to me would allow the connectivity to take place as it’s not able to connect on the local host. Shooting from the hip here of course… anyone please advise.