You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Bilwa S T (Jira)" <ji...@apache.org> on 2020/07/08 17:24:00 UTC

[jira] [Updated] (HADOOP-17119) Netty upgrade to 9.4.x causes MR app fail with IOException

     [ https://issues.apache.org/jira/browse/HADOOP-17119?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bilwa S T updated HADOOP-17119:
-------------------------------
    Description: 
I think we should catch IOException here instead of BindException in HttpServer2#bindForPortRange
{code:java}
 for(Integer port : portRanges) {
      if (port == startPort) {
        continue;
      }
      Thread.sleep(100);
      listener.setPort(port);
      try {
        bindListener(listener);
        return;
      } catch (BindException ex) {
        // Ignore exception. Move to next port.
        ioException = ex;
      }
    }
{code}

Stacktrace:

{code:java}
 HttpServer.start() threw a non Bind IOException | HttpServer2.java:1142
java.io.IOException: Failed to bind to xxxxx/xxx.xx.xx.xx:27101
	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
	at org.apache.hadoop.http.HttpServer2.bindListener(HttpServer2.java:1190)
	at org.apache.hadoop.http.HttpServer2.bindForPortRange(HttpServer2.java:1258)
	at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:1282)
	at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:1139)
	at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:451)
	at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:440)
	at org.apache.hadoop.mapreduce.v2.app.client.MRClientService.serviceStart(MRClientService.java:148)
	at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194)
	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceStart(MRAppMaster.java:1378)
	at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194)
	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$7.run(MRAppMaster.java:1998)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1729)
	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1994)
	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1890)
Caused by: java.net.BindException: Address already in use
	at sun.nio.ch.Net.bind0(Native Method)
	at sun.nio.ch.Net.bind(Net.java:433)
	at sun.nio.ch.Net.bind(Net.java:425)
	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:342)
	... 17 more
{code}


  was:
I think we should catch IOException here instead of BindException in HttpServer2#bindForPortRange
{code:java}
 for(Integer port : portRanges) {
      if (port == startPort) {
        continue;
      }
      Thread.sleep(100);
      listener.setPort(port);
      try {
        bindListener(listener);
        return;
      } catch (BindException ex) {
        // Ignore exception. Move to next port.
        ioException = ex;
      }
    }
{code}


> Netty upgrade to 9.4.x causes MR app fail with IOException
> ----------------------------------------------------------
>
>                 Key: HADOOP-17119
>                 URL: https://issues.apache.org/jira/browse/HADOOP-17119
>             Project: Hadoop Common
>          Issue Type: Bug
>            Reporter: Bilwa S T
>            Assignee: Bilwa S T
>            Priority: Major
>
> I think we should catch IOException here instead of BindException in HttpServer2#bindForPortRange
> {code:java}
>  for(Integer port : portRanges) {
>       if (port == startPort) {
>         continue;
>       }
>       Thread.sleep(100);
>       listener.setPort(port);
>       try {
>         bindListener(listener);
>         return;
>       } catch (BindException ex) {
>         // Ignore exception. Move to next port.
>         ioException = ex;
>       }
>     }
> {code}
> Stacktrace:
> {code:java}
>  HttpServer.start() threw a non Bind IOException | HttpServer2.java:1142
> java.io.IOException: Failed to bind to xxxxx/xxx.xx.xx.xx:27101
> 	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:346)
> 	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:307)
> 	at org.apache.hadoop.http.HttpServer2.bindListener(HttpServer2.java:1190)
> 	at org.apache.hadoop.http.HttpServer2.bindForPortRange(HttpServer2.java:1258)
> 	at org.apache.hadoop.http.HttpServer2.openListeners(HttpServer2.java:1282)
> 	at org.apache.hadoop.http.HttpServer2.start(HttpServer2.java:1139)
> 	at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:451)
> 	at org.apache.hadoop.yarn.webapp.WebApps$Builder.start(WebApps.java:440)
> 	at org.apache.hadoop.mapreduce.v2.app.client.MRClientService.serviceStart(MRClientService.java:148)
> 	at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194)
> 	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.serviceStart(MRAppMaster.java:1378)
> 	at org.apache.hadoop.service.AbstractService.start(AbstractService.java:194)
> 	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster$7.run(MRAppMaster.java:1998)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:422)
> 	at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1729)
> 	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.initAndStartAppMaster(MRAppMaster.java:1994)
> 	at org.apache.hadoop.mapreduce.v2.app.MRAppMaster.main(MRAppMaster.java:1890)
> Caused by: java.net.BindException: Address already in use
> 	at sun.nio.ch.Net.bind0(Native Method)
> 	at sun.nio.ch.Net.bind(Net.java:433)
> 	at sun.nio.ch.Net.bind(Net.java:425)
> 	at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:220)
> 	at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
> 	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:342)
> 	... 17 more
> {code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org