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

Keepalive with HTTP2 triggers a lot of logs #19643

Closed
andrewma2 opened this issue Jan 17, 2024 · 0 comments · Fixed by #19801
Closed

Keepalive with HTTP2 triggers a lot of logs #19643

andrewma2 opened this issue Jan 17, 2024 · 0 comments · Fixed by #19801
Labels
source: http_server Anything `http_server` source related type: bug A code related bug.

Comments

@andrewma2
Copy link

A note for the community

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Problem

After upgrading to 0.35, we start to see a lot of logs like

{"host":"vector-aggregator-0","message":"Connection header illegal in HTTP/2: connection","metadata":{"kind":"event","level":"WARN","module_path":"hyper::proto::h2","target":"hyper::proto::h2"},"pid":1,"source_type":"internal_logs","timestamp":"2024-01-16T23:20:59.694834689Z"}

We're using an http_server source with an HTTP2 connection. Setting keepalive.max_connection_age_secs to a high value, we no longer see these logs. This leads us to think that this issue arises from the new keepalive feature for HTTP server sources sending with the Connection header which is not accepted in HTTP2.

Configuration

Adding http_server source config (with some parts obscured)

"http": {
            "address": XXX,
            "decoding": {
                "codec": "protobuf",
                "protobuf": {
                    XXX
                }
            },
            "framing": {
                "method": "bytes"
            },
            "headers": [

            ],
            "tls": {
                "alpn_protocols": [
                    "h2"
                ],
                "ca_file": XXX,
                "crt_file": XXX,
                "enabled": true,
                "key_file": XXX,
                "verify_certificate": false
            },
            "type": "http_server"
        }

Version

0.35.0

Debug Output

No response

Example Data

No response

Additional Context

Initial thread on support channel in Discord

References

No response

@andrewma2 andrewma2 added the type: bug A code related bug. label Jan 17, 2024
@jszwedko jszwedko added this to the Vector v0.35.1 milestone Jan 18, 2024
@jszwedko jszwedko added the source: http_server Anything `http_server` source related label Jan 18, 2024
jszwedko added a commit that referenced this issue Feb 5, 2024
…based on HTTP version

Previously this header was sent when `default_max_connection_age` expired for all HTTP requests
regardless of HTTP version, but this header is not applicable to HTTP/2 and HTTP/3 requests. Instead
only send this header for other HTTP versions.

HTTP/2 and HTTP/3 support GOAWAY frames for this but I think this may need to be implemented at
a different level.

Fixes: #19643

Signed-off-by: Jesse Szwedko <[email protected]>
github-merge-queue bot pushed a commit that referenced this issue Feb 6, 2024
…based on HTTP version (#19801)

* fix(http_server source): Conditionally send Connection: Close header based on HTTP version

Previously this header was sent when `default_max_connection_age` expired for all HTTP requests
regardless of HTTP version, but this header is not applicable to HTTP/2 and HTTP/3 requests. Instead
only send this header for other HTTP versions.

HTTP/2 and HTTP/3 support GOAWAY frames for this but I think this may need to be implemented at
a different level.

Fixes: #19643

Signed-off-by: Jesse Szwedko <[email protected]>

* Add changelog entry

Signed-off-by: Jesse Szwedko <[email protected]>

---------

Signed-off-by: Jesse Szwedko <[email protected]>
jszwedko added a commit that referenced this issue Feb 6, 2024
…based on HTTP version (#19801)

* fix(http_server source): Conditionally send Connection: Close header based on HTTP version

Previously this header was sent when `default_max_connection_age` expired for all HTTP requests
regardless of HTTP version, but this header is not applicable to HTTP/2 and HTTP/3 requests. Instead
only send this header for other HTTP versions.

HTTP/2 and HTTP/3 support GOAWAY frames for this but I think this may need to be implemented at
a different level.

Fixes: #19643

Signed-off-by: Jesse Szwedko <[email protected]>

* Add changelog entry

Signed-off-by: Jesse Szwedko <[email protected]>

---------

Signed-off-by: Jesse Szwedko <[email protected]>
AndrooTheChen pushed a commit to discord/vector that referenced this issue Sep 23, 2024
…based on HTTP version (vectordotdev#19801)

* fix(http_server source): Conditionally send Connection: Close header based on HTTP version

Previously this header was sent when `default_max_connection_age` expired for all HTTP requests
regardless of HTTP version, but this header is not applicable to HTTP/2 and HTTP/3 requests. Instead
only send this header for other HTTP versions.

HTTP/2 and HTTP/3 support GOAWAY frames for this but I think this may need to be implemented at
a different level.

Fixes: vectordotdev#19643

Signed-off-by: Jesse Szwedko <[email protected]>

* Add changelog entry

Signed-off-by: Jesse Szwedko <[email protected]>

---------

Signed-off-by: Jesse Szwedko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source: http_server Anything `http_server` source related type: bug A code related bug.
Projects
None yet
2 participants