I have an on-prem tyk setup running on k8s. I use Golang plugin for session management. The plugin works perfectly for all APIs. However, when I rebuilt the plugin with a few changes and applied it to one of my APIs, the API calls fail with 500 Internal Server Error
Below are snippets from the Tyk Gateway logs during the request:
time="May 06 14:33:58" level=debug msg=Started api_id=09647da4437b483640db0a0872c97cbc api_name="Auth Service" mw=AccessRightsCheck org_id=64e78f85a299fe0001f8a828 origin=192.168.6.117 path=/auth/users/v1/login ts=1746531238136825376
time="May 06 14:33:58" level=debug msg=Finished api_id=09647da4437b483640db0a0872c97cbc api_name="Auth Service" code=200 mw=AccessRightsCheck ns=139256 org_id=64e78f85a299fe0001f8a828 origin=192.168.6.117 path=/auth/users/v1/login
time="May 06 14:33:58" level=debug msg=Started api_id=09647da4437b483640db0a0872c97cbc api_name="Auth Service" mw=AccessRightsCheck org_id=64e78f85a299fe0001f8a828 origin=192.168.6.117 path=/auth/users/v1/login ts=1746531238137104770
==== Internal Server Error====
time="May 06 14:33:58" level=debug msg=Finished api_id=09647da4437b483640db0a0872c97cbc api_name="Auth Service" code=500 error="Internal Server Error" mw=AccessRightsCheck ns=341182 org_id=64e78f85a299fe0001f8a828 origin=192.168.6.117 path=/auth/users/v1/login
I am unable to understand if this is related to some policy as there is a “Started api_id=” log but error in the “Finished api_id=” log, OR it’s a plugin issue? Is there a way to view more verbose logs?
Attaching the plugin manifest.json
I am using for building the plugin:
{
"file_list": ["plugin.so"],
"custom_middleware": {
"pre": [
{
"disabled": false,
"name": "PreHeaderInjectors38",
"path": "./plugin.so",
"require_session": false,
"raw_body_only": false
}
],
"post": [],
"post_key_auth": [
{
"disabled": false,
"name": "LocationHeaderInjector38",
"path": "./plugin.so",
"require_session": false,
"raw_body_only": false
},
{
"disabled": false,
"name": "AuthHeaderInjector38",
"path": "./plugin.so",
"require_session": false,
"raw_body_only": false
}
],
"auth_check": {
"disabled": false,
"name": "",
"path": "",
"require_session": false,
"raw_body_only": false
},
"response": [
{
"disabled": false,
"name": "StripResponseHeaders38",
"path": "plugin.so",
"require_session": false,
"raw_body_only": false
}
],
"driver": "goplugin",
"id_extractor": {
"disabled": false,
"extract_from": "",
"extract_with": "",
"extractor_config": null
}
},
"checksum": "",
"signature": ""
}
Can someone help with what might be wrong here?