-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http-log plugin throws bad argument #4 to 'fmt' (number expected, got nil), context: ngx.timer #11931
Comments
looks like parsing your |
Here is the http_endpoint value. I try to send the data to logz.io |
Your endpoint has a query string but no path component. Instead of |
I think we should fix |
When I review the code of |
@flrgh Thanks for the hint this solved the issue for me. |
I think we'll keep this open for tracking in case anyone else encounters this problem in the near future. Thank you for the report @philippsteinberg :) |
Agree, I think it can be improved. Ideally this work could be committed upstream to the luasocket project, but if we can't make it good enough without using OpenResty/LuaJIT features then maybe it can be a new function somewhere in the |
+1 |
@flrgh , should we create a internal ticket to track it? Perhaps in the future we will implement a function like you said. |
upstream has fixed this by: lunarmodules/luasocket#418, but seems it has not released a new version containing this fix. track this issue and try to implement a new function by KAG-3028 |
FYI, the same error is logged when there's authentication in the URL, the endpoint is Grafana Cloud: All the best -Erwin |
Is there an existing issue for this?
Kong version (
$ kong version
)Kong 3.4
Current Behavior
Hi I try to send logs with the http-log plugin to an http endpoint via a post request.
To test the functionality I configured it liked described on the plugin docu page https://docs.konghq.com/hub/kong-inc/http-log/how-to/basic-example/ under Enable globally
When I start Kong with the config I see the following error in the logs:
[error] 2317#0: *13 [lua] job.lua:284: execute(): [timer-ng] failed to run timer queue 0dc6f45b-8f8d-40d2-a504-473544ee190b.https://xxx:POST:application/json:3000:60000:nil: ./http-log/handler.lua:135: bad argument #4 to 'fmt' (number expected, got nil), context: ngx.timer
After that I see no more logs from the plugin in the logs and no data is received at the endpoint
Expected Behavior
Plugin should work and send the request and response logs to the http endpoint
Steps To Reproduce
Configure the http-log plugin like described in the plugin page
https://docs.konghq.com/hub/kong-inc/http-log/how-to/basic-example/ under Enable globally
Anything else?
No response
The text was updated successfully, but these errors were encountered: