[ https://issues.apache.org/jira/browse/DRILL-6912?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16724639#comment-16724639 ]
Boaz Ben-Zvi commented on DRILL-6912: ------------------------------------- [~amansinha100] - the difference is the environment variable *DRILL_EMBEDDED* : {code:java} ~/test/apache-drill-1.15.0/bin 99 > ./sqlline -u jdbc:drill:zk=local -n admin --maxWidth=100000 java.lang.NullPointerException Apache Drill 1.15.0-SNAPSHOT "Let's Drill something more solid than concrete." sqlline> !q ~/test/apache-drill-1.15.0/bin 100 > export DRILL_EMBEDDED=1 ~/test/apache-drill-1.15.0/bin 101 > ./sqlline -u jdbc:drill:zk=local -n admin --maxWidth=100000 Picked up JAVA_TOOL_OPTIONS: -ea ERROR: transport error 202: bind failed: Address already in use ERROR: JDWP Transport dt_socket failed to initialize, TRANSPORT_INIT(510) JDWP exit error AGENT_ERROR_TRANSPORT_INIT(197): No transports initialized [debugInit.c:750] ~/test/apache-drill-1.15.0/bin 102 >{code} > 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)