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

transport: loopyWriter.run returning. connection error: desc = "transport is closing" #2

Open
bcba25 opened this issue Feb 25, 2020 · 0 comments

Comments

@bcba25
Copy link

bcba25 commented Feb 25, 2020

I got an issue with gRPC service. I'm using grpc-web on my client side Angular application.

I constantly receiving CORS error:

has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

and also sometimes I do receive the following message on the grpc server:

transport: loopyWriter.run returning. connection error: desc = "transport is closing"

and the logging shows that grpc request received but no response sent back to the client app

Here are my configs:

Consul LDS:

[{
	"name": "listener_0",
	"address": {
		"socket_address": {
			"address": "0.0.0.0",
			"port_value": 8080
		}
	},
	"filter_chains": [{
		"filters": [{
			"name": "envoy.http_connection_manager",
			"config": {
				"codec_type": "auto",
				"stat_prefix": "ingress_http",
				"route_config": {
					"name": "local_route",
					"virtual_hosts": [{
						"name": "local_service",
						"domains": [
							"*"
						],
						"routes": [{
							"match": {
								"prefix": "/App.Grpc.MyApp1"
							},
							"route": {
								"cluster": "main_service",
								"max_grpc_timeout": "0s"
							}
						}],
            "cors": {
              "allow_origin": [
                "*"
              ],
              "allow_methods": "GET, PUT, DELETE, POST, OPTIONS",
              "allow_headers": "keep-alive, user-agent, cache-control, content-type, content-transfer-encoding, Authorization, x-ip, x-accept-content-transfer-encoding, x-accept-response-streaming, x-user-agent, x-grpc-web, grpc-timeout",
              "max_age": "1728000",
              "expose_headers": "grpc-status, grpc-message",
              "enable": true
            }
					}]
				},
				"http_filters": [{
						"name": "envoy.cors"
					},
					{
						"name": "envoy.grpc_web"
					},
					{
						"name": "envoy.router"
					}
				]
			}
		}]
	}]
}]

Consul CDS:

[{
	"name": "MyApp1",
	"connect_timeout": "0.25s",
	"type": "logical_dns",
	"lb_policy": "round_robin",
	"http2_protocol_options": {},
	"hosts": [{
		"socket_address": {
			"address": "host.docker.internal", # also tried docker service name my_app
			"port_value": 50053
		}
	}]
}]

When I'm running envoy and go service without Pilot, everything works fine with exactly same configs, trying to figure out how to update envoy dynamically. Any help would be appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant