Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
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...
--- 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()) {
Best regards, Adam.