You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Dongjoon Hyun (JIRA)" <ji...@apache.org> on 2015/11/05 12:25:27 UTC

[jira] [Updated] (REEF-446) When a port can't be bound, NettyMessagingTransport runs into NullPointerException

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

Dongjoon Hyun updated REEF-446:
-------------------------------
    Assignee: Sergey Dudoladov

> When a port can't be bound, NettyMessagingTransport runs into NullPointerException
> ----------------------------------------------------------------------------------
>
>                 Key: REEF-446
>                 URL: https://issues.apache.org/jira/browse/REEF-446
>             Project: REEF
>          Issue Type: Bug
>          Components: Wake
>            Reporter: Brian Cho
>            Assignee: Sergey Dudoladov
>
> I've run into a situation where my machine can't find a port with the default TcpPortProvider. Why it can't find a port after 1000 random tries is still beyond me. However, I do think I found a bug.
> Basically, NettyMessagingTransport finishes its constructor even when the port is bound, because of the following:
> {code}
>         if (!ports.hasNext()) {
>           break;
>         }
> {code}
> Then, I run into a NullPointerException later on close, because the acceptor field is null.
> {noformat}
> java.lang.NullPointerException
> 	at org.apache.reef.wake.remote.transport.netty.NettyMessagingTransport.close(NettyMessagingTransport.java:213)
> 	at org.apache.reef.wake.remote.impl.DefaultRemoteManagerImplementation$1.run(DefaultRemoteManagerImplementation.java:221)
> 	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:745)
> {noformat}
> Should we just raise a RuntimeException if a port can't be found? Or, is there any way to "recover" from this?



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)