Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-7056

Drill fails with NPE when starting in distributed mode and 31010 port is used

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.15.0
    • Fix Version/s: 1.16.0
    • Component/s: None
    • Labels:

      Description

      Steps to reproduce:
      1. Run process which uses 31010 port, for example, execute the following code:

          try (Socket localhost = new Socket("localhost", 31010)) {
            Thread.sleep(500_000);
          }
      

      2. Start Drill in distributed mode.

      As the result, Drill is not started and the following stack trace with NPE in drillbit.log:

      [Error Id: 2600a33d-c06d-4361-a39b-8f4b3d05b639 ]
              at org.apache.drill.common.exceptions.UserException$Builder.build(UserException.java:633) ~[drill-common-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.rpc.BasicServer.bind(BasicServer.java:211) ~[drill-rpc-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.service.ServiceEngine.start(ServiceEngine.java:100) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:207) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:527) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:497) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:493) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      java.net.BindException: Address already in use
              at sun.nio.ch.Net.bind0(Native Method) ~[na:1.8.0_191]
              at sun.nio.ch.Net.bind(Net.java:433) ~[na:1.8.0_191]
              at sun.nio.ch.Net.bind(Net.java:425) ~[na:1.8.0_191]
              at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) ~[na:1.8.0_191]
              at io.netty.channel.socket.nio.NioServerSocketChannel.doBind(NioServerSocketChannel.java:128) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.AbstractChannel$AbstractUnsafe.bind(AbstractChannel.java:500) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.DefaultChannelPipeline$HeadContext.bind(DefaultChannelPipeline.java:1218) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.invokeBind(AbstractChannelHandlerContext.java:495) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.AbstractChannelHandlerContext.bind(AbstractChannelHandlerContext.java:480) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.DefaultChannelPipeline.bind(DefaultChannelPipeline.java:965) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.AbstractChannel.bind(AbstractChannel.java:209) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.bootstrap.AbstractBootstrap$2.run(AbstractBootstrap.java:355) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:399) ~[netty-common-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:463) ~[netty-transport-4.0.48.Final.jar:4.0.48.Final]
              at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131) ~[netty-common-4.0.48.Final.jar:4.0.48.Final]
              at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_191]
      2019-02-25 17:58:03,888 [main] WARN  o.apache.drill.exec.server.Drillbit - Failure on close()
      java.lang.NullPointerException: null
              at org.apache.drill.exec.server.rest.WebServer.generateOptionsDescriptionJSFile(WebServer.java:480) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.rest.WebServer.getTmpJavaScriptDir(WebServer.java:138) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.rest.WebServer.close(WebServer.java:471) ~[drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.common.AutoCloseables.close(AutoCloseables.java:87) ~[drill-common-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.common.AutoCloseables.close(AutoCloseables.java:75) ~[drill-common-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.close(Drillbit.java:300) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:530) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.start(Drillbit.java:497) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
              at org.apache.drill.exec.server.Drillbit.main(Drillbit.java:493) [drill-java-exec-1.16.0-SNAPSHOT.jar:1.16.0-SNAPSHOT]
      2019-02-25 17:58:03,888 [main] INFO  o.apache.drill.exec.server.Drillbit - Shutdown completed (1064 ms).
      

      Looks like it was caused by the fix for DRILL-5735, since NPE is thrown in the code introduced by that fix.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kkhatua Kunal Khatua
                Reporter:
                volodymyr Vova Vysotskyi
                Reviewer:
                Vova Vysotskyi
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: