Go-pluginserver terminated when using custom Go plugin

Hello! I’m trying to use a custom Go plugin with my Kong, here are some details:

Kong Version: 2.0.2
Go Version: go version go1.13.5 linux/amd64
go-pluginserver version: Runtime Version: go1.13.5

I updated kong.conf to load my plugin, and Kong successfully starts. Although, when I execute a request to the service where my plugin is set, nothing happens, when I opend error.log i got a lot of this message:

2020/04/08 16:50:58 [notice] 26519#0: start worker process 26524
2020/04/08 16:50:58 [notice] 26519#0: start worker process 26525
2020/04/08 16:50:58 [notice] 26519#0: start worker process 26526
2020/04/08 16:50:58 [notice] 26519#0: start worker process 26527
2020/04/08 16:50:58 [notice] 26520#0: *1 [lua] cache_warmup.lua:45: cache_warmup_single_entity(): Preloading 'services' into the cache ..., context: init_worker_by_lua*
2020/04/08 16:50:58 [notice] 26520#0: *1 [lua] cache_warmup.lua:84: cache_warmup_single_entity(): finished preloading 'services' into the cache (in 85ms), context: init_worker_by_lua*
2020/04/08 16:50:58 [notice] 26520#0: *1 [lua] cache_warmup.lua:45: cache_warmup_single_entity(): Preloading 'plugins' into the cache ..., context: init_worker_by_lua*
2020/04/08 16:50:58 [notice] 26520#0: *1 [lua] cache_warmup.lua:84: cache_warmup_single_entity(): finished preloading 'plugins' into the cache (in 0ms), context: init_worker_by_lua*
2020/04/08 16:50:58 [notice] 26520#0: *16 [lua] cache_warmup.lua:25: warming up DNS entries ..., context: ngx.timer
2020/04/08 16:50:58 [notice] 26520#0: *16 [lua] cache_warmup.lua:35: finished warming up DNS entries' into the cache (in 6ms), context: ngx.timer
2020/04/08 16:51:24 [notice] 26519#0: signal 15 (SIGTERM) received from 27018, exiting
2020/04/08 16:51:24 [notice] 26520#0: exiting
2020/04/08 16:51:24 [notice] 26522#0: exiting
2020/04/08 16:51:24 [notice] 26521#0: exiting
2020/04/08 16:51:24 [notice] 26523#0: exiting
2020/04/08 16:51:24 [notice] 26524#0: exiting
2020/04/08 16:51:24 [notice] 26527#0: exiting
2020/04/08 16:51:24 [notice] 26525#0: exiting
2020/04/08 16:51:24 [notice] 26526#0: exiting
2020/04/08 16:51:24 [notice] 26527#0: exit
2020/04/08 16:51:24 [notice] 26520#0: exit
2020/04/08 16:51:24 [notice] 26521#0: exit
2020/04/08 16:51:24 [notice] 26522#0: exit
2020/04/08 16:51:24 [notice] 26519#0: signal 17 (SIGCHLD) received from 26527
2020/04/08 16:51:24 [notice] 26519#0: worker process 26520 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: worker process 26521 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: worker process 26522 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: worker process 26527 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: signal 29 (SIGIO) received
2020/04/08 16:51:24 [notice] 26523#0: exit
2020/04/08 16:51:24 [notice] 26519#0: signal 17 (SIGCHLD) received from 26523
2020/04/08 16:51:24 [notice] 26519#0: worker process 26523 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: signal 29 (SIGIO) received
2020/04/08 16:51:24 [notice] 26524#0: exit
2020/04/08 16:51:24 [notice] 26519#0: signal 17 (SIGCHLD) received from 26524
2020/04/08 16:51:24 [notice] 26519#0: worker process 26524 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: signal 29 (SIGIO) received
2020/04/08 16:51:24 [notice] 26526#0: exit
2020/04/08 16:51:24 [notice] 26519#0: signal 17 (SIGCHLD) received from 26526
2020/04/08 16:51:24 [notice] 26519#0: worker process 26526 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: signal 29 (SIGIO) received
2020/04/08 16:51:24 [notice] 26525#0: exit
2020/04/08 16:51:24 [notice] 26519#0: signal 17 (SIGCHLD) received from 26525
2020/04/08 16:51:24 [notice] 26519#0: worker process 26525 exited with code 0
2020/04/08 16:51:24 [notice] 26519#0: exit
2020/04/08 16:51:24 [notice] 27037#0: using the "epoll" event method
2020/04/08 16:51:24 [notice] 27037#0: openresty/1.15.8.2
2020/04/08 16:51:24 [notice] 27037#0: built by gcc 7.4.0 (Ubuntu 7.4.0-1ubuntu1~18.04.1) 
2020/04/08 16:51:24 [notice] 27037#0: OS: Linux 5.3.0-45-generic
2020/04/08 16:51:24 [notice] 27037#0: getrlimit(RLIMIT_NOFILE): 1024:4096
2020/04/08 16:51:24 [notice] 27049#0: start worker processes
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27050
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27051
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27052
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27053
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27054
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27055
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27056
2020/04/08 16:51:24 [notice] 27049#0: start worker process 27057
2020/04/08 16:51:24 [warn] 27050#0: *1 [lua] globalpatches.lua:52: sleep(): executing a blocking 'sleep' (0.001 seconds), context: init_worker_by_lua*
2020/04/08 16:51:24 [notice] 27050#0: *1 [lua] cache_warmup.lua:45: cache_warmup_single_entity(): Preloading 'services' into the cache ..., context: init_worker_by_lua*
2020/04/08 16:51:24 [notice] 27050#0: *1 [lua] cache_warmup.lua:84: cache_warmup_single_entity(): finished preloading 'services' into the cache (in 102ms), context: init_worker_by_lua*
2020/04/08 16:51:24 [notice] 27050#0: *1 [lua] cache_warmup.lua:45: cache_warmup_single_entity(): Preloading 'plugins' into the cache ..., context: init_worker_by_lua*
2020/04/08 16:51:24 [notice] 27050#0: *1 [lua] cache_warmup.lua:84: cache_warmup_single_entity(): finished preloading 'plugins' into the cache (in 0ms), context: init_worker_by_lua*
2020/04/08 16:51:24 [notice] 27050#0: *17 [lua] cache_warmup.lua:25: warming up DNS entries ..., context: ngx.timer
2020/04/08 16:51:24 [notice] 27050#0: *19 [kong] go.lua:84 Starting go-pluginserver, context: ngx.timer
2020/04/08 16:51:24 [notice] 27050#0: signal 17 (SIGCHLD) received from 27142
2020/04/08 16:51:24 [notice] 27050#0: *19 [kong] go.lua:95 go-pluginserver terminated: exit 0, context: ngx.timer

And those last three lines go on forever:

2020/04/08 16:51:24 [notice] 27050#0: signal 17 (SIGCHLD) received from 27398
2020/04/08 16:51:24 [notice] 27050#0: *19 [kong] go.lua:95 go-pluginserver terminated: exit 0, context: ngx.timer
2020/04/08 16:51:24 [notice] 27050#0: *19 [kong] go.lua:84 Starting go-pluginserver, context: ngx.timer

Am I doing something wrong ? Any help would be appreciated.

Try this:

1 Like