You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Gary Yao (Jira)" <ji...@apache.org> on 2020/01/08 18:04:00 UTC

[jira] [Comment Edited] (FLINK-15489) Cannot update jobmanager/taskmanager logs

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

Gary Yao edited comment on FLINK-15489 at 1/8/20 6:03 PM:
----------------------------------------------------------

I just tested this in 1.9.1. Indeed, the JM log refresh does not work as expected. In the Chrome inspector I can see that most of the XHR requests are hitting the browser cache when I press the refresh button (see attached screenshot).
 !screenshot-1.png! 

I think this is because we set the {{Cahce-Control}} HTTP header in Flink's {{StaticFileServerHandler}} to 300 seconds [1]. Using {{curl}}, I can confirm that the header is set 

{noformat}
curl -vvv -s http://localhost:8081/jobmanager/log 1> /dev/null
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8081 (#0)
> GET /jobmanager/log HTTP/1.1
> Host: localhost:8081
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain
< Date: Wed, 08 Jan 2020 17:54:17 GMT
< Expires: Wed, 08 Jan 2020 17:59:17 GMT
< Cache-Control: private, max-age=300
< Last-Modified: Wed, 08 Jan 2020 17:54:17 GMT
< Connection: keep-alive
< content-length: 641263
<
{ [16384 bytes data]
* Connection #0 to host localhost left intact
{noformat}

[1] https://github.com/apache/flink/blob/bd56224c3063fd23d508a4250e5698d4840fa488/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/files/StaticFileServerHandler.java#L361


was (Author: gjy):
I just tested this in 1.9.1. Indeed, the JM log refresh does not work as expected. In the Chrome inspector I can see that most of the XHR requests are hitting the browser cache when I press the refresh button (see attached screenshot).
 !screenshot-1.png! 

I think this is because we set the {{Cahce-Control}} HTTP header in Flink's {{StaticFileServerHandler}} to 300s [1]. Using {{curl}}, I can confirm that the header is set 

{noformat}
curl -vvv -s http://localhost:8081/jobmanager/log 1> /dev/null
*   Trying ::1...
* TCP_NODELAY set
* Connected to localhost (::1) port 8081 (#0)
> GET /jobmanager/log HTTP/1.1
> Host: localhost:8081
> User-Agent: curl/7.54.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Content-Type: text/plain
< Date: Wed, 08 Jan 2020 17:54:17 GMT
< Expires: Wed, 08 Jan 2020 17:59:17 GMT
< Cache-Control: private, max-age=300
< Last-Modified: Wed, 08 Jan 2020 17:54:17 GMT
< Connection: keep-alive
< content-length: 641263
<
{ [16384 bytes data]
* Connection #0 to host localhost left intact
{noformat}

[1] https://github.com/apache/flink/blob/bd56224c3063fd23d508a4250e5698d4840fa488/flink-runtime/src/main/java/org/apache/flink/runtime/rest/handler/legacy/files/StaticFileServerHandler.java#L361

> Cannot update jobmanager/taskmanager logs
> -----------------------------------------
>
>                 Key: FLINK-15489
>                 URL: https://issues.apache.org/jira/browse/FLINK-15489
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / Web Frontend
>    Affects Versions: 1.9.1, 1.10.0
>            Reporter: Dawid Wysakowicz
>            Priority: Blocker
>             Fix For: 1.10.0
>
>         Attachments: screenshot-1.png
>
>
> There is no way to query the latest state of logs of jobmanager/taskmanager.
> The Web UI show only the first version that was ever displayed.
> How to reproduce:
> * (not sure if necessary) configure logback as described here: https://ci.apache.org/projects/flink/flink-docs-stable/dev/best_practices.html#use-logback-when-running-flink-on-a-cluster
> * start a cluster
> * show jobmanager logs in the Web UI
> * run example job
> * check again the jobmanager logs, there is no trace of the job. Clicking the refresh button does not help



--
This message was sent by Atlassian Jira
(v8.3.4#803005)