【问题标题】:Kong setup with Cassandra 2.2.7使用 Cassandra 2.2.7 设置 Kong
【发布时间】:2016-09-19 05:54:03
【问题描述】:

刚开始使用Kong,但我一直面临这个问题。

我正在尝试在 Mac 上设置 Kong 并按照此处的说明进行操作:

Kong for Mac

我已经在本地安装并运行了 Cassandra 2.2.7。我可以通过 'cqlsh' 连接到它并创建一个键空间等。

但是当我运行以下命令时,kong 没有启动:

kong start 

我尝试了 --vv 选项,它给了我以下输出:

2016/09/19 11:13:30 [verbose] no config file found at /etc/kong.conf
2016/09/19 11:13:30 [verbose] no config file found at /etc/kong/kong.conf
2016/09/19 11:13:30 [verbose] no config file, skipping loading
2016/09/19 11:13:30 [debug] admin_listen = "0.0.0.0:8001"
2016/09/19 11:13:30 [debug] anonymous_reports = true
2016/09/19 11:13:30 [debug] cassandra_consistency = "ONE"
2016/09/19 11:13:30 [debug] cassandra_contact_points = {"127.0.0.1"}
2016/09/19 11:13:30 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2016/09/19 11:13:30 [debug] cassandra_keyspace = "kong"
2016/09/19 11:13:30 [debug] cassandra_port = 9042
2016/09/19 11:13:30 [debug] cassandra_repl_factor = 1
2016/09/19 11:13:30 [debug] cassandra_repl_strategy = "SimpleStrategy"
2016/09/19 11:13:30 [debug] cassandra_ssl = false
2016/09/19 11:13:30 [debug] cassandra_ssl_verify = false
2016/09/19 11:13:30 [debug] cassandra_timeout = 5000
2016/09/19 11:13:30 [debug] cassandra_username = "kong"
2016/09/19 11:13:30 [debug] cluster_listen = "0.0.0.0:7946"
2016/09/19 11:13:30 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2016/09/19 11:13:30 [debug] cluster_profile = "wan"
2016/09/19 11:13:30 [debug] cluster_ttl_on_failure = 3600
2016/09/19 11:13:30 [debug] custom_plugins = {}
2016/09/19 11:13:30 [debug] database = "postgres"
2016/09/19 11:13:30 [debug] dnsmasq = true
2016/09/19 11:13:30 [debug] dnsmasq_port = 8053
2016/09/19 11:13:30 [debug] log_level = "notice"
2016/09/19 11:13:30 [debug] lua_code_cache = "on"
2016/09/19 11:13:30 [debug] lua_package_cpath = ""
2016/09/19 11:13:30 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2016/09/19 11:13:30 [debug] lua_ssl_verify_depth = 1
2016/09/19 11:13:30 [debug] mem_cache_size = "128m"
2016/09/19 11:13:30 [debug] nginx_daemon = "on"
2016/09/19 11:13:30 [debug] nginx_optimizations = true
2016/09/19 11:13:30 [debug] nginx_worker_processes = "auto"
2016/09/19 11:13:30 [debug] pg_database = "kong"
2016/09/19 11:13:30 [debug] pg_host = "127.0.0.1"
2016/09/19 11:13:30 [debug] pg_port = 5432
2016/09/19 11:13:30 [debug] pg_ssl = false
2016/09/19 11:13:30 [debug] pg_ssl_verify = false
2016/09/19 11:13:30 [debug] pg_user = "kong"
2016/09/19 11:13:30 [debug] prefix = "/usr/local/kong/"
2016/09/19 11:13:30 [debug] proxy_listen = "0.0.0.0:8000"
2016/09/19 11:13:30 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2016/09/19 11:13:30 [debug] serf_path = "serf"
2016/09/19 11:13:30 [debug] ssl = true
2016/09/19 11:13:30 [verbose] prefix in use: /usr/local/kong
2016/09/19 11:13:30 [verbose] running datastore migrations
2016/09/19 11:13:30 [verbose] could not start Kong, stopping services
2016/09/19 11:13:30 [verbose] leaving serf cluster

我没有在本地看到任何可以告诉我问题到底是什么的日志。我在网上看了很多,但没有找到解决方案。

对我缺少什么有什么想法吗?

【问题讨论】:

  • 没关系!我使用的是 Kong 0.9.1,默认情况下似乎使用 Postgres。我不得不在 conf 文件中添加一行来解决这个问题:database = cassandra

标签: cassandra kong


【解决方案1】:

尝试使用KONG_DATABASE=cassandra kong start 明确表明 Kong 应该使用 Cassandra。

或者将配置文件中的database属性更新为cassandra

附带说明 Kong >= 0.9.2 有更多描述性错误。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-07-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多