Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/
Apache License 2.0
39.4k stars 4.83k forks source link

Cassandra cluster and Kong Cluster error #2950

Closed withlin closed 7 years ago

withlin commented 7 years ago

Summary

SUMMARY_GOES_HERE

Steps To Reproduce

  1. I used cassandra cluster on two machine eg: 192.168.191.131 and 192.168.191.132
  2. and then i used kong cluster on two machine. eg:192.168.191.131 and 192.168.191.132
  3. but i try down cassandra(192.168.191.132),which i operater that curl localhost:8001.
  4. kong is error.

Additional Details & Logs

192.168.191.132: root@ubuntu:~# kong start -vv 2017/10/11 20:05:25 [verbose] Kong: 0.11.0 2017/10/11 20:05:25 [debug] ngx_lua: 10008 2017/10/11 20:05:25 [debug] nginx: 1011002 2017/10/11 20:05:25 [debug] Lua: LuaJIT 2.1.0-beta2 2017/10/11 20:05:25 [verbose] reading config file at /etc/kong/kong.conf 2017/10/11 20:05:25 [warn] You are using Cassandra but your 'db_update_propagation' setting is set to '0' (default). Due to the distributed nature of Cassandra, you should increase this value. 2017/10/11 20:05:25 [debug] admin_access_log = "logs/admin_access.log" 2017/10/11 20:05:25 [debug] admin_error_log = "logs/error.log" 2017/10/11 20:05:25 [debug] admin_http2 = false 2017/10/11 20:05:25 [debug] admin_listen = "0.0.0.0:8001" 2017/10/11 20:05:25 [debug] admin_listen_ssl = "0.0.0.0:8443" 2017/10/11 20:05:25 [debug] admin_ssl = true 2017/10/11 20:05:25 [debug] anonymous_reports = true 2017/10/11 20:05:25 [debug] cassandra_consistency = "QUORUM" 2017/10/11 20:05:25 [debug] cassandra_contact_points = {"192.168.191.131","192.168.191.132"} 2017/10/11 20:05:25 [debug] cassandra_data_centers = {"dc1:2","dc2:3"} 2017/10/11 20:05:25 [debug] cassandra_keyspace = "kong" 2017/10/11 20:05:25 [debug] cassandra_lb_policy = "RoundRobin" 2017/10/11 20:05:25 [debug] cassandra_password = "**" 2017/10/11 20:05:25 [debug] cassandra_port = 9042 2017/10/11 20:05:25 [debug] cassandra_repl_factor = 2 2017/10/11 20:05:25 [debug] cassandra_repl_strategy = "SimpleStrategy" 2017/10/11 20:05:25 [debug] cassandra_schema_consensus_timeout = 10000 2017/10/11 20:05:25 [debug] cassandra_ssl = false 2017/10/11 20:05:25 [debug] cassandra_ssl_verify = false 2017/10/11 20:05:25 [debug] cassandra_timeout = 5000 2017/10/11 20:05:25 [debug] cassandra_username = "cassandra" 2017/10/11 20:05:25 [debug] client_body_buffer_size = "8k" 2017/10/11 20:05:25 [debug] client_max_body_size = "0" 2017/10/11 20:05:25 [debug] client_ssl = false 2017/10/11 20:05:25 [debug] custom_plugins = {} 2017/10/11 20:05:25 [debug] database = "cassandra" 2017/10/11 20:05:25 [debug] db_cache_ttl = 3600 2017/10/11 20:05:25 [debug] db_update_frequency = 5 2017/10/11 20:05:25 [debug] db_update_propagation = 0 2017/10/11 20:05:25 [debug] dns_error_ttl = 1 2017/10/11 20:05:25 [debug] dns_hostsfile = "/etc/hosts" 2017/10/11 20:05:25 [debug] dns_no_sync = false 2017/10/11 20:05:25 [debug] dns_not_found_ttl = 30 2017/10/11 20:05:25 [debug] dns_order = {"LAST","SRV","A","CNAME"} 2017/10/11 20:05:25 [debug] dns_resolver = {"192.168.191.131:8600"} 2017/10/11 20:05:25 [debug] dns_stale_ttl = 4 2017/10/11 20:05:25 [debug] error_default_type = "text/plain" 2017/10/11 20:05:25 [debug] http2 = false 2017/10/11 20:05:25 [debug] latency_tokens = true 2017/10/11 20:05:25 [debug] log_level = "notice" 2017/10/11 20:05:25 [debug] lua_code_cache = "on" 2017/10/11 20:05:25 [debug] lua_package_cpath = "" 2017/10/11 20:05:25 [debug] lua_package_path = "?/init.lua;./kong/?.lua" 2017/10/11 20:05:25 [debug] lua_socket_pool_size = 30 2017/10/11 20:05:25 [debug] lua_ssl_verify_depth = 1 2017/10/11 20:05:25 [debug] mem_cache_size = "128m" 2017/10/11 20:05:25 [debug] nginx_daemon = "on" 2017/10/11 20:05:25 [debug] nginx_optimizations = true 2017/10/11 20:05:25 [debug] nginx_user = "nobody nobody" 2017/10/11 20:05:25 [debug] nginx_worker_processes = "auto" 2017/10/11 20:05:25 [debug] pg_database = "kong" 2017/10/11 20:05:25 [debug] pg_host = "127.0.0.1" 2017/10/11 20:05:25 [debug] pg_port = 5432 2017/10/11 20:05:25 [debug] pg_ssl = false 2017/10/11 20:05:25 [debug] pg_ssl_verify = false 2017/10/11 20:05:25 [debug] pg_user = "kong" 2017/10/11 20:05:25 [debug] prefix = "/usr/local/kong/" 2017/10/11 20:05:25 [debug] proxy_access_log = "logs/access.log" 2017/10/11 20:05:25 [debug] proxy_error_log = "logs/error.log" 2017/10/11 20:05:25 [debug] proxy_listen = "0.0.0.0:8000" 2017/10/11 20:05:25 [debug] proxy_listen_ssl = "0.0.0.0:8443" 2017/10/11 20:05:25 [debug] real_ip_header = "X-Real-IP" 2017/10/11 20:05:25 [debug] real_ip_recursive = "off" 2017/10/11 20:05:25 [debug] server_tokens = true 2017/10/11 20:05:25 [debug] ssl = true 2017/10/11 20:05:25 [debug] ssl_cipher_suite = "modern" 2017/10/11 20:05:25 [debug] ssl_ciphers = "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256" 2017/10/11 20:05:25 [debug] trusted_ips = {} 2017/10/11 20:05:25 [debug] upstream_keepalive = 60 2017/10/11 20:05:25 [verbose] prefix in use: /usr/local/kong 2017/10/11 20:05:26 [verbose] preparing nginx prefix directory at /usr/local/kong 2017/10/11 20:05:26 [verbose] SSL enabled, no custom certificate set: using default certificate 2017/10/11 20:05:26 [verbose] default SSL certificate found at /usr/local/kong/ssl/kong-default.crt 2017/10/11 20:05:26 [verbose] Admin SSL enabled, no custom certificate set: using default certificate 2017/10/11 20:05:26 [verbose] admin SSL certificate found at /usr/local/kong/ssl/admin-kong-default.crt 2017/10/11 20:05:26 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n" 2017/10/11 20:05:26 [verbose] checking Cassandra schema consensus... 2017/10/11 20:05:26 [verbose] Cassandra schema consensus: reached 2017/10/11 20:05:26 [debug] searching for OpenResty 'nginx' executable 2017/10/11 20:05:26 [debug] /usr/local/openresty/nginx/sbin/nginx -v: 'nginx version: openresty/1.11.2.4' 2017/10/11 20:05:26 [debug] found OpenResty 'nginx' executable at /usr/local/openresty/nginx/sbin/nginx 2017/10/11 20:05:26 [debug] starting nginx: /usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c nginx.conf 2017/10/11 20:05:27 [debug] nginx started 2017/10/11 20:05:27 [info] Kong started

withlin commented 7 years ago

please help me.

thibaultcha commented 7 years ago

This sounds like a mis-configured Cassandra cluster and/or keyspace. We don't have enough information here, nor access to your Cassandra cluster to help you debug this issue further, but you can find plenty of resources online to help you with Cassandra, including troubleshooting guides for the error you encountered.

yousafsyed commented 7 years ago

Same issue here using the konghq kubernetes deployment https://github.com/Kong/kong-dist-kubernetes by following all the instructions as is

code2design commented 6 years ago

@kikito I'm getting the same error while using their official Kong 0.14.x docker image to deploy it on openshift origin. Is there a way to create and change the user to achieve the same behavior?

thibaultcha commented 6 years ago

@yousafsyed @code2design This issue usually relates to a misconfiguration of your Cassandra cluster. See this message for a starting point to understand the issue and fix it: https://github.com/Kong/kong/issues/3596#issuecomment-403159132

yousafsyed-bg commented 6 years ago

@thibaultcha you are probably right but Cassandra configurations are also provided with the kong's kubernetes manifesto. https://github.com/Kong/kong-dist-kubernetes/blob/master/kong_cassandra.yaml So if the Cassandra is misconfigured in the repo than we should fix that, I don't see anything particularly wrong here in the manifesto for now but I am also not an expert at Cassandra.