Try this URL jdbc:drill:zk=172.32.63.64:2181/drill/sidra-drillbit
<http://172.32.63.64:2181/opt/apache-drill/sidra-drillbit>

It is expecting znode path in zookeeper used by Drill.

Thanks,

Arjun

On Wed, Jan 9, 2019, 12:13 AM Tushar Pathare <tpath...@sidra.org wrote:

> Hello Team,
> Same issue.
>
>
> ERROR: An error occurred while trying to make a connection to
> the database:
>
> JDBC URL:
> jdbc:drill:zk=172.32.63.64:2181/opt/apache-drill/sidra-drillbit
>
> Failure in creating DrillConnectionImpl:
> java.lang.IllegalStateException: No active Drillbit endpoint
> found from ZooKeeper. Check connection parameters?
>
>
> Tushar Bhalchandra Pathare
> Bigdata,GPFS,CSXF – Research Department
> t. +974 4003 7443
> m. +974 74793547
> PO BOX 26999 Doha, Qatar
> sidra.org <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=ahdl771nVvakDoiIMxP3CwNThb1gfs0C1FnbsHe5MoI&e=
> >
>
>
> On 1/9/19, 11:02 AM, "Arjun kr" <arjun...@outlook.com> wrote:
>
>     Yes. I believe its a necessary parameter if non default cluster I'd is
> used and given in the connection url. You can check if it works with
> directory specified.
>
>     Get Outlook for Android<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__aka.ms_ghei36&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=sAuQzJT3xlBvr0R3la2Lx8ou1y9ua1oECbvGmEn1IGc&e=
> >
>
>     ________________________________
>     From: Tushar Pathare <tpath...@sidra.org>
>     Sent: Tuesday, January 8, 2019 11:40:22 PM
>     To: user@drill.apache.org
>     Subject: Re: Drill connection using jdbc
>
>     Is it necessary because I thought it is optional including the cluster
> ID
>
>
>     Tushar Bhalchandra Pathare
>     Bigdata,GPFS,CSXF – Research Department
>     t. +974 4003 7443
>     m. +974 74793547
>     PO BOX 26999 Doha, Qatar
>     sidra.org <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=ahdl771nVvakDoiIMxP3CwNThb1gfs0C1FnbsHe5MoI&e=
> >
>
>
>     On 1/9/19, 10:39 AM, "Arjun kr" <arjun...@outlook.com> wrote:
>
>         Are you missing drill zk directory in connection url?
>         By default, it's value is drill.
>
>         jdbc:drill:zk=<zk name>[:<port>][,<zk name2>[:<port>]...
>         <directory>/<cluster ID>;[schema=<storage plugin>]
>
>
>
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2D&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=Gl1RnwVHObkF6idCyKaf7qJgDWUvOWUbaMmKK_G6r_s&e=
> <
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=g41X-zx9wRcnMql53jhfYV9kI47XWBhqNWD5BWazeBc&e=
> >jdbc<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=g41X-zx9wRcnMql53jhfYV9kI47XWBhqNWD5BWazeBc&e=
> >-driver/<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__drill.apache.org_docs_using-2Dthe-2Djdbc-2Ddriver_&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=g41X-zx9wRcnMql53jhfYV9kI47XWBhqNWD5BWazeBc&e=
> >
>
>         Thanks,
>
>         Arjun
>
>         Get Outlook for Android<
> https://urldefense.proofpoint.com/v2/url?u=https-3A__aka.ms_ghei36&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=sAuQzJT3xlBvr0R3la2Lx8ou1y9ua1oECbvGmEn1IGc&e=
> >
>
>         ________________________________
>         From: Khurram Faraaz <kfar...@mapr.com>
>         Sent: Tuesday, January 8, 2019 11:17:58 PM
>         To: user@drill.apache.org
>         Subject: Re: Drill connection using jdbc
>
>         Hi Tushar,
>
>         This example works just fine for me, you may want to use the
> template
>
>         import org.apache.log4j.Logger;
>
>         import java.sql.Connection;
>         import java.sql.ResultSet;
>         import java.sql.SQLException;
>         import java.sql.Statement;
>         import java.sql.Types;
>         import java.sql.*;
>         import java.io.*;
>         import java.lang.*;
>         import java.util.*;
>         import java.util.Scanner;
>
>         public class TestQuery {
>
>         public static void main(String s[]) throws Exception {
>
>             Connection conn = null;
>             PreparedStatement prdstmnt = null;
>             try {
>                     // Please replace test1302-145 with your hostname,
> name of host
>         where Drillbit is up and running
>                     final String URL_STRING =
>         "jdbc:drill:schema=dfs.tmp;drillbit=test1302-145";
>
> Class.forName("org.apache.drill.jdbc.Driver").newInstance();
>
>                     // Please replace username and password with your
> username and
>         password
>                     conn =
> DriverManager.getConnection(URL_STRING,"mapr","mapr");
>                     prdstmnt = conn.prepareStatement("SELECT * FROM
>         cp.`employee.json`");
>                     prdstmnt.executeQuery();
>                     prdstmnt.close();
>             } catch (Exception e) {
>                System.out.println(e.getMessage());
>                e.printStackTrace();
>             } finally {
>                 if(conn != null)
>                     try { conn.close(); } catch(SQLException sqlexcpn){
>         sqlexcpn.printStackTrace(); }
>                 if(prdstmnt != null)
>                     try { prdstmnt.close(); } catch(SQLException sqlexcpn){
>         sqlexcpn.printStackTrace(); }
>                 }
>             }
>         }
>
>         Regards,
>         Khurram
>
>         On Tue, Jan 8, 2019 at 11:10 PM Tushar Pathare <tpath...@sidra.org>
> wrote:
>
>         > Hello Team,
>         >
>         >                     We have installed drill 1.12.0 and trying to
> connect
>         > using a client to the drill cluster
>         >
>         > Our config for connection is
>         >
>         >
>         >
>         > Drill class is : org.apache.drill.jdbc.Driver
>         >
>         > Driver location is
>         >
> /Users/tpathare/Downloads/apache-drill-1.12.0/jars/jdbc-driver/drill-jdbc-all-1.12.0.jar
>         >
>         > Jdbc url is : jdbc:drill:zk=172.32.63.64:2181,172.32.63.65:2181,
>         > 172.32.63.67:2181
>         >
>         >
>         >
>         > When I hit connect I see the following error.Though the cluster
> is up and
>         > running and ZK is also good.
>         >
>         >
>         >
>         > *ERROR: An error occurred while trying to make a connection to *
>         >
>         > *the database:  *
>         >
>         >
>         >
>         > *JDBC URL: *
>         >
>         > *jdbc:drill:zk=172.32.63.64:2181
>         > <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__172.32.63.64-3A2181&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=84dG2j74hfJ7kXZnSmKvXHwRvLXJGwNiPr7m2SZNzo0&e=
> >,172.32.63.65:2181
>         > <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__172.32.63.65-3A2181&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=i7mXBx8Y16mFww13E6aPiRvjzdtI4U9BLysco9CykxI&e=
> >,172.32.63.67:2181/sidra-drillbit
>         > <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__172.32.63.67-3A2181_sidra-2Ddrillbit&d=DwIGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=G5PLuEcQc-XMZcqmyuPQrA&m=oxHW4S7DFVwVvsZaHH0XgZnhhmGkh8Gaj5N91x0ZNNU&s=qA6mpFoPByc8Viz9MXjjcA9-_CH5xxQw-DS36WTcq1E&e=>
> *
>         >
>         >
>         >
>         > *Failure in connecting to Drill: *
>         >
>         > *oadd.org.apache.drill.exec.rpc.RpcException: Failure setting up
> *
>         >
>         > *ZK for client.*
>         >
>         >
>         >
>         >
>         >
>         >
>         >
>         > [image: cid:image001.png@01D3B9E9.23323D90]
>         >
>         > *Tushar Bhalchandra Pathare*
>         >
>         > Bigdata,GPFS,CSXF – Research Department
>         >
>         > *t. *+974 4003 7443
>         >
>         > *m.* +974 74793547
>         >
>         > PO BOX 26999 Doha, Qatar
>         >
>         > sidra.org
>         > <
> https://urldefense.proofpoint.com/v2/url?u=http-3A__www.sidra.org_&d=DwMGaQ&c=cskdkSMqhcnjZxdQVpwTXg&r=H5JEl9vb-mBIjic10QAbDD2vkUUKAxjO6wZO322RtdI&m=xCohfm7_vub0ExT6cMTEbB4WbjdIEPLdaXqXAOANq4A&s=kqudpk5v3cRasIbaMG8kwLBXafZ87VEhutJj7vxwhS4&e=
> >
>         >
>         >
>         > Disclaimer: This email and its attachments may be confidential
> and are
>         > intended solely for the use of the individual to whom it is
> addressed. If
>         > you are not the intended recipient, any reading, printing,
> storage,
>         > disclosure, copying or any other action taken in respect of this
> e-mail is
>         > prohibited and may be unlawful. If you are not the intended
> recipient,
>         > please notify the sender immediately by using the reply function
> and then
>         > permanently delete what you have received. Any views or opinions
> expressed
>         > are solely those of the author and do not necessarily represent
> those of
>         > Sidra Medical and Research Center.
>         >
>
>
>     Disclaimer: This email and its attachments may be confidential and are
> intended solely for the use of the individual to whom it is addressed. If
> you are not the intended recipient, any reading, printing, storage,
> disclosure, copying or any other action taken in respect of this e-mail is
> prohibited and may be unlawful. If you are not the intended recipient,
> please notify the sender immediately by using the reply function and then
> permanently delete what you have received. Any views or opinions expressed
> are solely those of the author and do not necessarily represent those of
> Sidra Medical and Research Center.
>
>
> Disclaimer: This email and its attachments may be confidential and are
> intended solely for the use of the individual to whom it is addressed. If
> you are not the intended recipient, any reading, printing, storage,
> disclosure, copying or any other action taken in respect of this e-mail is
> prohibited and may be unlawful. If you are not the intended recipient,
> please notify the sender immediately by using the reply function and then
> permanently delete what you have received. Any views or opinions expressed
> are solely those of the author and do not necessarily represent those of
> Sidra Medical and Research Center.
>

Reply via email to