Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Weave proxy unexpectedly closes the connection in chunked responses #1103

Closed
2opremio opened this issue Jul 8, 2015 · 0 comments · Fixed by #1112
Closed

Weave proxy unexpectedly closes the connection in chunked responses #1103

2opremio opened this issue Jul 8, 2015 · 0 comments · Fixed by #1112
Assignees
Labels
Milestone

Comments

@2opremio
Copy link
Contributor

2opremio commented Jul 8, 2015

In an ECS-optimized AMI in Amazon's EC2, amazon-ecs-init prestart fails when using the weave proxy (DOCKER_HOST=unix:///vart/run/weave.sock):

[root@ip-XXX-XX-XX-XX ec2-user]# DOCKER_HOST=unix:///var/run/weave.sock /usr/libexec/amazon-ecs-init pre-start
2015-07-08T16:25:11Z [INFO] pre-start
2015-07-08T16:25:11Z [ERROR] could not check if Agent is loaded: persistent connection closed

However, it works just fine when using Docker directly.

After further inspection it seems like weave proxy is sending a Connection: close header.

Using Weave Proxy:

GET /v1.15/images/json?all=1 HTTP/1.1
Host:
User-Agent: go-dockerclient

HTTP/1.1 200 OK
Connection: close
Content-Type: application/json
Date: Wed, 08 Jul 2015 16:07:12 GMT
Transfer-Encoding: chunked

Using Docker directly:

GET /v1.15/images/json?all=1 HTTP/1.1
Host:
User-Agent: go-dockerclient

HTTP/1.1 200 OK
Content-Type: application/json
Date: Wed, 08 Jul 2015 16:09:01 GMT
Transfer-Encoding: chunked

In case it helps, here's what seems to be the code making the /v1.15/images/json?all=1 request: https://github.com/aws/amazon-ecs-init/blob/master/ecs-init/docker/docker.go#L53

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

Successfully merging a pull request may close this issue.

4 participants