Kong: Can't run kong

Created on 18 Nov 2016  路  6Comments  路  Source: Kong/kong

I have trouble to get kong up and running.

I have a fresh ubuntu 16.04 with fresh installed postgres 9.4+.
i set user kong to password kong and create the db

I install kong from the install page with the package 0.9.5.xenial_all.

The i copy the kong.conf.default to kong.conf

the i run kong start and i get the following error

Error: /usr/local/share/lua/5.1/kong/cmd/start.lua:17: could not find OpenResty 'resty' executable. Kong requires version 1.11.2.1

  Run with --v (verbose) or --vv (debug) for more details

where is the problem

Most helpful comment

It is not about Kong @nor-bu. It is about Perl.

Just type this on your terminal and It will fix your problem;

export LC_CTYPE=en_US.UTF-8  
export LC_ALL=en_US.UTF-8  

Your error's detail is must be like this when you type perl on terminal;

perl: warning: Setting locale failed.  
perl: warning: Please check that your locale settings:  
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
are supported and installed on your system.  
perl: warning: Falling back to the standard locale ("C").  

All 6 comments

well, like the message says; it can't find the resty executable to start the apllication. And as it says, you can try the --vv option to get more logging and see what locations it tries to find the resy executable.

this is the log:

i see the problem, but is it necessary to install openresty manualy?

2016/11/19 11:40:12 [verbose] Kong: 0.9.5
2016/11/19 11:40:12 [debug] ngx_lua: 10006
2016/11/19 11:40:12 [debug] nginx: 1011002
2016/11/19 11:40:12 [debug] Lua: LuaJIT 2.1.0-beta2
2016/11/19 11:40:12 [debug] PRNG seed: 601901332002
2016/11/19 11:40:12 [verbose] no config file found at /etc/kong.conf
2016/11/19 11:40:12 [verbose] reading config file at /etc/kong/kong.conf
2016/11/19 11:40:12 [debug] admin_listen = "0.0.0.0:8001"
2016/11/19 11:40:12 [debug] anonymous_reports = true
2016/11/19 11:40:12 [debug] cassandra_consistency = "ONE"
2016/11/19 11:40:12 [debug] cassandra_contact_points = {"127.0.0.1"}
2016/11/19 11:40:12 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2016/11/19 11:40:12 [debug] cassandra_keyspace = "kong"
2016/11/19 11:40:12 [debug] cassandra_port = 9042
2016/11/19 11:40:12 [debug] cassandra_repl_factor = 1
2016/11/19 11:40:12 [debug] cassandra_repl_strategy = "SimpleStrategy"
2016/11/19 11:40:12 [debug] cassandra_ssl = false
2016/11/19 11:40:12 [debug] cassandra_ssl_verify = false
2016/11/19 11:40:12 [debug] cassandra_timeout = 5000
2016/11/19 11:40:12 [debug] cassandra_username = "kong"
2016/11/19 11:40:12 [debug] cluster_listen = "0.0.0.0:7946"
2016/11/19 11:40:12 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2016/11/19 11:40:12 [debug] cluster_profile = "wan"
2016/11/19 11:40:12 [debug] cluster_ttl_on_failure = 3600
2016/11/19 11:40:12 [debug] custom_plugins = {}
2016/11/19 11:40:12 [debug] database = "postgres"
2016/11/19 11:40:12 [debug] dnsmasq = true
2016/11/19 11:40:12 [debug] dnsmasq_port = 8053
2016/11/19 11:40:12 [debug] log_level = "notice"
2016/11/19 11:40:12 [debug] lua_code_cache = "on"
2016/11/19 11:40:12 [debug] lua_package_cpath = ""
2016/11/19 11:40:12 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2016/11/19 11:40:12 [debug] lua_ssl_verify_depth = 1
2016/11/19 11:40:12 [debug] mem_cache_size = "128m"
2016/11/19 11:40:12 [debug] nginx_daemon = "on"
2016/11/19 11:40:12 [debug] nginx_optimizations = true
2016/11/19 11:40:12 [debug] nginx_worker_processes = "auto"
2016/11/19 11:40:12 [debug] pg_database = "kong"
2016/11/19 11:40:12 [debug] pg_host = "127.0.0.1"
2016/11/19 11:40:12 [debug] pg_password = "******"
2016/11/19 11:40:12 [debug] pg_port = 5432
2016/11/19 11:40:12 [debug] pg_ssl = false
2016/11/19 11:40:12 [debug] pg_ssl_verify = false
2016/11/19 11:40:12 [debug] pg_user = "kong"
2016/11/19 11:40:12 [debug] prefix = "/usr/local/kong/"
2016/11/19 11:40:12 [debug] proxy_listen = "0.0.0.0:8000"
2016/11/19 11:40:12 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2016/11/19 11:40:12 [debug] serf_path = "serf"
2016/11/19 11:40:12 [debug] ssl = true
2016/11/19 11:40:12 [verbose] prefix in use: /usr/local/kong
2016/11/19 11:40:12 [verbose] preparing nginx prefix directory at /usr/local/kong
2016/11/19 11:40:12 [verbose] saving serf identifier to /usr/local/kong/serf/serf.id
2016/11/19 11:40:12 [debug] searching for OpenResty 'resty' executable
2016/11/19 11:40:12 [debug] /usr/local/openresty/bin/resty -V: 'perl: warning: Please check that your locale settings:'
2016/11/19 11:40:12 [verbose] could not start Kong, stopping services
2016/11/19 11:40:12 [verbose] leaving serf cluster
2016/11/19 11:40:12 [verbose] stopping dnsmasq at /usr/local/kong/pids/dnsmasq.pid
2016/11/19 11:40:12 [debug] sending signal to pid at: /usr/local/kong/pids/dnsmasq.pid
2016/11/19 11:40:12 [debug] no pid file at: /usr/local/kong/pids/dnsmasq.pid
2016/11/19 11:40:12 [verbose] stopped services
Error: 
/usr/local/share/lua/5.1/kong/cmd/start.lua:37: /usr/local/share/lua/5.1/kong/cmd/utils/log.lua:49: bad argument #4 to 'format' (no value)
stack traceback:
    [C]: in function 'error'
    /usr/local/share/lua/5.1/kong/cmd/start.lua:37: in function 'cmd_exec'
    /usr/local/share/lua/5.1/kong/cmd/init.lua:89: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:89>
    [C]: in function 'xpcall'
    /usr/local/share/lua/5.1/kong/cmd/init.lua:89: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:45>
    /usr/local/bin/kong:15: 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> 

@nor-bu Apologies for the delay in response. Did you manage to solve this?

check "2016/11/19 11:40:12 [debug] /usr/local/openresty/bin/resty -V: 'perl: warning: Please check that your locale settings:'"
it means your locale is not setting.
Step1:vi ~/.bashrc
Step2:add "export LC_ALL=C"
Step3:source ~/.bashrc
that is fine.

It is not about Kong @nor-bu. It is about Perl.

Just type this on your terminal and It will fix your problem;

export LC_CTYPE=en_US.UTF-8  
export LC_ALL=en_US.UTF-8  

Your error's detail is must be like this when you type perl on terminal;

perl: warning: Setting locale failed.  
perl: warning: Please check that your locale settings:  
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LANG = "en_US.UTF-8"
are supported and installed on your system.  
perl: warning: Falling back to the standard locale ("C").  

@se Thanks for helping out!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jeremyjpj0916 picture jeremyjpj0916  路  59Comments

nickveenhof picture nickveenhof  路  46Comments

jeremyjpj0916 picture jeremyjpj0916  路  34Comments

sonicaghi picture sonicaghi  路  39Comments

daviesf1 picture daviesf1  路  39Comments