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

Envoy seems not to honor "Connection: close" HTTP header #234

Closed
vladlosev opened this issue Nov 18, 2016 · 4 comments
Closed

Envoy seems not to honor "Connection: close" HTTP header #234

vladlosev opened this issue Nov 18, 2016 · 4 comments
Labels

Comments

@vladlosev
Copy link
Contributor

We have a setup when we have to varnish an Envoy-fronted server, and have defined Varnish probes to test the backend health. The problem is that Varnish considers the backend to be perpetually sick because it does not close the connection after forwarding the response, even if the probe sends the Connection: close header.

Here is a network capture from a probe being sent:

20:01:39.092382 IP private.38315 > 10.0.18.222.8282: Flags [S], seq 795357912, win 26883, options [mss 8961,sackOK,TS val 3658896941 ecr 0,nop,wscale 7], length 0
	0x0000:  4500 003c 64f5 4000 4006 9ad3 0a00 1416  E..<d.@.@.......
	0x0010:  0a00 12de 95ab 205a 2f68 32d8 0000 0000  .......Z/h2.....
	0x0020:  a002 6903 3b22 0000 0204 2301 0402 080a  ..i.;"....#.....
	0x0030:  da16 562d 0000 0000 0103 0307            ..V-........
20:01:39.092988 IP 10.0.18.222.8282 > private.38315: Flags [S.], seq 2488892053, ack 795357913, win 26847, options [mss 8961,sackOK,TS val 519304291 ecr 3658896941,nop,wscale 11], length 0
	0x0000:  4500 003c 0000 4000 4006 ffc8 0a00 12de  E..<..@.@.......
	0x0010:  0a00 1416 205a 95ab 9459 7a95 2f68 32d9  .....Z...Yz./h2.
	0x0020:  a012 68df 1bfb 0000 0204 2301 0402 080a  ..h.......#.....
	0x0030:  1ef3 f463 da16 562d 0103 030b            ...c..V-....
20:01:39.093001 IP private.38315 > 10.0.18.222.8282: Flags [.], ack 1, win 211, options [nop,nop,TS val 3658896942 ecr 519304291], length 0
	0x0000:  4500 0034 64f6 4000 4006 9ada 0a00 1416  E..4d.@.@.......
	0x0010:  0a00 12de 95ab 205a 2f68 32d9 9459 7a96  .......Z/h2..Yz.
	0x0020:  8010 00d3 3b1a 0000 0101 080a da16 562e  ....;.........V.
	0x0030:  1ef3 f463                                ...c
20:01:39.093028 IP private.38315 > 10.0.18.222.8282: Flags [P.], seq 1:89, ack 1, win 211, options [nop,nop,TS val 3658896942 ecr 519304291], length 88
	0x0000:  4500 008c 64f7 4000 4006 9a81 0a00 1416  E...d.@.@.......
	0x0010:  0a00 12de 95ab 205a 2f68 32d9 9459 7a96  .......Z/h2..Yz.
	0x0020:  8018 00d3 3b72 0000 0101 080a da16 562e  ....;r........V.
	0x0030:  1ef3 f463 4745 5420 2f6a 656c 6c6f 2f61  ...cGET./jello/a
	0x0040:  7069 2048 5454 502f 312e 310d 0a58 2d56  pi.HTTP/1.1..X-V
	0x0050:  5343 4f2d 5365 7276 6963 653a 206d 6f6e  SCO-Service:.mon
	0x0060:  6f6c 6974 680d 0a48 6f73 743a 206d 6f6e  olith..Host:.mon
	0x0070:  6f6c 6974 680d 0a43 6f6e 6e65 6374 696f  olith..Connectio
	0x0080:  6e3a 2063 6c6f 7365 0d0a 0d0a            n:.close....
20:01:39.093577 IP 10.0.18.222.8282 > private.38315: Flags [.], ack 89, win 14, options [nop,nop,TS val 519304291 ecr 3658896942], length 0
	0x0000:  4500 0034 8ef5 4000 4006 70db 0a00 12de  E..4..@[email protected].....
	0x0010:  0a00 1416 205a 95ab 9459 7a96 2f68 3331  .....Z...Yz./h31
	0x0020:  8010 000e d090 0000 0101 080a 1ef3 f463  ...............c
	0x0030:  da16 562e                                ..V.
20:01:39.106115 IP 10.0.18.222.8282 > private.38315: Flags [P.], seq 1:207, ack 89, win 14, options [nop,nop,TS val 519304294 ecr 3658896942], length 206
	0x0000:  4500 0102 8ef6 4000 4006 700c 0a00 12de  E.....@[email protected].....
	0x0010:  0a00 1416 205a 95ab 9459 7a96 2f68 3331  .....Z...Yz./h31
	0x0020:  8018 000e f63e 0000 0101 080a 1ef3 f466  .....>.........f
	0x0030:  da16 562e 4854 5450 2f31 2e31 2032 3030  ..V.HTTP/1.1.200
	0x0040:  204f 4b0d 0a63 6f6e 7465 6e74 2d6c 656e  .OK..content-len
	0x0050:  6774 683a 2035 0d0a 636f 6e74 656e 742d  gth:.5..content-
	0x0060:  7479 7065 3a20 7465 7874 2f68 746d 6c3b  type:.text/html;
	0x0070:  2063 6861 7273 6574 3d55 5446 2d38 0d0a  .charset=UTF-8..
	0x0080:  782d 656e 766f 792d 7570 7374 7265 616d  x-envoy-upstream
	0x0090:  2d73 6572 7669 6365 2d74 696d 653a 2031  -service-time:.1
	0x00a0:  320d 0a73 6572 7665 723a 2065 6e76 6f79  2..server:.envoy
	0x00b0:  0d0a 6461 7465 3a20 4672 692c 2031 3820  ..date:.Fri,.18.
	0x00c0:  4e6f 7620 3230 3136 2032 303a 3031 3a33  Nov.2016.20:01:3
	0x00d0:  3920 474d 540d 0a78 2d65 6e76 6f79 2d70  9.GMT..x-envoy-p
	0x00e0:  726f 746f 636f 6c2d 7665 7273 696f 6e3a  rotocol-version:
	0x00f0:  2048 5454 502f 312e 310d 0a0d 0a6f 6b20  .HTTP/1.1....ok.
	0x0100:  676f                                     go
20:01:39.106122 IP private.38315 > 10.0.18.222.8282: Flags [.], ack 207, win 219, options [nop,nop,TS val 3658896945 ecr 519304294], length 0
	0x0000:  4500 0034 64f8 4000 4006 9ad8 0a00 1416  E..4d.@.@.......
	0x0010:  0a00 12de 95ab 205a 2f68 3331 9459 7b64  .......Z/h31.Y{d
	0x0020:  8010 00db 3b1a 0000 0101 080a da16 5631  ....;.........V1
	0x0030:  1ef3 f466                                ...f
20:01:42.108259 IP private.38315 > 10.0.18.222.8282: Flags [F.], seq 89, ack 207, win 219, options [nop,nop,TS val 3658897695 ecr 519304294], length 0
	0x0000:  4500 0034 64f9 4000 4006 9ad7 0a00 1416  E..4d.@.@.......
	0x0010:  0a00 12de 95ab 205a 2f68 3331 9459 7b64  .......Z/h31.Y{d
	0x0020:  8011 00db 3b1a 0000 0101 080a da16 591f  ....;.........Y.
	0x0030:  1ef3 f466                                ...f
20:01:42.108939 IP 10.0.18.222.8282 > private.38315: Flags [F.], seq 207, ack 90, win 14, options [nop,nop,TS val 519305045 ecr 3658897695], length 0
	0x0000:  4500 0034 8ef7 4000 4006 70d9 0a00 12de  E..4..@[email protected].....
	0x0010:  0a00 1416 205a 95ab 9459 7b64 2f68 3332  .....Z...Y{d/h32
	0x0020:  8011 000e c9dd 0000 0101 080a 1ef3 f755  ...............U
	0x0030:  da16 591f                                ..Y.
20:01:42.108953 IP private.38315 > 10.0.18.222.8282: Flags [.], ack 208, win 219, options [nop,nop,TS val 3658897696 ecr 519305045], length 0
	0x0000:  4500 0034 64fa 4000 4006 9ad6 0a00 1416  E..4d.@.@.......
	0x0010:  0a00 12de 95ab 205a 2f68 3332 9459 7b65  .......Z/h32.Y{e
	0x0020:  8010 00db 3b1a 0000 0101 080a da16 5920  ....;.........Y.
	0x0030:  1ef3 f755                                ...U

Varnish is sending Connection: close but Envoy is not closing the connection after sending its response. Varnish is closing the connection itself after 3 seconds, but that causes it to consider the probe failing and reject the backend.

@mattklein123
Copy link
Member

Thanks for the report will fix

@mattklein123
Copy link
Member

#239

@mattklein123
Copy link
Member

fixed

@vladlosev
Copy link
Contributor Author

👏

rshriram pushed a commit to rshriram/envoy that referenced this issue Oct 30, 2018
Automatic merge from submit-queue.

[DO NOT MERGE] Auto PR to update dependencies of mixerclient

This PR will be merged automatically once checks are successful.
```release-note
none
```
PiotrSikora pushed a commit to PiotrSikora/envoy that referenced this issue Aug 5, 2020
…envoyproxy#11831) (envoyproxy#234)

Currently Opencensus tracer uses grpcService proto to configure its tracing client stub. It uses GoogleGrpcUtil to construct a channel and create client stub with that. However, the channel created there does not take care of initial_metadata from grpcService configure. This change fills in OCprepare_client_context option in export to make it respect initial metadata.

Risk level: Low

Signed-off-by: Pengyuan Bian <[email protected]>
wolfguoliang pushed a commit to wolfguoliang/envoy that referenced this issue Jan 23, 2021
fix docs/root/install/building.rst translation issue
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

2 participants