-
Notifications
You must be signed in to change notification settings - Fork 845
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
Proxying with "Expect: 100-continue" does not work correctly #1763
Comments
Marathon 0.9.0 rc3 |
/cc @kolloch, @aquamatthias – feels like a blocker for the release |
Hey @sttts thanks for reporting this - we will investigate. |
Couldn't reproduce this with a local environment yet. I started a leader instance on port 8080 and a non-leader instance on port 8081. I used "--hostname localhost" to advertise the correct host name. Then I performed a request to the leader: http -v --json POST localhost:8080/v2/groups quatsch=1 POST /v2/groups HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 16
Content-Type: application/json
Host: localhost:8080
User-Agent: HTTPie/0.9.2
{
"quatsch": "1"
}
HTTP/1.1 422
Cache-Control: no-cache, no-store, must-revalidate
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.1.15.v20140411)
Transfer-Encoding: chunked
X-Marathon-Leader: http://localhost:8080
{
"errors": [
{
"attribute": "id",
"error": "Property missing which is mandatory"
}
]
}
And the request to the non-leader: http -v --json POST localhost:8081/v2/groups quatsch=1 POST /v2/groups HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
Connection: keep-alive
Content-Length: 16
Content-Type: application/json
Host: localhost:8081
User-Agent: HTTPie/0.9.2
{
"quatsch": "1"
}
HTTP/1.1 422 Unprocessable Entity
Cache-Control: no-cache, no-store, must-revalidate
Content-Length: 77
Content-Type: application/json
Expires: 0
Pragma: no-cache
Server: Jetty(8.1.15.v20140411)
X-Marathon-Leader: http://localhost:8080
X-Marathon-Via: 1.1 localhost:8081
{
"errors": [
{
"attribute": "id",
"error": "Property missing which is mandatory"
}
]
} |
I can also not reproduce it in our own production environment which runs 0.9.0-RC3 |
Just for reference, I also tried with illegal json ("asd") via httpie and curl. I also tried the redis.json above which was provided to me out-of-band. |
Seems to work with |
Gives HTTP 200 |
Might be related to http://bugs.java.com/view_bug.do?bug_id=8012625 |
I can reproduce the bug with https://gist.github.com/kolloch/b0ff39e96c3bbd083b8a, I will try with Java 8 now. |
0.8.2 already contains the issue. So this is not a regression blocking the release of 0.9.0 in my opinion. Upgrading to Java 8 fixes the problem. Maybe we should do this soon? |
Further note: curl only sets the Expect-Header if the payload reaches a certain size. |
Nice catch @kolloch! |
We will recommend Java 8 for Marathon 0.11. This should be solved by this. |
This would allow to start marathon using the non-default jdk. Particularly useful to work around issue 1763 mesosphere#1763 Change-Id: I101c9a17fa38e6b88ca562d75bb02b2c1c557279
This would allow to start marathon using the non-default jdk. Particularly useful to work around issue 1763 #1763 Change-Id: I101c9a17fa38e6b88ca562d75bb02b2c1c557279
This would allow to start marathon using the non-default jdk. Particularly useful to work around issue 1763 #1763 Change-Id: I101c9a17fa38e6b88ca562d75bb02b2c1c557279
Workarounds
Original Text
I deploy a redis cluster. srv005 is marathon leader. Then:
But, talking to srv005 directly gives http 400:
In the logs of srv004:
The text was updated successfully, but these errors were encountered: