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

NPE when another drillbit is already running

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • 1.15.0
    • 1.15.0
    • None

    Description

      If user tries to run the second drillbit process, the following output will be obtained:

      vitalii@vitalii-pc:/tmp/apache-drill-1.15.0$ bin/drill-embedded 
      java.lang.NullPointerException
      Apache Drill 1.15.0
      "This isn't your grandfather's SQL."
      sqlline> select * from (values(1));
      No current connection
      sqlline> !q
      

      For 1.14.0 drill version the output was correct (but too long):

      ./bin/drill-embedded 
      Dec 18, 2018 7:58:47 PM org.glassfish.jersey.server.ApplicationHandler initialize
      INFO: Initiating Jersey application, version Jersey: 2.8 2014-04-29 01:25:26...
      Error: Failure in starting embedded Drillbit: java.net.BindException: Address already in use (state=,code=0)
      java.sql.SQLException: Failure in starting embedded Drillbit: java.net.BindException: Address already in use
       at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:143)
       at org.apache.drill.jdbc.impl.DrillJdbc41Factory.newDrillConnection(DrillJdbc41Factory.java:72)
       at org.apache.drill.jdbc.impl.DrillFactory.newConnection(DrillFactory.java:68)
       at org.apache.calcite.avatica.UnregisteredDriver.connect(UnregisteredDriver.java:138)
       at org.apache.drill.jdbc.Driver.connect(Driver.java:72)
       at sqlline.DatabaseConnection.connect(DatabaseConnection.java:167)
       at sqlline.DatabaseConnection.getConnection(DatabaseConnection.java:213)
       at sqlline.Commands.connect(Commands.java:1083)
       at sqlline.Commands.connect(Commands.java:1015)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
       at java.lang.reflect.Method.invoke(Method.java:498)
       at sqlline.ReflectiveCommandHandler.execute(ReflectiveCommandHandler.java:36)
       at sqlline.SqlLine.dispatch(SqlLine.java:742)
       at sqlline.SqlLine.initArgs(SqlLine.java:528)
       at sqlline.SqlLine.begin(SqlLine.java:596)
       at sqlline.SqlLine.start(SqlLine.java:375)
       at sqlline.SqlLine.main(SqlLine.java:268)
      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:223)
       at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
       at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:279)
       at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
       at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:218)
       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
       at org.eclipse.jetty.server.Server.doStart(Server.java:337)
       at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
       at org.apache.drill.exec.server.rest.WebServer.start(WebServer.java:155)
       at org.apache.drill.exec.server.Drillbit.run(Drillbit.java:200)
       at org.apache.drill.jdbc.impl.DrillConnectionImpl.<init>(DrillConnectionImpl.java:134)
       ... 18 more
      apache drill 1.14.0 
      "just drill it"
      0: jdbc:drill:zk=local> !q

      Looks like it is fine to have a short message in console about the reason of error, similar to:

      java.sql.SQLException: Failure in starting embedded Drillbit: java.net.BindException: Address already in use
      

      Attachments

        Issue Links

          Activity

            People

              ihuzenko Igor Guzenko
              vitalii Vitalii Diravka
              Vova Vysotskyi Vova Vysotskyi
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: