Thanks Andries for this explanation.. Addition of DNS entries in host file
worked for me..

Regards,
*Anup Tiwari*

On Thu, Dec 1, 2016 at 9:12 PM, Andries Engelbrecht <
aengelbre...@maprtech.com> wrote:

> When using ZK connection string with either JDBC or ODBC always make sure
> that the hostnames can be resolved.
>
> See http://drill.apache.org/docs/odbc-configuration-reference/ <
> http://drill.apache.org/docs/odbc-configuration-reference/>
>
> Also make sure that hostnames can be resolved for all Drillbit nodes.
>
> A short explanation of the mechanics.
>
> - When the drillbits start up they register with ZK
> - ZK keeps the list of available drillbits that registered and HOSTNAMES
> of the nodes (not IPs) - use zkCli.sh to check the registered nodes and
> actual resolution with GET in ZK
> - When the the client uses ODBC or JDBC to connect to ZK it gets the list
> of available drillbits and chooses one drillbit to connect to by using the
> HOSTNAME
> - The client then tries to connect to the chosen drillbit using the ZK
> info (which is the hostname)
>
> If the client is unable to resolve the hostname of the drillbit that was
> chosen it will fail.
>
> Using ZK connection allows for HA in terms of new connections as well as
> balances the connection management and foreman duties for multiple
> connections by spreading it over the registered drillbits. Connecting
> directly to a drillbit is good for testing purposes, but not ideal for
> larger scale and production environments.
>
>
> --Andries
>
>
> > On Dec 1, 2016, at 5:01 AM, Anup Tiwari <anup.tiw...@games24x7.com>
> wrote:
> >
> > Hi Team,
> >
> > I am trying to connect to my drill cluster from tableau using MapR Drill
> > ODBC Driver.
> >
> > I followed steps given in
> > https://drill.apache.org/docs/using-apache-drill-with-tableau-9-server/
> and
> > subsequent links and successfully connected to individual "direct
> drillbit"
> > reading docs. But when i am trying to connect to "zookeeper quorum"
> instead
> > of "direct drillbit", i am getting below error on MapR interface :
> >
> > FAILED!
> > [MapR][Drill] (1010) Error occurred while trying to connect:
> [MapR][Drill]
> > (20) The hostname of '10.x.x.x' cannot be resolved. Please check your DNS
> > setup or connect directly to Drillbit.
> >
> > Please note that since i am giving directly IP(Drill Hosts which are on
> > AWS) so i believe i don't have to maintain DNS entries in host file.
> >
> > Also corresponding zookeeper logs are as follows :-
> >
> > 2016-12-01 18:08:42,541 [myid:3] - INFO  [NIOServerCxn.Factory:
> > 0.0.0.0/0.0.0.0:2181:NIOServerCnxnFactory@192] - Accepted socket
> connection
> > from /192.*.*.*:53159
> > 2016-12-01 18:08:42,543 [myid:3] - WARN  [NIOServerCxn.Factory:
> > 0.0.0.0/0.0.0.0:2181:ZooKeeperServer@854] - Connection request from old
> > client /192.*.*.*:53159; will be dropped if server is in r-o mode
> > 2016-12-01 18:08:42,543 [myid:3] - INFO  [NIOServerCxn.Factory:
> > 0.0.0.0/0.0.0.0:2181:ZooKeeperServer@900] - Client attempting to
> establish
> > new session at /192.*.*.*:53159
> > 2016-12-01 18:08:42,546 [myid:3] - INFO
> > [CommitProcessor:3:ZooKeeperServer@645] - Established session
> > 0x358ba2951720006 with negotiated timeout 30000 for client
> /192.*.*.*:53159
> > 2016-12-01 18:08:42,793 [myid:3] - WARN  [NIOServerCxn.Factory:
> > 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@357] - caught end of stream exception
> > EndOfStreamException: Unable to read additional data from client
> sessionid
> > 0x358ba2951720006, likely client has closed socket
> >    at
> > org.apache.zookeeper.server.NIOServerCnxn.doIO(NIOServerCnxn.java:230)
> >    at
> > org.apache.zookeeper.server.NIOServerCnxnFactory.run(
> NIOServerCnxnFactory.java:203)
> >    at java.lang.Thread.run(Thread.java:745)
> > 2016-12-01 18:08:42,794 [myid:3] - INFO  [NIOServerCxn.Factory:
> > 0.0.0.0/0.0.0.0:2181:NIOServerCnxn@1008] - Closed socket connection for
> > client /192.*.*.*:53159 which had sessionid 0x358ba2951720006
> > 2016-12-01 18:08:42,795 [myid:3] - ERROR
> > [CommitProcessor:3:NIOServerCnxn@178] - Unexpected Exception:
> > java.nio.channels.CancelledKeyException
> >    at sun.nio.ch.SelectionKeyImpl.ensureValid(SelectionKeyImpl.java:73)
> >    at sun.nio.ch.SelectionKeyImpl.interestOps(SelectionKeyImpl.java:77)
> >    at
> > org.apache.zookeeper.server.NIOServerCnxn.sendBuffer(
> NIOServerCnxn.java:151)
> >    at
> > org.apache.zookeeper.server.NIOServerCnxn.sendResponse(
> NIOServerCnxn.java:1082)
> >    at
> > org.apache.zookeeper.server.FinalRequestProcessor.processRequest(
> FinalRequestProcessor.java:404)
> >    at
> > org.apache.zookeeper.server.quorum.CommitProcessor.run(
> CommitProcessor.java:77)
> >
> >
> > I have gone through this link but this doesn't helped me :-
> > http://stackoverflow.com/questions/30940981/zookeeper-
> error-cannot-open-channel-to-x-at-election-address
> >
> > Regards,
> > *Anup Tiwari*
>
>

Reply via email to