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

http/1.1 protocol error: HPE_INVALID_METHOD #8247

Closed
liorlevtov opened this issue Sep 15, 2019 · 5 comments
Closed

http/1.1 protocol error: HPE_INVALID_METHOD #8247

liorlevtov opened this issue Sep 15, 2019 · 5 comments
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently

Comments

@liorlevtov
Copy link

Description:
I'm exporting legacy service which uses CUSTOM HTTP METHODS XX_IN, YY_OUT which is being used for HTTP polling (the days before WebSockets). does envoy support such a methods?

I'm able to get a page successfully but when using those custom methods I get the following error

my setup is include service (with 1 or 2 instances) and ssl termination.
static_resources:
listeners:

  • address:
    socket_address:
    address: 0.0.0.0
    port_value: 443
    filter_chains:
    • filters:
      • name: envoy.http_connection_manager
        typed_config:
        "@type": type.googleapis.com/envoy.config.filter.network.http_connection_manager.v2.HttpConnectionManager
        codec_type: HTTP1
        stat_prefix: ingress_http
        route_config:
        name: local_route
        virtual_hosts:
        - name: backend
        domains:
        - "xxx"
        routes:
        - match:
        prefix: ""
        route:
        cluster: service1
        http_filters:
        • name: envoy.router
          typed_config: {}
          tls_context:
          common_tls_context:
          tls_certificates:
          • certificate_chain:
            filename: "xxx.crt"
            private_key:
            filename: "xxx.key"
            clusters:
  • name: service1
    connect_timeout: 0.25s
    type: strict_dns
    lb_policy: round_robin
    load_assignment:
    cluster_name: service1
    endpoints:
    • lb_endpoints:
      • endpoint:
        address:
        socket_address:
        address: 127.0.0.1
        port_value: 8091
      • endpoint:
        address:
        socket_address:
        address: 127.0.0.1
        port_value: 8092
        admin:
        access_log_path: "/dev/stdout"
        address:
        socket_address:
        address: 0.0.0.0
        port_value: 8001

[optional Relevant Links:]
[2019-09-11 13:24:35.935][911025][debug][main] [external/envoy/source/server/connection_handler_impl.cc:280] [C0] new connection
[2019-09-11 13:24:35.935][911025][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:168] [C0] handshake error: 2
[2019-09-11 13:24:35.941][911025][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:168] [C0] handshake error: 5
[2019-09-11 13:24:35.941][911025][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:201] [C0]
[2019-09-11 13:24:35.941][911025][debug][connection] [external/envoy/source/common/network/connection_impl.cc:520] [C0] remote close
[2019-09-11 13:24:35.941][911025][debug][connection] [external/envoy/source/common/network/connection_impl.cc:190] [C0] closing socket: 0
[2019-09-11 13:24:35.941][911025][debug][main] [external/envoy/source/server/connection_handler_impl.cc:80] [C0] adding to cleanup list
[2019-09-11 13:24:35.951][911031][debug][main] [external/envoy/source/server/connection_handler_impl.cc:280] [C1] new connection
[2019-09-11 13:24:35.951][911031][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:168] [C1] handshake error: 2
[2019-09-11 13:24:35.953][911031][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:168] [C1] handshake error: 2
[2019-09-11 13:24:35.954][911031][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:157] [C1] handshake complete
[2019-09-11 13:24:35.955][911031][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:246] [C1] new stream
[2019-09-11 13:24:35.955][911031][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:261] [C1] dispatch error: http/1.1 protocol error: HPE_INVALID_METHOD
[2019-09-11 13:24:35.955][911031][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:1596] [C1][S14445260976725954725] stream reset
[2019-09-11 13:24:35.955][911031][debug][connection] [external/envoy/source/common/network/connection_impl.cc:101] [C1] closing data_to_write=66 type=2
[2019-09-11 13:24:35.955][911031][debug][connection] [external/envoy/source/common/network/connection_impl.cc:653] [C1] setting delayed close timer with timeout 1000 ms
[2019-09-11 13:24:35.956][911031][debug][connection] [external/envoy/source/common/network/connection_impl.cc:582] [C1] write flush complete
[2019-09-11 13:24:35.956][911031][debug][connection] [external/envoy/source/common/network/connection_impl.cc:582] [C1] write flush complete
[2019-09-11 13:24:35.964][911026][debug][main] [external/envoy/source/server/connection_handler_impl.cc:280] [C2] new connection
[2019-09-11 13:24:35.964][911026][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:168] [C2] handshake error: 2
[2019-09-11 13:24:35.965][911026][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:168] [C2] handshake error: 2
[2019-09-11 13:24:35.967][911026][debug][connection] [external/envoy/source/extensions/transport_sockets/tls/ssl_socket.cc:157] [C2] handshake complete
[2019-09-11 13:24:35.968][911026][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:246] [C2] new stream
[2019-09-11 13:24:35.968][911026][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:261] [C2] dispatch error: http/1.1 protocol error: HPE_INVALID_METHOD
[2019-09-11 13:24:35.968][911026][debug][http] [external/envoy/source/common/http/conn_manager_impl.cc:1596] [C2][S3118138754103831962] stream reset
[2019-09-11 13:24:35.968][911026][debug][connection] [external/envoy/source/common/network/connection_impl.cc:101] [C2] closing data_to_write=66 type=2
[2019-09-11 13:24:35.968][911026][debug][connection] [external/envoy/source/common/network/connection_impl.cc:653] [C2] setting delayed close timer with timeout 1000 ms
[2019-09-11 13:24:35.968][911026][debug][connection] [external/envoy/source/common/network/connection_impl.cc:582] [C2] write flush complete
[2019-09-11 13:24:35.969][911026][debug][connection] [external/envoy/source/common/network/connection_impl.cc:582] [C2] write flush complete

@zuercher
Copy link
Member

Custom HTTP methods are not supported.

@zuercher zuercher added the question Questions that are neither investigations, bugs, nor enhancements label Sep 16, 2019
@alyssawilk
Copy link
Contributor

Looks like a fundamental limitation of http_parser
https://github.com/nodejs/http-parser/blob/master/http_parser.c#L953

Apparently longstanding too, as I see a 5 year old custom patch workaround which was never submitted: https://gist.github.com/indutny/3403029c5815fd0799ee

@AndresGuedez

@moderation
Copy link
Contributor

I added a comment to #5155 (comment) yesterday as it looks like http-parser is going to be deprecated sooner rather than later.

@stale
Copy link

stale bot commented Oct 18, 2019

This issue has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in the next 7 days unless it is tagged "help wanted" or other activity occurs. Thank you for your contributions.

@stale stale bot added the stale stalebot believes this issue/PR has not been touched recently label Oct 18, 2019
@stale
Copy link

stale bot commented Oct 25, 2019

This issue has been automatically closed because it has not had activity in the last 37 days. If this issue is still valid, please ping a maintainer and ask them to label it as "help wanted". Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Questions that are neither investigations, bugs, nor enhancements stale stalebot believes this issue/PR has not been touched recently
Projects
None yet
Development

No branches or pull requests

4 participants