Kong / kong

🦍 The Cloud-Native API Gateway and AI Gateway.
https://konghq.com/install/#kong-community
Apache License 2.0
39.22k stars 4.81k forks source link

could not find OpenResty 'resty' executable in openresty-alpine #2191

Closed gavinzhou closed 7 years ago

gavinzhou commented 7 years ago

Summary

kong             | + export KONG_NGINX_DAEMON=off
kong             | + export PATH=/root/.pyenv/shims:/root/.pyenv/bin:/root/.autojump/bin:/root/.nvm/versions/node/v6.9.1/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/opt/aws/bin:/opt/go/bin:/opt/gocode/bin:/root/bin:/usr/local/openrestry/bin:/usr/local/openresty/luajit/bin/:/usr/local/openresty/nginx/sbin/:/usr/local/openresty/bin/
kong             | + [ -z off ]
kong             | + exec kong start -c /conf/kong.conf
kong             | prefix directory /usr/local/kong not found, trying to create it
kong             | Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:20: could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1 to 1.11.2.2

working in 0.9.9 with openresty-alpine:3.4

~/luarocks/luarocks-2.4.1 # kong start --vv
2017/03/10 09:00:27 [verbose] Kong: 0.10.0
2017/03/10 09:00:27 [debug] ngx_lua: 10007
2017/03/10 09:00:27 [debug] nginx: 1011002
2017/03/10 09:00:27 [debug] Lua: LuaJIT 2.1.0-beta2
2017/03/10 09:00:27 [verbose] no config file found at /etc/kong/kong.conf
2017/03/10 09:00:27 [verbose] no config file found at /etc/kong.conf
2017/03/10 09:00:27 [verbose] no config file, skipping loading
2017/03/10 09:00:27 [debug] admin_listen = "0.0.0.0:8001"
2017/03/10 09:00:27 [debug] admin_listen_ssl = "0.0.0.0:8444"
2017/03/10 09:00:27 [debug] admin_ssl = true
2017/03/10 09:00:27 [debug] anonymous_reports = true
2017/03/10 09:00:27 [debug] cassandra_consistency = "ONE"
2017/03/10 09:00:27 [debug] cassandra_contact_points = {"127.0.0.1"}
2017/03/10 09:00:27 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2017/03/10 09:00:27 [debug] cassandra_keyspace = "kong"
2017/03/10 09:00:27 [debug] cassandra_lb_policy = "RoundRobin"
2017/03/10 09:00:27 [debug] cassandra_port = 9042
2017/03/10 09:00:27 [debug] cassandra_repl_factor = 1
2017/03/10 09:00:27 [debug] cassandra_repl_strategy = "SimpleStrategy"
2017/03/10 09:00:27 [debug] cassandra_ssl = false
2017/03/10 09:00:27 [debug] cassandra_ssl_verify = false
2017/03/10 09:00:27 [debug] cassandra_timeout = 5000
2017/03/10 09:00:27 [debug] cassandra_username = "kong"
2017/03/10 09:00:27 [debug] cluster_listen = "0.0.0.0:7946"
2017/03/10 09:00:27 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2017/03/10 09:00:27 [debug] cluster_profile = "wan"
2017/03/10 09:00:27 [debug] cluster_ttl_on_failure = 3600
2017/03/10 09:00:27 [debug] custom_plugins = {}
2017/03/10 09:00:27 [debug] database = "postgres"
2017/03/10 09:00:27 [debug] dns_hostsfile = "/etc/hosts"
2017/03/10 09:00:27 [debug] dns_resolver = {}
2017/03/10 09:00:27 [debug] log_level = "notice"
2017/03/10 09:00:27 [debug] lua_code_cache = "on"
2017/03/10 09:00:27 [debug] lua_package_cpath = ""
2017/03/10 09:00:27 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2017/03/10 09:00:27 [debug] lua_socket_pool_size = 30
2017/03/10 09:00:27 [debug] lua_ssl_verify_depth = 1
2017/03/10 09:00:27 [debug] mem_cache_size = "128m"
2017/03/10 09:00:27 [debug] nginx_daemon = "on"
2017/03/10 09:00:27 [debug] nginx_optimizations = true
2017/03/10 09:00:27 [debug] nginx_worker_processes = "auto"
2017/03/10 09:00:27 [debug] pg_database = "kong"
2017/03/10 09:00:27 [debug] pg_host = "127.0.0.1"
2017/03/10 09:00:27 [debug] pg_port = 5432
2017/03/10 09:00:27 [debug] pg_ssl = false
2017/03/10 09:00:27 [debug] pg_ssl_verify = false
2017/03/10 09:00:27 [debug] pg_user = "kong"
2017/03/10 09:00:27 [debug] prefix = "/usr/local/kong/"
2017/03/10 09:00:27 [debug] proxy_listen = "0.0.0.0:8000"
2017/03/10 09:00:27 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2017/03/10 09:00:27 [debug] serf_path = "serf"
2017/03/10 09:00:27 [debug] ssl = true
2017/03/10 09:00:27 [debug] upstream_keepalive = 60
2017/03/10 09:00:27 [verbose] prefix in use: /usr/local/kong
2017/03/10 09:00:27 [verbose] preparing nginx prefix directory at /usr/local/kong
2017/03/10 09:00:27 [verbose] saving serf identifier to /usr/local/kong/serf/serf.id
2017/03/10 09:00:27 [debug] searching for OpenResty 'resty' executable
2017/03/10 09:00:27 [debug] /usr/local/openresty/bin/resty -V: 'nginx version: openresty/1.11.2.2'
2017/03/10 09:00:27 [debug] OpenResty 'resty' executable not found at /usr/local/openresty/bin/resty
2017/03/10 09:00:27 [debug] resty -V: 'nginx version: openresty/1.11.2.2'
2017/03/10 09:00:27 [debug] OpenResty 'resty' executable not found at resty
2017/03/10 09:00:27 [verbose] could not start Kong, stopping services
2017/03/10 09:00:27 [verbose] leaving serf cluster
2017/03/10 09:00:27 [verbose] stopped services
Error:
/usr/local/share/lua/5.1/kong/cmd/start.lua:34: /usr/local/share/lua/5.1/kong/cmd/start.lua:20: could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1 to 1.11.2.2
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/kong/cmd/start.lua:34: in function 'cmd_exec'
    /usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:88>
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/kong/cmd/init.lua:88: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
    /usr/local/bin/kong:5: in function 'file_gen'
    init_worker_by_lua:38: in function <init_worker_by_lua:36>
    [C]: in function 'pcall'
    init_worker_by_lua:45: in function <init_worker_by_lua:43>
subnetmarco commented 7 years ago

This issue doesn't belong to this repository.