You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Esteban Serrano (JIRA)" <ji...@apache.org> on 2018/05/11 15:53:00 UTC

[jira] [Commented] (FLINK-8949) Rest API failure with long URL

    [ https://issues.apache.org/jira/browse/FLINK-8949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16472156#comment-16472156 ] 

Esteban Serrano commented on FLINK-8949:
----------------------------------------

Running into a similar problem with the REST API to submit a job. The program args that are needed to run the job make the URL go over the 4096 limit, so a TooLongFrameException is thrown from Netty.
{quote}DefaultFullHttpRequest(decodeResult: failure(io.netty.handler.codec.TooLongFrameException: An HTTP line is larger than 4096 bytes.), version: HTTP/1.0, content: EmptyByteBufBE)
 GET /bad-request HTTP/1.0
{quote}
The issue with this is that the `GET /bad-request` redirect is not mapped to any static resource, and the lookup for such a resource in the classpath comes back empty, and thus the ??Failure: 404 Not Found?? response which is misleading.

 The sample below is part of a job request that fails. As you can see, escaping special chars in the URL is part of the reason why the size can get really long...
{quote}POST /jars/35ad124e-c3b8-466d-a9ae-4c4bc999ea46_k4m-flink-all-0.0.106.jar/run?program-args=--kpiStreamConfig+%22%7B%2522name%2522%3A%2522TestKPIStream%2522%2C%2522inputs%2522%3A%5B%7B%2522type%2522%3A%2522kafka%2522%2C%2522attributes%2522%3A%7B%2522group.id%2522%3A%2522ngx%2522%2C%2522bootstrap.servers%2522%3A%2522192.168.99.100%3A9092%2522%2C%2522topic%2522%3A%2522input%2522%7D%2C%2522formatter%2522%3A%7B%2522type%2522%3A%2522simpleInput%2522%7D%7D%5D%2C%2522outputs%2522%3A%5B%7B%2522type%2522%3A%2522kafka%2522%2C%2522attributes%2522%3A%7B%2522bootstrap.servers%2522%3A%2522192.168.99.100%3A9092%2522%2C%2522topic%2522%3A%2522output%2522%7D%2C%2522formatter%2522%3A%7B%2522type%2522%3A%2522simpleOutput%2522%7D%7D%5D%2C%2522kpis%2522%3A%5B%7B%2522using%2522%3Anull%2C%2522name%2522%3A%2522affirmed-flow-kpis%2522%2C%2522namespace%2522%3Anull%2C%2522uri%2522%3Anull%2C%2522group%2522%3Anull%7D%5D%2C%2522parallelism%2522%3A1%2C%2522interval%2522%3A0%2C%2522type%2522%3A%2522kpi%2522%2C%2522restartAttempts%2522%3A3%2C%....
{quote}
 

Can the same POST for a submit job request be accomplished without the use of URL params or is this the only option? 

> Rest API failure with long URL
> ------------------------------
>
>                 Key: FLINK-8949
>                 URL: https://issues.apache.org/jira/browse/FLINK-8949
>             Project: Flink
>          Issue Type: Bug
>          Components: REST, Webfrontend
>    Affects Versions: 1.5.0, 1.4.2
>            Reporter: Truong Duc Kien
>            Priority: Major
>
> When you have jobs with high parallelism, the URL for a REST request can get very long. When the URL is longer than 4096 bytes, the  REST API will return error
> {{Failure: 404 Not Found}}
>  This can easily be seen in the Web UI, when Flink queries for the watermark using the REST API:
> {{GET /jobs/:jobId/vertices/:vertexId/metrics?get=0.currentLowWatermark,1.currentLowWatermark,2.currentLo...}}
> The request will fail with more than 170 subtasks and the watermark will not be displayed in the Web UI.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)