Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Beeline failed to connect to localhost:10500

Highlighted

Beeline failed to connect to localhost:10500

New Contributor

While following the Hive test bench tutorial, I got stuck on step 9, running the command:

beeline -i testbench.settings -u jdbc:hive2://localhost:10500/tpcds_bin_partitioned_orc_30

It gives me the following error:

Connecting to jdbc:hive2://localhost:10500/tpcds_bin_partitioned_orc_30
17/11/07 15:54:30 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10500
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10500/tpcds_bin_partitioned_orc_30: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Beeline version 1.2.1000.2.6.2.0-205 by Apache Hive
0: jdbc:hive2://localhost:10500/tpcds_bin_par (closed)>

@jsensharma

How do I resolve this and connect to Hive with beeline?

Thank you!

5 REPLIES 5
Highlighted

Re: Beeline failed to connect to localhost:10500

Super Mentor

@Tony Zhang

Can you please check if the port is opened?

# netstat -tnlpa | grep 10500

.

Highlighted

Re: Beeline failed to connect to localhost:10500

Super Mentor

@Tony Zhang

Also can you please check if the Hive Interactive (LLAP) is enabled.

Ambari UI --> Hive --> Configs --> Enable "Interactive Query"

42494-hive-llap.png

.

.

https://hortonworks.com/tutorial/interactive-sql-on-hadoop-with-hive-llap/


Highlighted

Re: Beeline failed to connect to localhost:10500

New Contributor

@Jay Kumar SenSharma

When I ran it with the option p, it gives the output:

(No info could be read for "-p": geteuid()=1011 but you should be root.)

However, when I ran:

 netstat -tnla | grep 10500

It shows no output.

Thank you!

Highlighted

Re: Beeline failed to connect to localhost:10500

New Contributor
@Jay Kumar SenSharma

I checked LLAP, and it's disabled!

Is that the reason for failed connection? Thanks!

Re: Beeline failed to connect to localhost:10500

@Tony Zhang

10500 is the default port (unsecure) for interactive query (LLAP). If you don't use LLAP then your port should be 10000, but it is even better to use Zookeeper ServiceDiscovery

beeline -i testbench.settings jdbc:hive2://localhost:2181/tpcds_bin_partitioned_orc_30;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2

You may have to check on ZK port 2181 to be open.

Don't have an account?
Coming from Hortonworks? Activate your account here