Error closing file and warnings in Tyk Gateway logs

Hi,

I have deployed Tyk Gateway with the official Tyk Helm Chart. I keep seeing warnings in the logs

level=warning msg=“Legacy path detected! Upgrade to extended.”
level=error msg=“error while closing file /mnt/tyk-gateway/apps/…json”

I can’t figure out why this is occurring. Anyone with ideas?

Thanks in advance

Hi @hannahlindblad

For the legacy path issue, can you check if you are not still using the paths field when extended paths is enabled in your API definition?

"paths": {
      "ignored": [],                             
      "white_list": [],
      "black_list": []
    },
    "use_extended_paths": true,

Those path lists are legacy and they shouldn’t be as we stopped supporting in version 2 I think

As for the second error, I haven’t encountered that before. You may want to check your app path value is correct or that there are no read or write restrictions in that part. Or that the api_id of your definition does not have any whitespace or unicode characters

Hi @Olu and thanks for your response,

The legacy path issue was solved with your comment. Thanks a lot!

I’ve been trying to debug the other error and see if there are any read or write restrictions on the files but I can’t find anything. I’ve deployed with the official helm chart for the headless version of the Tyk Gateway.

I’m attempting to mount some api definitions as json files from a config map at start up and copy them into the container in an init container step. The path I’m copying the files over to is mnt/tyk-gateway/apps.

It’s working fine and the api definitions are loaded. However I see the above error

gateway-tyk-headless time="Mar 27 17:19:49" level=info msg="Loading API Specification from /mnt/tyk-gateway/apps/graphql-service.json"                                                                                 gateway-tyk-headless time="Mar 27 17:19:49" level=error msg="error while closing file /mnt/tyk-gateway/apps/graphql-service.json" 

EDIT: Removed erroneous statement

Don’t know if related but I can see this error in /var/log/tyk-gateway.stderr

/var/log$ cat tyk-gateway.stderr 
chroot: cannot change root directory to '': No such file or directory