-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
Kong connectivity issue with Cassandra #3852
Comments
first thing that comes to mind: #3377 |
Hello Tieske, Thanks for pointing me to the issue. I briefly went through that GitHub issue and i think its sort of unrelated. The current issue is nothing specific to DNS. What we're trying to figure out is How/Why Kong ( |
Update: I tried playing around with some Cassandra Parameters like
AFAIK, the above error seems very generic and doesn't point directly to the root cause of the error message. Any pointers to what may be causing this? |
I'm not sure, but iirc the cassandra contact points are used to access the cluster, and then query the cluster for the cassandra nodes in the cluster. So that logic leads me to believe the cassandra nodes return different IP addresses from the contact points provided Is that correct @thibaultcha ? |
@Tieske @thibaultcha I am also getting a similar error. Cassandra works perfectly fine. After running docker stack deploy kong yaml, it successfully creates kong keyspace in Cassandra docker instance. However, kong fails with
I logged into Cassandra container and I have verified kong database in it. |
Hello, Thanks |
I am facing similar issue on single node setup, kong is coming up fine, however, when status API is invoked along with 200 OK following error is seen. 10.3.50.66 [11/Sep/2019:17:35:49 +0000] "GET /status HTTP/1.1" 200 Not able to write/read from the cassandra db. Cassandra/Kong both are up and running. |
Hey @venusf1ytrap, Thanks for opening this issue. Is this still valid with newer Kong versions? Thanks! |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Summary
Kong start
fails to start when it tries to connect to Cassandra running inside a container, because its trying to connect to Cassandra on its Private ip (when doing kong start) not on the IP mentioned as a part of the KONG_CASSANDRA_CONTACT_POINTS. Where askong migrations up
works. In my current setup the Cassandra Container is deployed using Mesos/Marathon and the container is exposed using a service port. Same issue can be replicated using just Docker and try connecting to the hostip:hostport where kong fails to start, because it will try to connect on the container ip.So, i'd like to know why or how Kong is picking up Containers private ip to connect to Cassandra,while this isn't the case during
kong migrations up
. Any pointers will be greatly appreciated as we're not sure if its Kong or Cassandra specific.Steps To Reproduce
Run Cassandra on a Docker container.
_sudo docker run --rm -e "KONG_DATABASE=cassandra" -e "KONG_CASSANDRA_CONTACT_POINTS=172.27.10.x" -e "CASSANDRA_PORT=31035" kong:latest kong migrations up_
[WORKS]docker run -d -e "KONG_DATABASE=cassandra" -e "KONG_CASSANDRA_CONTACT_POINTS=172.27.10.x" -e "KONG_CASSANDRA_PORT=31035" -e "KONG_PROXY_ACCESS_LOG=/dev/stdout" -e "KONG_ADMIN_ACCESS_LOG=/dev/stdout" -e "KONG_PROXY_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_ERROR_LOG=/dev/stderr" -e "KONG_ADMIN_LISTEN=0.0.0.0:8001, 0.0.0.0:8444 ssl" -p 8000:8000 -p 8443:8443 -p 8001:8001 -p 8444:8444 kong:latest
[FAILS]Additional Details & Logs
In the above log, the ip 192.168.1.15 is containers private ip on the Agent running the container and it won't be routable outside the Agent node.
The text was updated successfully, but these errors were encountered: