kong kong stop時にエラー「/usr/local/share/lua/5.1/kong/cmd/stop.lua:24: nginx not running in prefix: /usr/local/kong」が発生した際の対処法

kongしばらく触っておらず、停止しようとkong stopコマンドを実行した際に上記エラーが発生したので、原因調査と対応方法
環境
OS CentOS Linux release 7.6.1810 (Core)
エラー内容
kong stopコマンドを実行時に発生
## --vvでデバック
kong stop --vv
Error:
/usr/local/share/lua/5.1/kong/cmd/stop.lua:24: nginx not running in prefix: /usr/local/kong
stack traceback:
[C]: in function 'assert'
/usr/local/share/lua/5.1/kong/cmd/stop.lua:24: in function 'cmd_exec'
/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:87>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/kong/cmd/init.lua:87: in function </usr/local/share/lua/5.1/kong/cmd/init.lua:44>
/usr/local/bin/kong:9: in function 'file_gen'
init_worker_by_lua:47: in function <init_worker_by_lua:45>
[C]: in function 'xpcall'
init_worker_by_lua:54: in function <init_worker_by_lua:52>
原因調査
プロセスIDを確認。/usr/local/kong/pids配下のnginx.pidを確認
2050になっていたので、
ps aux | grep 2050
<出力結果>
root 2050 0.0 0.1 272884 12104 ? Ss 10月10 0:00 nginx: master process /usr/local/openresty/nginx/sbin/nginx -p /usr/local/kong -c
で確認するとrootで実行されいたようなので、rootになってkongを停止
## root
su
## kong停止
kong stop
-
前の記事
React.js Notificationを簡単に実装できるreact-notification-systemの使い方 2020.01.28
-
次の記事
Kong ポート番号を変更してngrokを利用して外部接続テストを行う 2020.01.29
コメントを書く