Skip to content
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

malformed HTTP response from logging.googleapis.com:443 on connection #186 #4528

Closed
tpetrov-lp opened this issue Dec 23, 2021 · 16 comments
Closed
Labels

Comments

@tpetrov-lp
Copy link
Contributor

tpetrov-lp commented Dec 23, 2021

I see a lot of messages like "malformed HTTP response from logging.googleapis.com:443 on connection #186" in the logs of our 1.8.11 deployment. It's ~200K warnings over 10h. (it's apparently coming from the stackdriver output plugin)
Looking through the code, it seems a few different responses can cause it - basically content length, status code and ending chunk. Have someone experienced this? Or should I check with Google if this can be really something with their response?

@agup006
Copy link
Member

agup006 commented Dec 28, 2021

Adding @qingling128 from the Google side

@qingling128
Copy link
Collaborator

@tpetrov-lp - Hi, do you happen to have the full API response with a timestamp?

@tpetrov-lp
Copy link
Contributor Author

tpetrov-lp commented Jan 6, 2022

@qingling128 I don't see the full api response logged from fluent-bit. Can it be turned on with some flag?
I am attaching a screenshot with some timestamps, but it happens pretty much constantly, so not sure if this helps at all.

image

@tuxillo
Copy link

tuxillo commented Jan 11, 2022

I have the same warning repeating over and over but with the bigquery output plugin.

@tpetrov-lp have you tried enabling Log_Level trace under the SERVICE section and tls.debug 4 under the OUTPUT section? I might be missing something else but I think that gives a bit more information, not sure if the full response is there though.

BTW, expect a lot of output in the logs :)

@tpetrov-lp
Copy link
Contributor Author

Yeah, I am a bit reluctant to running it in trace mode, because we have 200K msg/sec, so it will probably produce huge amount of logs. We can think about running it for a while if it will help, but I think that even in trace mode it does not log the full response.
@tuxillo if you have run it with trace enables, did you see some hints what the problem might be? I am pretty sure that it should be the same problem for BigQuery and StackDriver.

@dsludwig
Copy link

dsludwig commented Jan 25, 2022

I am also encountering this issue. I enabled Log_Level trace and tls.debug 4 as suggested, but a complete response is not available. One symptom seems to be net_read returning only one byte at a time:

Jan 25 19:47:07 raspberrypi td-agent-bit[7945]: [2022/01/25 19:47:07] [trace] [io coro=0x75ee7240] [net_read] try up to 4082 bytes
Jan 25 19:47:07 raspberrypi td-agent-bit[7945]: [2022/01/25 19:47:07] [trace] [io coro=0x75ee7240] [net_read] ret=1
Jan 25 19:47:07 raspberrypi td-agent-bit[7945]: [2022/01/25 19:47:07] [trace] [io coro=0x75ee7240] [net_read] try up to 4081 bytes
Jan 25 19:47:07 raspberrypi td-agent-bit[7945]: [2022/01/25 19:47:07] [trace] [io coro=0x75ee7240] [net_read] ret=1
Jan 25 19:47:07 raspberrypi td-agent-bit[7945]: [2022/01/25 19:47:07] [ warn] [http_client] malformed HTTP response from logging.googleapis.com:443 on connection #36
Jan 25 19:47:07 raspberrypi td-agent-bit[7945]: [2022/01/25 19:47:07] [ warn] [output:stackdriver:stackdriver.1] http_do=-1

malformed-response.log

Edit:

Is this related to #4098? Is there an underlying error that is being presented as 1 byte read?

@tuxillo
Copy link

tuxillo commented Jan 25, 2022

It seems that warning is printed on FLB_HTTP_ERROR after a call to process_data(), here:

flb_warn("[http_client] malformed HTTP response from %s:%i on "

But that FLB_HTTP_ERROR can come from multiple places from the called function. I wonder if it would be worth adding some code to discriminate among those errors so debugging is easier in case of issues? Also a way of dumping the payload at a specific trace level, perhaps?

@tuxillo
Copy link

tuxillo commented Feb 11, 2022

Has anybody made any progress? Thanks!

@nokute78
Copy link
Collaborator

@dsludwig I think it is related to #4098. Openssl error may be occurred.
What version are you using ? The error handling issue #4098 is fixed from v1.8.12.

See also: #4723 (comment)

@tuxillo
Copy link

tuxillo commented Feb 18, 2022

@dsludwig did you try with the latest version?

@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label May 20, 2022
@tuxillo
Copy link

tuxillo commented May 20, 2022

Please don't close, I'll check my logs and version now.

@github-actions github-actions bot removed the Stale label May 21, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label Aug 19, 2022
@tuxillo
Copy link

tuxillo commented Aug 19, 2022

Sorry for the late reply, the upgrade fixed the problem, thanks!

@github-actions github-actions bot removed the Stale label Aug 20, 2022
@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the exempt-stale label.

@github-actions github-actions bot added the Stale label Nov 19, 2022
@github-actions
Copy link
Contributor

This issue was closed because it has been stalled for 5 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants