Unable to open cache file

I use kong 2.2 with hybrid mode,and I always get the error message from my data plane error.log

2021/01/06 22:20:25 [notice] 2113#0: *4842 [lua] cache.lua:386: purge(): [DB cache] purging (local) cache, context: ngx.timer

2021/01/06 22:20:25 [notice] 2113#0: *4842 [lua] cache.lua:386: purge(): [DB cache] purging (local) cache, context: ngx.timer

2021/01/06 22:20:26 [error] 2113#0: *4842 [lua] clustering.lua:100: unable to open cache file: /usr/local/kong//config.cache.json.gz: Permission denied, context: ngx.timer

Fixed here https://github.com/Kong/kong/pull/6421

It should be released in the upcoming 2.3 version.

Also, just to make sure the fix will work for you, would you mind sharing:

  1. what distribution you are using (docker alpine, centos 7 rpm, etc);
  2. your kong.conf’s nginx_user value;
  3. permissions and ownership credentials of your Kong prefix directory (output of ls -lash /usr/local/kong/)
  4. output of ps aux | grep nginx

thanks

  1. centos 7 rpm

3&4

I download the kong rpm and use yum install to install it.
I didn’t change any permissions and ownership credentials for Kong prefix directory.

Got it. Would you please try it in the 2.3.0 beta release? The CentOS 7 rpm should be available in the usual places (bintray) for download and install.


© 2019 Kong Inc.    Terms  •  Privacy  •  FAQ