2

I am using a envoy proxy for grpc-web and everything was working fine with one service but now I am registering other services I ran into problems. I thought a routed configuration would work but when I try to hit the endpoint it gives me a DNS resolution failed in bloomRPC.

Should I just move to a sidecar envoy mesh configuration? I've been avoiding this because it adds complexity to development, but in my research to fix this problem it came up a lot.

I'm running it with docker-compose in MacOS Catalina.

admin:
  access_log_path: /tmp/admin_access.log
  address:
    socket_address: { address: 0.0.0.0, port_value: 9991 }

static_resources:
  listeners:
    - name: listener_0
      address:
        socket_address:
          address: 0.0.0.0
          port_value: 9911
      filter_chains:

        - filters:
            - name: envoy.filters.network.http_connection_manager
              typed_config:
                "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
                codec_type: auto
                stat_prefix: ingress_http
                route_config:
                  name: local_route
                  virtual_hosts:
                    - name: local_service
                      domains:
                        - "*"
                      routes:
                        - match:
                            prefix: "/service1"
                          route:
                            cluster: service1
                        - match:
                            prefix: "/service2"
                          route:
                            cluster: service2
                      cors:
                        allow_origin_string_match:
                          - prefix: "*"
                        allow_methods: GET,PUT,DELETE,POST,OPTIONS
                        allow_headers: keep-alive,user-agent,cache-control,content-type,content-transfer-encoding,custom-header-1,x-accept-content-transfer-encoding,x-accept-response-streaming,x-user-agent,x-grpc-web,grpc-timeout,access-token
                        max_age: "1728000"
                        expose_headers: custom-header-1,grpc-status,grpc-message,access-token
                        allow_credentials: true
                http_filters:
                  - name: envoy.filters.http.grpc_http1_bridge
                    typed_config: { }
                  - name: envoy.filters.http.grpc_web
                    typed_config: { }
                  - name: envoy.filters.http.cors
                    typed_config: { }
                  - name: envoy.filters.http.router
                    typed_config: { }

  clusters:
    - name: service1
      connect_timeout: 0.25s
      type: strict_dns
      dns_lookup_family: V4_ONLY
      http2_protocol_options: { }
      lb_policy: round_robin
      load_assignment:
        cluster_name: service1
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address:
                      address: host.docker.internal #0.0.0.0
                      port_value: 50101

    - name: service2
      connect_timeout: 0.25s
      type: strict_dns
      dns_lookup_family: V4_ONLY
      http2_protocol_options: { }
      lb_policy: round_robin
      load_assignment:
        cluster_name: service2
        endpoints:
          - lb_endpoints:
              - endpoint:
                  address:
                    socket_address:
                      address: host.docker.internal #0.0.0.0
                      port_value: 50102
Luis Liz
  • 1,939
  • 4
  • 20
  • 31
  • Hey, did you ever solve this? – Chance Nov 26 '20 at 04:09
  • Just switched to a service mesh but that is not fully working yet had to stop for a while. – Luis Liz Dec 08 '20 at 16:00
  • i followed the same path. Although I did figure out the problem above. You need to switch BloomRPC from `GRPC` to `Web` – Chance Dec 08 '20 at 20:17
  • @LuisLiz I am using envoy proxy with a lot of gRPC-services and routing works just fine for me; I did the same as you, but I did not set the `dns_lookup_family: V4_ONLY` and used the IP for the address field... since your error says `DNS resolution failed` I would assume your problem is there – freek van der wand Apr 08 '21 at 16:06

0 Answers0