You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@tez.apache.org by "Hitesh Shah (JIRA)" <ji...@apache.org> on 2016/11/10 19:53:58 UTC
[jira] [Commented] (TEZ-3536) NPE in WebUIService start when host
resolution fails.
[ https://issues.apache.org/jira/browse/TEZ-3536?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15654963#comment-15654963 ]
Hitesh Shah commented on TEZ-3536:
----------------------------------
Tracing through "NetUtils.createSocketAddrForHost" , it seems like a null InetAddress can be show up when a name resolution fails.
{code}
public static InetSocketAddress createSocketAddrForHost(String host, int port) {
String staticHost = getStaticResolution(host);
String resolveHost = (staticHost != null) ? staticHost : host;
InetSocketAddress addr;
try {
InetAddress iaddr = SecurityUtil.getByName(resolveHost);
// if there is a static entry for the host, make the returned
// address look like the original given host
if (staticHost != null) {
iaddr = InetAddress.getByAddress(host, iaddr.getAddress());
}
addr = new InetSocketAddress(iaddr, port);
} catch (UnknownHostException e) {
addr = InetSocketAddress.createUnresolved(host, port);
}
return addr;
{code}
The simple fix might to fallback to the NM host value provided. Patch attached with this fix.
> NPE in WebUIService start when host resolution fails.
> -----------------------------------------------------
>
> Key: TEZ-3536
> URL: https://issues.apache.org/jira/browse/TEZ-3536
> Project: Apache Tez
> Issue Type: Bug
> Reporter: Hitesh Shah
> Assignee: Hitesh Shah
> Attachments: TEZ-3536.1.patch
>
>
> {code}
> [ERROR] [ServiceThread:org.apache.tez.dag.app.web.WebUIService] |web.WebUIService|: Tez UI WebService failed to start.
> java.lang.NullPointerException
> at org.apache.tez.dag.app.web.WebUIService.serviceStart(WebUIService.java:98)
> at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
> at org.apache.tez.dag.app.DAGAppMaster$ServiceWithDependency.start(DAGAppMaster.java:1657)
> at org.apache.tez.dag.app.DAGAppMaster$ServiceThread.run(DAGAppMaster.java:1678)
> [INFO] [ServiceThread:org.apache.tez.dag.app.web.WebUIService] |service.AbstractService|: Service org.apache.tez.dag.app.web.WebUIService failed in state STARTED; cause: org.apache.tez.dag.api.TezUncheckedException: java.lang.NullPointerException
> org.apache.tez.dag.api.TezUncheckedException: java.lang.NullPointerException
> at org.apache.tez.dag.app.web.WebUIService.serviceStart(WebUIService.java:103)
> at org.apache.hadoop.service.AbstractService.start(AbstractService.java:193)
> at org.apache.tez.dag.app.DAGAppMaster$ServiceWithDependency.start(DAGAppMaster.java:1657)
> at org.apache.tez.dag.app.DAGAppMaster$ServiceThread.run(DAGAppMaster.java:1678)
> Caused by: java.lang.NullPointerException
> at org.apache.tez.dag.app.web.WebUIService.serviceStart(WebUIService.java:98)
> ... 3 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)