<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Cannot connect to Hive thru JDBC: Connection refused in Archives of Support Questions (Read Only)</title>
    <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33102#M8992</link>
    <description>&lt;P&gt;I've followed the Getting Started Guide, everything OK, and now I need to connect to Hive cluster via JDBC.&lt;BR /&gt;I have the following configuration:&lt;BR /&gt;Manager Node (cloudera1) 52.6.221.164&lt;BR /&gt;Worker Node 1 (cloudera2) 52.22.58.113&lt;BR /&gt;Worker Node 2 (cloudera3) 54.175.19.19&lt;BR /&gt;Worker Node 3 (cloudera4) 54.175.18.49&lt;BR /&gt;I have the following connection string:&lt;BR /&gt;jdbc:hive://52.22.58.113:10000/default;user=my_user;password=my_psw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to establish a connection, the following exception is thrown by the driver:&lt;/P&gt;&lt;P&gt;[Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: java.net.ConnectException: Connection refused: connect.&lt;BR /&gt;&lt;BR /&gt;What's the right pair IP address - TCP port that I should use to connect?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;cghersi&lt;/P&gt;</description>
    <pubDate>Fri, 16 Sep 2022 09:44:45 GMT</pubDate>
    <dc:creator>cghersi</dc:creator>
    <dc:date>2022-09-16T09:44:45Z</dc:date>
    <item>
      <title>Cannot connect to Hive thru JDBC: Connection refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33102#M8992</link>
      <description>&lt;P&gt;I've followed the Getting Started Guide, everything OK, and now I need to connect to Hive cluster via JDBC.&lt;BR /&gt;I have the following configuration:&lt;BR /&gt;Manager Node (cloudera1) 52.6.221.164&lt;BR /&gt;Worker Node 1 (cloudera2) 52.22.58.113&lt;BR /&gt;Worker Node 2 (cloudera3) 54.175.19.19&lt;BR /&gt;Worker Node 3 (cloudera4) 54.175.18.49&lt;BR /&gt;I have the following connection string:&lt;BR /&gt;jdbc:hive://52.22.58.113:10000/default;user=my_user;password=my_psw&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When trying to establish a connection, the following exception is thrown by the driver:&lt;/P&gt;&lt;P&gt;[Cloudera][HiveJDBCDriver](500164) Error initialized or created transport for authentication: java.net.ConnectException: Connection refused: connect.&lt;BR /&gt;&lt;BR /&gt;What's the right pair IP address - TCP port that I should use to connect?&lt;BR /&gt;&lt;BR /&gt;Thank you&lt;BR /&gt;cghersi&lt;/P&gt;</description>
      <pubDate>Fri, 16 Sep 2022 09:44:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33102#M8992</guid>
      <dc:creator>cghersi</dc:creator>
      <dc:date>2022-09-16T09:44:45Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Hive thru JDBC: Connection refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33107#M8993</link>
      <description>&lt;P&gt;Reposting as it looks like my reply via email was made into a new thread:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're connecting to Impala, use the IP address of one of the Worker&lt;BR /&gt;Nodes, and use this query string:&lt;BR /&gt;&lt;BR /&gt;jdbc:hive2://**:21050/;auth=noSasl&lt;BR /&gt;&lt;BR /&gt;If you're connecting to Hive, then use the IP address of the Manager Node&lt;BR /&gt;and port 10000.&lt;BR /&gt;&lt;BR /&gt;Because there isn't anything about the authentication for these services&lt;BR /&gt;that is configured beyond the default, these ports are blocked from&lt;BR /&gt;machines outside the cluster. If you want to connect from outside the&lt;BR /&gt;cluster, you will need to look up the Network ACL for your CloudFormation&lt;BR /&gt;stack, and edit that Network ACL to allow access on the ports you're using.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 17:38:21 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33107#M8993</guid>
      <dc:creator>Sean</dc:creator>
      <dc:date>2015-10-19T17:38:21Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Hive thru JDBC: Connection refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33109#M8994</link>
      <description>&lt;P&gt;Hi Sean,&lt;/P&gt;&lt;P&gt;thank you for your reply.&lt;/P&gt;&lt;P&gt;I tried to connect to the manager, unfortunately in this case the program get stuck in the DriverManager.getConnection() method.&lt;/P&gt;&lt;P&gt;I triple-checked the ACL rules and the TCP port 10000 is allowed, as well as 21050 of Impala. for Impala everything works, for Hive it doesn't.&lt;/P&gt;&lt;P&gt;Any other idea?&lt;/P&gt;&lt;P&gt;If you want you can contact me at cristiano.ghersi _at_ plat.one&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;P&gt;cghersi&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 18:13:04 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33109#M8994</guid>
      <dc:creator>cghersi</dc:creator>
      <dc:date>2015-10-19T18:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Hive thru JDBC: Connection refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33128#M8995</link>
      <description>&lt;P&gt;The JDBC string might be a bit different for Hive Server 2, actually. This is what used to be used when Beeline (CLI JDBC client) was used instead of Hue for some steps in the tutorial:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;beeline -u jdbc:hive2://[Manager Node IP Address]:10000/default -n admin -d org.apache.hive.jdbc.HiveDriver&lt;/PRE&gt;&lt;P&gt;The `-n admin` may not be correct to use in this case, but perhaps /default is what's required for your JDBC connection string?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 19 Oct 2015 22:11:11 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33128#M8995</guid>
      <dc:creator>Sean</dc:creator>
      <dc:date>2015-10-19T22:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot connect to Hive thru JDBC: Connection refused</title>
      <link>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33158#M8996</link>
      <description>&lt;P&gt;Hi Sean.&lt;/P&gt;&lt;P&gt;Finally the connection has been successful with the hive2 driver.&lt;/P&gt;&lt;P&gt;Thank you so much!&lt;/P&gt;&lt;P&gt;cghersi&lt;/P&gt;</description>
      <pubDate>Tue, 20 Oct 2015 13:38:07 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Archives-of-Support-Questions/Cannot-connect-to-Hive-thru-JDBC-Connection-refused/m-p/33158#M8996</guid>
      <dc:creator>cghersi</dc:creator>
      <dc:date>2015-10-20T13:38:07Z</dc:date>
    </item>
  </channel>
</rss>

