Adam Cecile created MESOS-9364:
----------------------------------
Summary: Unable to fetch container behind HTTP/2 server
Key: MESOS-9364
URL: https://issues.apache.org/jira/browse/MESOS-9364
Project: Mesos
Issue Type: Bug
Reporter: Adam Cecile
Hello,
It's currently impossible to fetch a container (in mesos mode, pure docker
works) because http-parser used in libprocess fails to parse the response.
I created the following patch to retreive some information in stderr.
The included link to GitHub shows http-parser is *NOT* going to support HTTP/2
so I think it's time to find an alternative for this...
{noformat}
--- mesos-1.4.1.orig/3rdparty/libprocess/src/decoder.hpp
+++ mesos-1.4.1/3rdparty/libprocess/src/decoder.hpp
@@ -32,6 +32,7 @@
#include <stout/gzip.hpp>
#include <stout/option.hpp>
#include <stout/try.hpp>
+#include <stdio.h>
#if !(HTTP_PARSER_VERSION_MAJOR >= 2)
@@ -325,8 +326,21 @@ public:
size_t parsed = http_parser_execute(&parser, &settings, data, length);
if (parsed != length) {
+
// TODO(bmahler): joyent/http-parser exposes error reasons.
- failure = true;
+ if (parser.http_errno != 0) {
+
+ fprintf(stderr, "HTTP Parsing Error: %s\n",
http_errno_description(http_errno(parser.http_errno)));
+
+ if (parser.http_errno == 14) {
+ // https://github.com/nodejs/http-parser/issues/350
+ fprintf(stderr, "HTTP Parsing Error: invalid HTTP version, http-parser does
not support HTTP/2\n");
+ }
+
+ failure = true;
+
+ }
+
}
if (!responses.empty()) {{noformat}
Best regards, Adam.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)