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 0.9.3 Startup throws error "Symbol not found: _fastsearch" on Mac OSX 10.11.6 #1736

Closed
kkindaface opened this issue Oct 11, 2016 · 3 comments

Comments

@kkindaface
Copy link

kkindaface commented Oct 11, 2016

Summary

Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:23: nginx: [error] init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:297: error loading module 'stringy' from file '/usr/local/lib/lua/5.1/stringy.so':
dlopen(/usr/local/lib/lua/5.1/stringy.so, 6): Symbol not found: _fastsearch
Referenced from: /usr/local/lib/lua/5.1/stringy.so
Expected in: flat namespace
in /usr/local/lib/lua/5.1/stringy.so
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/kong/tools/utils.lua:297: in function 'load_module_if_exists'
/usr/local/share/lua/5.1/kong.lua:64: in function 'load_plugins'
/usr/local/share/lua/5.1/kong.lua:127: in function 'init'
init_by_lua:4: in main chunk

Steps To Reproduce

  1. Removed Kong 0.8.1
  2. Installed Kong 0.9.3 using pkg installer
  3. Configured the Postgres config to use the same DB that was used by 0.8.1
  4. Run migrations 'kong migrations up'
  5. Startup Kong to see the error

The same error is seen even on a fresh install (new DB)

Additional Details & Logs

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

2016/10/11 14:49:46 [verbose] Kong: 0.9.3
2016/10/11 14:49:46 [debug] ngx_lua: 10005
2016/10/11 14:49:46 [debug] nginx: 1009015
2016/10/11 14:49:46 [debug] Lua: LuaJIT 2.1.0-beta2
2016/10/11 14:49:46 [verbose] no config file found at /etc/kong.conf
2016/10/11 14:49:46 [verbose] reading config file at /etc/kong/kong.conf
2016/10/11 14:49:46 [debug] admin_listen = "0.0.0.0:8001"
2016/10/11 14:49:46 [debug] anonymous_reports = true
2016/10/11 14:49:46 [debug] cassandra_consistency = "ONE"
2016/10/11 14:49:46 [debug] cassandra_contact_points = {"127.0.0.1"}
2016/10/11 14:49:46 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2016/10/11 14:49:46 [debug] cassandra_keyspace = "kong"
2016/10/11 14:49:46 [debug] cassandra_port = 9042
2016/10/11 14:49:46 [debug] cassandra_repl_factor = 1
2016/10/11 14:49:46 [debug] cassandra_repl_strategy = "SimpleStrategy"
2016/10/11 14:49:46 [debug] cassandra_ssl = false
2016/10/11 14:49:46 [debug] cassandra_ssl_verify = false
2016/10/11 14:49:46 [debug] cassandra_timeout = 5000
2016/10/11 14:49:46 [debug] cassandra_username = "kong"
2016/10/11 14:49:46 [debug] cluster_listen = "0.0.0.0:7946"
2016/10/11 14:49:46 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2016/10/11 14:49:46 [debug] cluster_profile = "wan"
2016/10/11 14:49:46 [debug] cluster_ttl_on_failure = 3600
2016/10/11 14:49:46 [debug] custom_plugins = {}
2016/10/11 14:49:46 [debug] database = "postgres"
2016/10/11 14:49:46 [debug] dns_resolver = "8.8.8.8"
2016/10/11 14:49:46 [debug] dnsmasq = false
2016/10/11 14:49:46 [debug] dnsmasq_port = 8053
2016/10/11 14:49:46 [debug] log_level = "notice"
2016/10/11 14:49:46 [debug] lua_code_cache = "on"
2016/10/11 14:49:46 [debug] lua_package_cpath = ""
2016/10/11 14:49:46 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2016/10/11 14:49:46 [debug] lua_ssl_verify_depth = 1
2016/10/11 14:49:46 [debug] mem_cache_size = "128m"
2016/10/11 14:49:46 [debug] nginx_daemon = "on"
2016/10/11 14:49:46 [debug] nginx_optimizations = true
2016/10/11 14:49:46 [debug] nginx_worker_processes = "auto"
2016/10/11 14:49:46 [debug] pg_database = "kong"
2016/10/11 14:49:46 [debug] pg_host = "127.0.0.1"
2016/10/11 14:49:46 [debug] pg_password = "******"
2016/10/11 14:49:46 [debug] pg_port = 5432
2016/10/11 14:49:46 [debug] pg_ssl = false
2016/10/11 14:49:46 [debug] pg_ssl_verify = false
2016/10/11 14:49:46 [debug] pg_user = "postgres"
2016/10/11 14:49:46 [debug] prefix = "/usr/local/kong/"
2016/10/11 14:49:46 [debug] proxy_listen = "0.0.0.0:8000"
2016/10/11 14:49:46 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2016/10/11 14:49:46 [debug] serf_path = "serf"
2016/10/11 14:49:46 [debug] ssl = true
2016/10/11 14:49:46 [verbose] prefix in use: /usr/local/kong
2016/10/11 14:49:46 [verbose] preparing nginx prefix directory at /usr/local/kong
2016/10/11 14:49:46 [verbose] saving serf identifier to /usr/local/kong/serf/serf.id
2016/10/11 14:49:46 [debug] searching for OpenResty 'resty' executable
2016/10/11 14:49:46 [debug] /usr/local/openresty/bin/resty -V: 'nginx version: openresty/1.9.15.1'
2016/10/11 14:49:46 [debug] found OpenResty 'resty' executable at /usr/local/openresty/bin/resty
2016/10/11 14:49:46 [verbose] saving serf shell script handler to /usr/local/kong/serf/serf_event.sh
2016/10/11 14:49:46 [verbose] SSL enabled, no custom certificate set: using default certificate
2016/10/11 14:49:46 [verbose] default SSL certificate found at /usr/local/kong/ssl/kong-default.crt
2016/10/11 14:49:46 [warn] ulimit is currently set to "2560". For better performance set it to at least "4096" using "ulimit -n"
2016/10/11 14:49:46 [verbose] running datastore migrations
2016/10/11 14:49:46 [verbose] migrations up to date
2016/10/11 14:49:46 [verbose] serf agent not running, deleting /usr/local/kong/pids/serf.pid
2016/10/11 14:49:46 [debug] checking 'serf' executable from 'serf_path' config setting
2016/10/11 14:49:46 [debug] serf version: 'Serf v0.7.0'
2016/10/11 14:49:46 [debug] starting serf agent: nohup 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=/usr/local/kong/serf/serf_event.sh' -bind '0.0.0.0:7946' -node '<MAC_ADDRESS>_0.0.0.0:7946_465a78ad93cc432ea8369824d49506d6' -log-level 'err' > /usr/local/kong/logs/serf.log 2>&1 & echo $! > /usr/local/kong/pids/serf.pid
2016/10/11 14:49:46 [verbose] waiting for serf agent to be running
2016/10/11 14:49:47 [debug] sending signal to pid at: /usr/local/kong/pids/serf.pid
2016/10/11 14:49:47 [debug] kill -0 cat /usr/local/kong/pids/serf.pid >/dev/null 2>&1
2016/10/11 14:49:47 [verbose] serf agent started
2016/10/11 14:49:47 [verbose] auto-joining serf cluster
2016/10/11 14:49:47 [verbose] successfully joined cluster at 10.250.6.235:7946
2016/10/11 14:49:47 [verbose] registering serf node in datastore
2016/10/11 14:49:47 [verbose] cluster joined and node registered in datastore
2016/10/11 14:49:47 [debug] searching for OpenResty 'nginx' executable
2016/10/11 14:49:47 [debug] /usr/local/openresty/nginx/sbin/nginx -v: 'nginx version: openresty/1.9.15.1'
2016/10/11 14:49:47 [debug] found OpenResty 'nginx' executable at /usr/local/openresty/nginx/sbin/nginx
2016/10/11 14:49:47 [debug] starting nginx: /usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c nginx.conf
2016/10/11 14:49:47 [verbose] could not start Kong, stopping services
2016/10/11 14:49:47 [verbose] leaving serf cluster
2016/10/11 14:49:47 [verbose] left serf cluster
2016/10/11 14:49:47 [verbose] stopping serf agent at /usr/local/kong/pids/serf.pid
2016/10/11 14:49:47 [debug] sending signal to pid at: /usr/local/kong/pids/serf.pid
2016/10/11 14:49:47 [debug] kill -15 cat /usr/local/kong/pids/serf.pid >/dev/null 2>&1
2016/10/11 14:49:47 [verbose] serf agent stopped
2016/10/11 14:49:47 [verbose] stopped services

  • Kong error logs (<KONG_PREFIX>/logs/error.log)

2016/10/11 14:49:47 [error] 95097#0: init_by_lua error: /usr/local/share/lua/5.1/kong/tools/utils.lua:297: error loading module 'stringy' from file '/usr/local/lib/lua/5.1/stringy.so':
dlopen(/usr/local/lib/lua/5.1/stringy.so, 6): Symbol not found: _fastsearch
Referenced from: /usr/local/lib/lua/5.1/stringy.so
Expected in: flat namespace
in /usr/local/lib/lua/5.1/stringy.so
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/kong/tools/utils.lua:297: in function 'load_module_if_exists'
/usr/local/share/lua/5.1/kong.lua:64: in function 'load_plugins'
/usr/local/share/lua/5.1/kong.lua:127: in function 'init'
init_by_lua:4: in main chunk

  • Kong configuration (registered APIs/Plugins & configuration file)
  • Operating System - Mac OSX 10.11.6
@thibaultcha
Copy link
Member

thibaultcha commented Oct 11, 2016

As a tmp fix, you could run:

$ luarocks remove --force stringy
$ luarocks install stringy 0.2-1

@subnetmarco
Copy link
Member

This has also been fixed if you re-downloaded the OSX package.

@kkindaface
Copy link
Author

Yes, I can confirm the same. Thanks!

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

3 participants