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

Leonid Ilyevsky commented on FLINK-23980:
-----------------------------------------

Thanks for asking about the exit call. I don't have System.exit() in my code, 
but then I suspected that it happens in a library I am using 
(org.rogach::scallop:4.0.4). It happens indeed when required program argument 
is missing.

Now I understand how jobmanager failed in my test. When I requested a plan via 
browser, I didn't supply the program arguments, and when it called the main 
method, it got that exit call.

I fixed my code so this does not happen.

 On the other hand, it seems to me that jobmanager should be protected against 
bad behavior of the client code, which potentially can do any sort of nasty 
things. I believe you can use SecurityManager to block System.exit() calls.

 

 

 

> Jobmanager dies upon receiving REST API plan request
> ----------------------------------------------------
>
>                 Key: FLINK-23980
>                 URL: https://issues.apache.org/jira/browse/FLINK-23980
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / REST
>    Affects Versions: 1.13.1, 1.13.2
>            Reporter: Leonid Ilyevsky
>            Priority: Major
>
> Jobmanager terminates after receiving the following GET request:
> [http://va1qvllpar01:8091/jars/4431f09a-973e-40f1-8a26-c078b57ccb42_llogs-parser_2.12-1.2.6-assembly.jar/plan]
>  
> This type of request is described in the documentation here:
> [https://ci.apache.org/projects/flink/flink-docs-release-1.13/docs/ops/rest_api/]
>  
> Before termination, it prints the following in the log:
> {quote}2021-08-25 15:51:18.056 [flink-rest-server-netty-worker-thread-10] 
> WARN org.apache.flink.runtime.webmonitor.handlers.JarPlanHandler - 
> Configuring the job submission via query parameters is deprecated. Please 
> migrate to submitting a JSON request instead.
> 2021-08-25 15:51:18.143 [StandaloneSessionClusterEntrypoint shutdown hook] 
> INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Shutting 
> StandaloneSessionClusterEntrypoint down with application status UNKNOWN. 
> Diagnostics Cluster entrypoint has been closed externally..
> 2021-08-25 15:51:18.144 [StandaloneSessionClusterEntrypoint shutdown hook] 
> INFO org.apache.flink.runtime.dispatcher.DispatcherRestEndpoint - Shutting 
> down rest endpoint.
> 2021-08-25 15:51:18.211 [BlobServer shutdown hook] INFO 
> org.apache.flink.runtime.blob.BlobServer - Stopped BLOB server at 
> 0.0.0.0:37314
> {quote}
> The jarfile mentioned in my request is otherwise working fine, and I can 
> start jobs using it.
> You can see that the error message in the log is wrong: the request in 
> question was not a job submission request.
>  
> Maybe this request is bad, but obviously jobmanager should not terminate.



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

Reply via email to