Skip to content
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 can not find custom_plugins #1817

Closed
HenryChelsea opened this issue Nov 14, 2016 · 8 comments
Closed

kong can not find custom_plugins #1817

HenryChelsea opened this issue Nov 14, 2016 · 8 comments
Labels
task/needs-investigation Requires investigation and reproduction before classifying it as a bug or not.

Comments

@HenryChelsea
Copy link

Summary

In branch 'next'(0.9.5), when I added my custom plugins. Kong does not find them. But when I checkouted to branch 'master'(0.9.5), kong works well and find my custom plugins. Could anybody gives me some advice? Thanks.

Steps To Reproduce

  1. kong start --v

Additional Details & Logs

  • Kong version (0.9.5(next))

  • start verbose logs:
    2016/11/11 14:49:17 [verbose] Kong: 0.9.5
    2016/11/11 14:49:17 [verbose] reading config file at /etc/kong/kong.conf
    2016/11/11 14:49:17 [verbose] prefix in use: /home/token/kong
    2016/11/11 14:49:17 [verbose] preparing nginx prefix directory at /home/token/kong
    2016/11/11 14:49:17 [verbose] saving serf identifier to /home/token/kong/serf/serf.id
    2016/11/11 14:49:17 [verbose] saving serf shell script handler to /home/token/kong/serf/serf_event.sh
    2016/11/11 14:49:17 [verbose] SSL enabled, no custom certificate set: using default certificate
    2016/11/11 14:49:17 [verbose] default SSL certificate found at /home/token/kong/ssl/kong-default.crt
    2016/11/11 14:49:17 [verbose] Admin SSL enabled, no custom certificate set: using default certificate
    2016/11/11 14:49:17 [verbose] admin SSL certificate found at /home/token/kong/ssl/admin-kong-default.crt
    2016/11/11 14:49:17 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
    2016/11/11 14:49:17 [verbose] running datastore migrations
    2016/11/11 14:49:17 [verbose] migrations up to date
    2016/11/11 14:49:17 [verbose] serf agent not running, deleting /home/token/kong/pids/serf.pid
    2016/11/11 14:49:17 [verbose] waiting for serf agent to be running
    2016/11/11 14:49:18 [verbose] serf agent started
    2016/11/11 14:49:18 [verbose] auto-joining serf cluster
    2016/11/11 14:49:18 [verbose] no other nodes found in the cluster
    2016/11/11 14:49:18 [verbose] registering serf node in datastore
    2016/11/11 14:49:18 [verbose] cluster joined and node registered in datastore
    2016/11/11 14:49:18 [info] Kong started

  • Kong configuration (registered APIs/Plugins & configuration file)
    custom_plugins = auth-key-check

curl http://localhost:8001/plugins/enabled
{"enabled_plugins":["syslog","ldap-auth","rate-limiting","correlation-id","jwt","runscope","tcp-log","http-log","hmac-auth","response-transformer","basic-auth","key-auth","request-transformer","acl","oauth2","galileo","udp-log","cors","file-log","ip-restriction","request-size-limiting","ssl","datadog","loggly","statsd","response-ratelimiting","bot-detection"]}

  • Operating System
    centos 7.0
@Tieske
Copy link
Member

Tieske commented Nov 14, 2016

can you try kong start --vv

@HenryChelsea
Copy link
Author

Sure!
[token@localhost kong]$ kong start --vv
2016/11/11 21:29:09 [verbose] Kong: 0.9.5
2016/11/11 21:29:09 [debug] ngx_lua: 10006
2016/11/11 21:29:09 [debug] nginx: 1011002
2016/11/11 21:29:09 [debug] Lua: LuaJIT 2.1.0-beta2
2016/11/11 21:29:09 [debug] PRNG seed: 122221661252
2016/11/11 21:29:09 [verbose] reading config file at /etc/kong/kong.conf
2016/11/11 21:29:09 [debug] KONG_SERF_PATH ENV found with "/home/token/git_resource/serf"
2016/11/11 21:29:09 [debug] admin_listen = "0.0.0.0:8001"
2016/11/11 21:29:09 [debug] admin_listen_ssl = "0.0.0.0:8444"
2016/11/11 21:29:09 [debug] admin_ssl = true
2016/11/11 21:29:09 [debug] anonymous_reports = true
2016/11/11 21:29:09 [debug] cassandra_consistency = "ONE"
2016/11/11 21:29:09 [debug] cassandra_contact_points = {"127.0.0.1"}
2016/11/11 21:29:09 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2016/11/11 21:29:09 [debug] cassandra_keyspace = "kong"
2016/11/11 21:29:09 [debug] cassandra_lb_policy = "RoundRobin"
2016/11/11 21:29:09 [debug] cassandra_port = 9042
2016/11/11 21:29:09 [debug] cassandra_repl_factor = 1
2016/11/11 21:29:09 [debug] cassandra_repl_strategy = "SimpleStrategy"
2016/11/11 21:29:09 [debug] cassandra_ssl = false
2016/11/11 21:29:09 [debug] cassandra_ssl_verify = false
2016/11/11 21:29:09 [debug] cassandra_timeout = 5000
2016/11/11 21:29:09 [debug] cassandra_username = "kong"
2016/11/11 21:29:09 [debug] cluster_advertise = "192.168.88.10:7946"
2016/11/11 21:29:09 [debug] cluster_listen = "0.0.0.0:7946"
2016/11/11 21:29:09 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2016/11/11 21:29:09 [debug] cluster_profile = "wan"
2016/11/11 21:29:09 [debug] cluster_ttl_on_failure = 3600
2016/11/11 21:29:09 [debug] custom_plugins = {"auth-key-check"}
2016/11/11 21:29:09 [debug] database = "postgres"
2016/11/11 21:29:09 [debug] dns_hostsfile = "/etc/hosts"
2016/11/11 21:29:09 [debug] dns_resolver = {}
2016/11/11 21:29:09 [debug] log_level = "notice"
2016/11/11 21:29:09 [debug] lua_code_cache = "on"
2016/11/11 21:29:09 [debug] lua_package_cpath = ""
2016/11/11 21:29:09 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2016/11/11 21:29:09 [debug] lua_ssl_verify_depth = 1
2016/11/11 21:29:09 [debug] mem_cache_size = "128m"
2016/11/11 21:29:09 [debug] nginx_daemon = "on"
2016/11/11 21:29:09 [debug] nginx_optimizations = true
2016/11/11 21:29:09 [debug] nginx_worker_processes = "auto"
2016/11/11 21:29:09 [debug] pg_database = "kong"
2016/11/11 21:29:09 [debug] pg_host = "192.168.88.10"
2016/11/11 21:29:09 [debug] pg_password = "******"
2016/11/11 21:29:09 [debug] pg_port = 5432
2016/11/11 21:29:09 [debug] pg_ssl = false
2016/11/11 21:29:09 [debug] pg_ssl_verify = false
2016/11/11 21:29:09 [debug] pg_user = "kong"
2016/11/11 21:29:09 [debug] prefix = "/home/token/kong/"
2016/11/11 21:29:09 [debug] proxy_listen = "0.0.0.0:8000"
2016/11/11 21:29:09 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2016/11/11 21:29:09 [debug] serf_path = "/home/token/git_resource/serf"
2016/11/11 21:29:09 [debug] ssl = true
2016/11/11 21:29:09 [debug] upstream_keepalive = 60
2016/11/11 21:29:09 [verbose] prefix in use: /home/token/kong
2016/11/11 21:29:09 [verbose] preparing nginx prefix directory at /home/token/kong
2016/11/11 21:29:09 [info] prefix directory /home/token/kong not found, trying to create it
2016/11/11 21:29:09 [verbose] saving serf identifier to /home/token/kong/serf/serf.id
2016/11/11 21:29:09 [debug] searching for OpenResty 'resty' executable
2016/11/11 21:29:09 [debug] /usr/local/openresty/bin/resty -V: 'nginx version: openresty/1.11.2.1'
2016/11/11 21:29:09 [debug] found OpenResty 'resty' executable at /usr/local/openresty/bin/resty
2016/11/11 21:29:09 [verbose] saving serf shell script handler to /home/token/kong/serf/serf_event.sh
2016/11/11 21:29:09 [verbose] SSL enabled, no custom certificate set: using default certificate
2016/11/11 21:29:09 [verbose] generating default SSL certificate and key
2016/11/11 21:29:09 [verbose] Admin SSL enabled, no custom certificate set: using default certificate
2016/11/11 21:29:09 [verbose] generating admin SSL certificate and key
2016/11/11 21:29:09 [warn] ulimit is currently set to "1024". For better performance set it to at least "4096" using "ulimit -n"
2016/11/11 21:29:10 [verbose] running datastore migrations
2016/11/11 21:29:10 [verbose] migrations up to date
2016/11/11 21:29:10 [verbose] serf agent not running, deleting /home/token/kong/pids/serf.pid
2016/11/11 21:29:10 [debug] checking 'serf' executable from 'serf_path' config setting
2016/11/11 21:29:10 [debug] /home/token/git_resource/serf version: 'Serf v0.8.0'
2016/11/11 21:29:10 [debug] starting serf agent: nohup /home/token/git_resource/serf agent -profile 'wan' -rpc-addr '127.0.0.1:7373' -event-handler 'member-join,member-leave,member-failed,member-update,member-reap,user:kong=/home/token/kong/serf/serf_event.sh' -bind '0.0.0.0:7946' -advertise '192.168.88.10:7946' -node 'localhost.localdomain_0.0.0.0:7946_9ce28afb74b1453fa2f1cff9ebf0fa6d' -log-level 'err' > /home/token/kong/logs/serf.log 2>&1 & echo $! > /home/token/kong/pids/serf.pid
2016/11/11 21:29:10 [verbose] waiting for serf agent to be running
2016/11/11 21:29:10 [debug] sending signal to pid at: /home/token/kong/pids/serf.pid
2016/11/11 21:29:10 [debug] kill -0 cat /home/token/kong/pids/serf.pid >/dev/null 2>&1
2016/11/11 21:29:10 [verbose] serf agent started
2016/11/11 21:29:10 [verbose] auto-joining serf cluster
2016/11/11 21:29:10 [verbose] no other nodes found in the cluster
2016/11/11 21:29:10 [verbose] registering serf node in datastore
2016/11/11 21:29:10 [verbose] cluster joined and node registered in datastore
2016/11/11 21:29:10 [debug] searching for OpenResty 'nginx' executable
2016/11/11 21:29:10 [debug] /usr/local/openresty/nginx/sbin/nginx -v: 'nginx version: openresty/1.11.2.1'
2016/11/11 21:29:10 [debug] found OpenResty 'nginx' executable at /usr/local/openresty/nginx/sbin/nginx
2016/11/11 21:29:10 [debug] starting nginx: /usr/local/openresty/nginx/sbin/nginx -p /home/token/kong -c nginx.conf
2016/11/11 21:29:10 [debug] nginx started
2016/11/11 21:29:10 [info] Kong started


admin api:
[token@localhost kong]$ curl http://localhost:8001/plugins/enabled

{"enabled_plugins":["syslog","ldap-auth","rate-limiting","correlation-id","jwt","runscope","tcp-log","http-log","hmac-auth","response-transformer","basic-auth","key-auth","request-transformer","acl","oauth2","galileo","udp-log","cors","file-log","ip-restriction","request-size-limiting","ssl","datadog","loggly","statsd","response-ratelimiting","bot-detection"]}

Thanks

@Tieske
Copy link
Member

Tieske commented Nov 14, 2016

anything in the logs?

@Tieske
Copy link
Member

Tieske commented Nov 14, 2016

so this is your custom plugin;

2016/11/11 21:29:09 [debug] custom_plugins = {"auth-key-check"}

@HenryChelsea
Copy link
Author

Yes, auth-key-check is my custom plugins. But I can not find using curl http://localhost:8001/plugins/enabled

@HenryChelsea
Copy link
Author

That is all the logs using kong start --vv.

@thibaultcha thibaultcha added the task/needs-investigation Requires investigation and reproduction before classifying it as a bug or not. label Nov 17, 2016
@p0pr0ck5
Copy link
Contributor

@HenryChelsea do you still see this behavior in 0.10.x releases?

@p0pr0ck5
Copy link
Contributor

p0pr0ck5 commented Jun 2, 2017

Closing as stale with no response. Please feel free to re-open if there are still pending questions. Thanks!

@p0pr0ck5 p0pr0ck5 closed this as completed Jun 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task/needs-investigation Requires investigation and reproduction before classifying it as a bug or not.
Projects
None yet
Development

No branches or pull requests

4 participants