[ 
https://issues.apache.org/jira/browse/DRILL-6912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16724694#comment-16724694
 ] 

Volodymyr Vysotskyi commented on DRILL-6912:
--------------------------------------------

I still think that the problem is in the code part I have pointed in my 
comment. In the case when we starting drill in distribution mode, NPE is also 
present in {{drillbit.log}}, but for this case workaround with *DRILL_EMBEDDED* 
is not acceptable.

> NPE when other drillbit is already running
> ------------------------------------------
>
>                 Key: DRILL-6912
>                 URL: https://issues.apache.org/jira/browse/DRILL-6912
>             Project: Apache Drill
>          Issue Type: Bug
>    Affects Versions: 1.15.0
>            Reporter: Vitalii Diravka
>            Assignee: Boaz Ben-Zvi
>            Priority: Critical
>
> If user tries to run the second drillbit process, the following output will 
> be obtained:
> {code:java}
> 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
> {code}
> For 1.14.0 drill version the output was correct (but too long):
> {code:java}
> ./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{code}
> Looks like it is fine to have a short message in console about the reason of 
> error, similar to:
> {code:java}
> java.sql.SQLException: Failure in starting embedded Drillbit: 
> java.net.BindException: Address already in use
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to