Cannot connect to beeline hive2
<p><strong>Hadoop 2.7.3 &amp; Hive 2.1.0</strong></p>

<p><strong>I am able to connect to beeline like this</strong></p>

<p><strong>!connect jdbc:hive2://</strong></p>

<p>But when i type</p>

<p>!connect jdbc:hive2://hostname:10000/default org.apache.hive.jdbc.HiveDriver
or !connect jdbc:hive2://hostname:10000/default</p>

<p>After giving the username and password
it gives me an error</p>

<p><strong>Error: Could not open connection to jdbc:hive2://:10000: java.net.ConnectException: Connection refused (state=08S01,code=0)</strong></p>

<p>In CLI:</p>

<pre><code>which: no hbase in (/user/local/maven/bin:/user/local/maven/bin:/user/local/maven/bin:/user/local/maven/bin:/user/local/maven/bin:/usr/local/rvm/gems/ruby-2.1.2/bin:/usr/local/rvm/gems/ruby-2.1.2@global/bin:/usr/local/rvm/rubies/ruby-2.1.2/bin:/usr/lib64/qt-3.3/bin:/user/local/maven/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/rvm/bin:/usr/local/hive/bin:/usr/bin:/usr/local/bin:/bin:/root/bin:/usr/java/jdk1.7.0_60/bin:/usr/local/hadoop/bin/:/usr/local/hadoop/bin:/usr/local/hadoop/sbin:/usr/bin:/usr/local/bin:/usr/java/jdk1.7.0_60/bin:/usr/java/jdk1.7.0_60/bin:/usr/local/hadoop/bin/:/usr/local/hadoop/bin:/usr/local/hadoop/sbin:/usr/bin:/usr/local/bin:/usr/java/jdk1.7.0_60/bin:/usr/java/jdk1.7.0_60/bin:/usr/local/hadoop/bin/:/usr/local/hadoop/bin:/usr/local/hadoop/sbin)
ls: cannot access /usr/local/hive/lib/hive-jdbc-*-standalone.jar: No such file or directory
Beeline version 2.1.0 by Apache Hive
beeline&gt; !connect jdbc:hive2://10.1.1.60:10000/;transportMode=binary
Connecting to jdbc:hive2://10.1.1.60:1000/;transportMode=binary
Enter username for jdbc:hive2://10.1.1.60:10000/;transportMode=binary: APP
Enter password for jdbc:hive2://10.1.1.60:10000/;transportMode=binary: ****
16/10/25 18:07:11 [main]: WARN jdbc.HiveConnection: Failed to connect to 10.1.1.60:10000
Error: Could not open client transport with JDBC Uri: jdbc:hive2://10.1.1.60:1000/;transportMode=binary: java.net.ConnectException: Connection refused (state=08S01,code=0)
beeline&gt; 
</code></pre>

<p><strong>Any suggestions??</strong></p>

<p>The Properties in hive-site.xml i have set for hive 2 are:-</p>

<pre><code>    &lt;?xml version="1.0"?&gt;
    &lt;configuration&gt;
    &lt;property&gt;
    &lt;name&gt;javax.jdo.option.ConnectionURL&lt;/name&gt;
    &lt;value&gt;jdbc:derby:;databaseName=/usr/local/hive/metastore_db;create=true&lt;/value&gt;
    &lt;description&gt;JDBC connect string for a JDBC metastore&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;org.apache.derby.jdbc.EmbeddedDriver&lt;/name&gt;
    &lt;value&gt;org.apache.derby.jdbc.ClientDriver&lt;/value&gt;
    &lt;description&gt;Driver class name for a JDBC metastore&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.min.worker.threads&lt;/name&gt;
    &lt;value&gt;5&lt;/value&gt;
    &lt;description&gt;Minimum number of worker threads&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.max.worker.threads&lt;/name&gt;
    &lt;value&gt;500&lt;/value&gt;
    &lt;description&gt;Maximum number of worker threads&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.port&lt;/name&gt;
    &lt;value&gt;10000&lt;/value&gt;
    &lt;description&gt;TCP port number to listen on&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.bind.host&lt;/name&gt;
    &lt;value&gt;hadoop-master&lt;/value&gt;
    &lt;description&gt;TCP interface to bind to&lt;/description&gt;
    &lt;/property&gt;


    &lt;property&gt;
    &lt;name&gt;hive.server2.transport.mode&lt;/name&gt;
    &lt;value&gt;binary&lt;/value&gt;
    &lt;description&gt;Set to http to enable HTTP transport mode&lt;/description&gt;
    &lt;/property&gt;


    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.http.port&lt;/name&gt;
    &lt;value&gt;10001&lt;/value&gt;
    &lt;description&gt;HTTP port number to listen on&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.http.max.worker.threads&lt;/name&gt;
    &lt;value&gt;500&lt;/value&gt;
    &lt;description&gt;TCP interface to bind to&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.http.min.worker.threads&lt;/name&gt;
    &lt;value&gt;5&lt;/value&gt;
    &lt;description&gt;Minimum worker threads in the server pool&lt;/description&gt;
    &lt;/property&gt;

    &lt;property&gt;
     &lt;name&gt;hive.server2.authentication&lt;/name&gt;
     &lt;value&gt;NOSASL&lt;/value&gt;
    &lt;/property&gt;

    &lt;property&gt;
    &lt;name&gt;hive.server2.thrift.http.path&lt;/name&gt;
    &lt;value&gt;cliservice&lt;/value&gt;
    &lt;description&gt;The service endpoint&lt;/description&gt;
    &lt;/property&gt;


    &lt;/configuration&gt;
</code></pre>

<p>Any suggestions?</p>