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

Running Start command a second time seems to be stopping Kong #1744

Closed
kkindaface opened this issue Oct 13, 2016 · 1 comment
Closed

Running Start command a second time seems to be stopping Kong #1744

kkindaface opened this issue Oct 13, 2016 · 1 comment

Comments

@kkindaface
Copy link

Summary

On both CentOS and MacOSX, running the start command a second time seems to be bringing the server down. (The error message says nginx is already running but it seems to be brought down)

Steps To Reproduce

  1. kong start
  2. kong start

Additional Details & Logs

  • Kong version : 0.9.3
  • Kong debug-level startup logs (from the second run)

2016/10/13 10:54:51 [verbose] Kong: 0.9.3
2016/10/13 10:54:51 [debug] ngx_lua: 10005
2016/10/13 10:54:51 [debug] nginx: 1009015
2016/10/13 10:54:51 [debug] Lua: LuaJIT 2.1.0-beta2
2016/10/13 10:54:51 [verbose] no config file found at /etc/kong.conf
2016/10/13 10:54:51 [verbose] reading config file at /etc/kong/kong.conf
2016/10/13 10:54:51 [debug] admin_listen = "0.0.0.0:8001"
2016/10/13 10:54:51 [debug] anonymous_reports = true
2016/10/13 10:54:51 [debug] cassandra_consistency = "ONE"
2016/10/13 10:54:51 [debug] cassandra_contact_points = {"127.0.0.1"}
2016/10/13 10:54:51 [debug] cassandra_data_centers = {"dc1:2","dc2:3"}
2016/10/13 10:54:51 [debug] cassandra_keyspace = "kong"
2016/10/13 10:54:51 [debug] cassandra_port = 9042
2016/10/13 10:54:51 [debug] cassandra_repl_factor = 1
2016/10/13 10:54:51 [debug] cassandra_repl_strategy = "SimpleStrategy"
2016/10/13 10:54:51 [debug] cassandra_ssl = false
2016/10/13 10:54:51 [debug] cassandra_ssl_verify = false
2016/10/13 10:54:51 [debug] cassandra_timeout = 5000
2016/10/13 10:54:51 [debug] cassandra_username = "kong"
2016/10/13 10:54:51 [debug] cluster_listen = "0.0.0.0:7946"
2016/10/13 10:54:51 [debug] cluster_listen_rpc = "127.0.0.1:7373"
2016/10/13 10:54:51 [debug] cluster_profile = "wan"
2016/10/13 10:54:51 [debug] cluster_ttl_on_failure = 3600
2016/10/13 10:54:51 [debug] custom_plugins = {}
2016/10/13 10:54:51 [debug] database = "postgres"
2016/10/13 10:54:51 [debug] dns_resolver = "8.8.8.8"
2016/10/13 10:54:51 [debug] dnsmasq = false
2016/10/13 10:54:51 [debug] dnsmasq_port = 8053
2016/10/13 10:54:51 [debug] log_level = "notice"
2016/10/13 10:54:51 [debug] lua_code_cache = "on"
2016/10/13 10:54:51 [debug] lua_package_cpath = ""
2016/10/13 10:54:51 [debug] lua_package_path = "?/init.lua;./kong/?.lua"
2016/10/13 10:54:51 [debug] lua_ssl_verify_depth = 1
2016/10/13 10:54:51 [debug] mem_cache_size = "128m"
2016/10/13 10:54:51 [debug] nginx_daemon = "on"
2016/10/13 10:54:51 [debug] nginx_optimizations = true
2016/10/13 10:54:51 [debug] nginx_worker_processes = "auto"
2016/10/13 10:54:51 [debug] pg_database = "kong"
2016/10/13 10:54:51 [debug] pg_host = "127.0.0.1"
2016/10/13 10:54:51 [debug] pg_password = "******"
2016/10/13 10:54:51 [debug] pg_port = 5432
2016/10/13 10:54:51 [debug] pg_ssl = false
2016/10/13 10:54:51 [debug] pg_ssl_verify = false
2016/10/13 10:54:51 [debug] pg_user = "postgres"
2016/10/13 10:54:51 [debug] prefix = "/usr/local/kong/"
2016/10/13 10:54:51 [debug] proxy_listen = "0.0.0.0:8000"
2016/10/13 10:54:51 [debug] proxy_listen_ssl = "0.0.0.0:8443"
2016/10/13 10:54:51 [debug] serf_path = "serf"
2016/10/13 10:54:51 [debug] ssl = true
2016/10/13 10:54:51 [verbose] prefix in use: /usr/local/kong
2016/10/13 10:54:51 [verbose] preparing nginx prefix directory at /usr/local/kong
2016/10/13 10:54:51 [verbose] saving serf identifier to /usr/local/kong/serf/serf.id
2016/10/13 10:54:51 [debug] searching for OpenResty 'resty' executable
2016/10/13 10:54:51 [debug] /usr/local/openresty/bin/resty -V: 'nginx version: openresty/1.9.15.1'
2016/10/13 10:54:51 [debug] found OpenResty 'resty' executable at /usr/local/openresty/bin/resty
2016/10/13 10:54:51 [verbose] saving serf shell script handler to /usr/local/kong/serf/serf_event.sh
2016/10/13 10:54:51 [verbose] SSL enabled, no custom certificate set: using default certificate
2016/10/13 10:54:51 [verbose] default SSL certificate found at /usr/local/kong/ssl/kong-default.crt
2016/10/13 10:54:51 [warn] ulimit is currently set to "2560". For better performance set it to at least "4096" using "ulimit -n"
2016/10/13 10:54:51 [verbose] running datastore migrations
2016/10/13 10:54:51 [verbose] migrations up to date
2016/10/13 10:54:51 [debug] sending signal to pid at: /usr/local/kong/pids/serf.pid
2016/10/13 10:54:51 [debug] kill -0 cat /usr/local/kong/pids/serf.pid >/dev/null 2>&1
2016/10/13 10:54:51 [verbose] serf agent already running at /usr/local/kong/pids/serf.pid
2016/10/13 10:54:51 [debug] searching for OpenResty 'nginx' executable
2016/10/13 10:54:51 [debug] /usr/local/openresty/nginx/sbin/nginx -v: 'nginx version: openresty/1.9.15.1'
2016/10/13 10:54:51 [debug] found OpenResty 'nginx' executable at /usr/local/openresty/nginx/sbin/nginx
2016/10/13 10:54:51 [debug] sending signal to pid at: /usr/local/kong/pids/nginx.pid
2016/10/13 10:54:51 [debug] kill -0 cat /usr/local/kong/pids/nginx.pid >/dev/null 2>&1
2016/10/13 10:54:51 [verbose] could not start Kong, stopping services
2016/10/13 10:54:51 [debug] sending signal to pid at: /usr/local/kong/pids/nginx.pid
2016/10/13 10:54:51 [debug] kill -0 cat /usr/local/kong/pids/nginx.pid >/dev/null 2>&1
2016/10/13 10:54:51 [verbose] sending TERM signal to nginx running at /usr/local/kong/pids/nginx.pid
2016/10/13 10:54:51 [debug] sending signal to pid at: /usr/local/kong/pids/nginx.pid
2016/10/13 10:54:51 [debug] kill -s TERM cat /usr/local/kong/pids/nginx.pid >/dev/null 2>&1
2016/10/13 10:54:51 [verbose] leaving serf cluster
2016/10/13 10:54:51 [verbose] left serf cluster
2016/10/13 10:54:51 [verbose] stopping serf agent at /usr/local/kong/pids/serf.pid
2016/10/13 10:54:51 [debug] sending signal to pid at: /usr/local/kong/pids/serf.pid
2016/10/13 10:54:51 [debug] kill -15 cat /usr/local/kong/pids/serf.pid >/dev/null 2>&1
2016/10/13 10:54:51 [verbose] serf agent stopped
2016/10/13 10:54:51 [verbose] stopped services
Error:
/usr/local/share/lua/5.1/kong/cmd/start.lua:37: /usr/local/share/lua/5.1/kong/cmd/start.lua:23: nginx is already running in /usr/local/kong
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:85: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:85>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:85: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:42>
/usr/local/bin/kong:11: 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>

@thibaultcha
Copy link
Member

thibaultcha commented Oct 14, 2016

Hey,

So like your previous issue, this is already fixed by #1645, and will also be part of 0.10. Thanks for reporting anyways!

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

2 participants