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

could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1 to 1.11.2.2 #2399

Closed
colinbetter opened this issue Apr 17, 2017 · 5 comments

Comments

@colinbetter
Copy link

colinbetter commented Apr 17, 2017

on my Centos 7.2,i try to install kong,bu failed and i donot know how to fix it

Summary

2017/04/17 16:49:37 [verbose] Kong: 0.10.1
2017/04/17 16:49:37 [debug] ngx_lua: 10007
2017/04/17 16:49:37 [debug] nginx: 1011002
2017/04/17 16:49:37 [debug] Lua: LuaJIT 2.1.0-beta2
2017/04/17 16:49:37 [verbose] reading config file at /etc/kong/kong.conf
2017/04/17 16:49:37 [debug] admin_listen = "0.0.0.0:8001"
2017/04/17 16:49:37 [debug] admin_listen_ssl = "0.0.0.0:8444"
2017/04/17 16:49:37 [debug] admin_ssl = true
2017/04/17 16:49:37 [debug] anonymous_reports = true
2017/04/17 16:49:37 [debug] cassandra_consistency = "ONE"
2017/04/17 16:49:37 [debug] cassandra_contact_points = {"127.0.0.1"}
2017/04/17 16:49:37 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2017/04/17 16:49:37 [debug] cassandra_keyspace = "kong"
2017/04/17 16:49:37 [debug] cassandra_lb_policy = "RoundRobin"
2017/04/17 16:49:37 [debug] cassandra_port = 9042
2017/04/17 16:49:37 [debug] cassandra_repl_factor = 1
2017/04/17 16:49:37 [debug] cassandra_repl_strategy = "SimpleStrategy"
2017/04/17 16:49:37 [debug] cassandra_ssl = false
2017/04/17 16:49:37 [debug] cassandra_ssl_verify = false
2017/04/17 16:49:37 [debug] cassandra_timeout = 5000
2017/04/17 16:49:37 [debug] cassandra_username = "kong"
2017/04/17 16:49:37 [debug] cluster_listen = "0.0.0.0:7946"
2017/04/17 16:49:37 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2017/04/17 16:49:37 [debug] cluster_profile = "wan"
2017/04/17 16:49:37 [debug] cluster_ttl_on_failure = 3600
2017/04/17 16:49:37 [debug] custom_plugins = {}
2017/04/17 16:49:37 [debug] database = "cassandra"
2017/04/17 16:49:37 [debug] dns_hostsfile = "/etc/hosts"
2017/04/17 16:49:37 [debug] dns_resolver = {}
2017/04/17 16:49:37 [debug] log_level = "notice"
2017/04/17 16:49:37 [debug] lua_code_cache = "on"
2017/04/17 16:49:37 [debug] lua_package_cpath = ""
2017/04/17 16:49:37 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2017/04/17 16:49:37 [debug] lua_socket_pool_size = 30
2017/04/17 16:49:37 [debug] lua_ssl_verify_depth = 1
2017/04/17 16:49:37 [debug] mem_cache_size = "128m"
2017/04/17 16:49:37 [debug] nginx_daemon = "on"
2017/04/17 16:49:37 [debug] nginx_optimizations = true
2017/04/17 16:49:37 [debug] nginx_worker_processes = "auto"
2017/04/17 16:49:37 [debug] pg_database = "kong"
2017/04/17 16:49:37 [debug] pg_host = "127.0.0.1"
2017/04/17 16:49:37 [debug] pg_port = 5432
2017/04/17 16:49:37 [debug] pg_ssl = false
2017/04/17 16:49:37 [debug] pg_ssl_verify = false
2017/04/17 16:49:37 [debug] pg_user = "kong"
2017/04/17 16:49:37 [debug] prefix = "/usr/local/kong/"
2017/04/17 16:49:37 [debug] proxy_listen = "0.0.0.0:8000"
2017/04/17 16:49:37 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2017/04/17 16:49:37 [debug] serf_path = "serf"
2017/04/17 16:49:37 [debug] ssl = true
2017/04/17 16:49:37 [debug] upstream_keepalive = 60
2017/04/17 16:49:37 [verbose] prefix in use: /usr/local/kong
2017/04/17 16:49:37 [verbose] preparing nginx prefix directory at /usr/local/kong
2017/04/17 16:49:37 [verbose] saving serf identifier to /usr/local/kong/serf/serf.id
2017/04/17 16:49:37 [debug] searching for OpenResty 'resty' executable
2017/04/17 16:49:37 [debug] /usr/local/openresty/bin/resty -V: 'nginx version: openresty/1.11.2.2'
2017/04/17 16:49:37 [debug] OpenResty 'resty' executable not found at /usr/local/openresty/bin/resty
2017/04/17 16:49:37 [debug] resty -V: 'nginx version: openresty/1.11.2.2'
2017/04/17 16:49:37 [debug] OpenResty 'resty' executable not found at resty
2017/04/17 16:49:37 [verbose] could not start Kong, stopping services
2017/04/17 16:49:37 [verbose] leaving serf cluster
2017/04/17 16:49:37 [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>

Steps To Reproduce

Additional Details & Logs

  • Kong version (0.10.1)
  • Kong debug-level startup logs ($ kong start --vv)

this make me very sad,i have intalled resty and the versionis 1.11.2..follow is the result of using "resty -V"

resty 0.16
nginx version: openresty/1.11.2.2
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC)
built with OpenSSL 1.0.1e-fips 11 Feb 2013
TLS SNI support enabled
configure arguments: --prefix=/usr/local/openresty/nginx --with-cc-opt=-O2 --add-module=../ngx_devel_kit-0.3.0 --add-module=../echo-nginx-module-0.60 --add-module=../xss-nginx-module-0.05 --add-module=../ngx_coolkit-0.2rc3 --add-module=../set-misc-nginx-module-0.31 --add-module=../form-input-nginx-module-0.12 --add-module=../encrypted-session-nginx-module-0.06 --add-module=../srcache-nginx-module-0.31 --add-module=../ngx_lua-0.10.7 --add-module=../ngx_lua_upstream-0.06 --add-module=../headers-more-nginx-module-0.32 --add-module=../array-var-nginx-module-0.05 --add-module=../memc-nginx-module-0.17 --add-module=../redis2-nginx-module-0.13 --add-module=../redis-nginx-module-0.3.7 --add-module=../rds-json-nginx-module-0.14 --add-module=../rds-csv-nginx-module-0.07 --with-ld-opt=-Wl,-rpath,/usr/local/openresty/luajit/lib --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module

please tell me how to fix this problem,thanks

@bungle
Copy link
Member

bungle commented Apr 17, 2017

I believe that you have OpenResty compiled --with-luajit-lua52 aka no flag --without-luajit-lua52. The return codes of os.executeare pretty inconsistent across the Lua versions (and Penlight versions), and the compile flags. This patch by me tries to make Penlight behave compatibly with Lua 5.1, 5.2, 5.3 and LuaJIT with 5.2 compatibility mode on/off:
https://github.com/stevedonovan/Penlight/pull/244/files

There are other problems like this when LuaJIT is compiled with 5.2 compatibility mode (OpenResty package's default these days): #2375

@p0pr0ck5 p0pr0ck5 changed the title /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 could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1 to 1.11.2.2 Apr 17, 2017
@p0pr0ck5
Copy link
Contributor

(please don't include stack traces in issue titles :) )

@colinbetter
Copy link
Author

now i use this to compile openresty "./configure --with-http_stub_status_module --with-http_v2_module --with-http_ssl_module --without-luajit-lua52",the problem is solved,thanks
but there is another problem 👍
Error:
/usr/local/share/lua/5.1/kong/cmd/start.lua:34: /usr/local/share/lua/5.1/kong/cmd/start.lua:23: nginx: [emerg] unknown directive "real_ip_header" in /usr/local/kong/nginx-kong.conf:12

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>

but i have update the openssl to lastest version

OpenSSL 1.1.0e 16 Feb 2017
built on: reproducible build, date unspecified
platform: linux-x86_64
compiler: gcc -DZLIB -DZLIB_SHARED -DDSO_DLFCN -DHAVE_DLFCN_H -DNDEBUG -DOPENSSL_THREADS -DOPENSSL_NO_STATIC_ENGINE -DOPENSSL_PIC -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT -DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DRC4_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DGHASH_ASM -DECP_NISTZ256_ASM -DPADLOCK_ASM -DPOLY1305_ASM -DOPENSSLDIR=""/usr/local/ssl"" -DENGINESDIR=""/usr/local/lib64/engines-1.1"" -Wa,--noexecstack
OPENSSLDIR: "/usr/local/ssl"
ENGINESDIR: "/usr/local/lib64/engines-1.1"

@colinbetter colinbetter changed the title could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1 to 1.11.2.2 Kong requires openresty version 1.11.2.1 to 1.11.2.2 Apr 18, 2017
@colinbetter colinbetter changed the title Kong requires openresty version 1.11.2.1 to 1.11.2.2 could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1 to 1.11.2.2 Apr 18, 2017
@thibaultcha
Copy link
Member

The required flags are described at https://getkong.org/install/source/

Enabling HTTP/2 might also cause you some trouble for a few plugins FYI.

@colinbetter
Copy link
Author

thanks,i use openssl 1.0.2 ,everything is ok .and kong started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants