Support Questions
Find answers, ask questions, and share your expertise

YARN: Waiting for application to be killed

Contributor

I'm trying to kill an application in YARN but I get the message "Waiting for application ID to be killed".

There is a way to kill it fast? Thanks in advance.

13686-1489674596.png

2 REPLIES 2

Super Mentor

@Facundo Bianco

You can try using the YARN APIs to kill an application.

https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.3.6/bk_yarn_resource_mgt/content/ch_yarn_rest_a...

Example:

curl -v -X PUT -d '{"state": "KILLED"}''http://localhost:8088/ws/v1/cluster/apps/application_1409421698529_0012'

.

- But i suspect that it might also be in waiting state.

- Do you see the RM log shows that the app had indeed transitioned from RUNNING to KILLED but still the client is showing "to be killed" then there is an issue

and we might try tuning the "yarn.client.application-client-protocol.poll-timeout-ms" parameter : https://hadoop.apache.org/docs/current/hadoop-yarn/hadoop-yarn-common/yarn-default.xml It's default value -1 means unlimited wait time.

Contributor

I tried in YARN API and I got this error message

[yarn@foo ~]$ curl -v -X PUT -d '{"state": "KILLED"}' 'http://foo.example.com:8088/ws/v1/cluster/apps/application_1487024494103_0099'
* About to connect() to foo.example.com port 8088 (#0)
*   Trying 192.168.1.1...
* Connected to foo.example.com (192.168.1.1) port 8088 (#0)
> PUT /ws/v1/cluster/apps/application_1487024494103_0099 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: foo.example.com:8088
> Accept: */*
> Content-Length: 19
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 19 out of 19 bytes
< HTTP/1.1 500 Internal Server Error
< Cache-Control: no-cache
< Expires: Thu, 30 Mar 2017 19:51:36 GMT
< Date: Thu, 30 Mar 2017 19:51:36 GMT
< Pragma: no-cache
< Expires: Thu, 30 Mar 2017 19:51:36 GMT
< Date: Thu, 30 Mar 2017 19:51:36 GMT
< Pragma: no-cache
< Content-Type: application/json
< Transfer-Encoding: chunked
< Server: Jetty(6.1.26.hwx)
<
* Connection #0 to host foo.example.com left intact
{"RemoteException":{"exception":"WebApplicationException","javaClassName":"javax.ws.rs.WebApplicationException"}}
; ;