You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Bitfox <bi...@bitfox.top> on 2022/02/23 02:16:34 UTC

help with beeline connection to hive

Hello

I have hive 2.3.9 installed by default on localhost for testing.
HDFS is also installed on localhost, which works correctly b/c I have
already used the file storage feature.

I didn't change any configure files for hive.

I can login into hive shell:

hive> show databases;

OK

default

Time taken: 4.458 seconds, Fetched: 1 row(s)



After started hiveserver2 which works online, I can't connect via beeline:


beeline> !connect jdbc:hive2://localhost:10000/default

Connecting to jdbc:hive2://localhost:10000/default

Enter username for jdbc:hive2://localhost:10000/default: APP

Enter password for jdbc:hive2://localhost:10000/default: ****

22/02/23 10:11:41 [main]: WARN jdbc.HiveConnection: Failed to connect to
localhost:10000

Could not open connection to the HS2 server. Please check the server URI
and if the URI is correct, then ask the administrator to check the server
status.

Error: Could not open client transport with JDBC Uri:
jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection
refused (Connection refused) (state=08S01,code=0)



It prompts me to input username and password.

I have tried both empty user/pass, and user "APP"/pass "mine".

Neither of them will work.



How can I fix this and connect to Hive correctly via beeline?


Sorry I am the newbie to Hive.


Thanks a lot.

Re: help with beeline connection to hive

Posted by Bitfox <bi...@bitfox.top>.
I resolved the issue by this way
https://github.com/chuqbach/Big-Data-Installation/issues/2

Thanks for your help.

Regards


On Wed, Feb 23, 2022 at 5:49 PM Mich Talebzadeh <mi...@gmail.com>
wrote:

> and check that beeline thrift server is indeed running (mine runs on port
> 10099)
>
> netstat -plten|grep 10099
> tcp        0      0 0.0.0.0:10099           0.0.0.0:*
>  LISTEN      1
>
>
>
>    view my Linkedin profile
> <https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/>
>
>
>  https://en.everybodywiki.com/Mich_Talebzadeh
>
>
>
> *Disclaimer:* Use it at your own risk. Any and all responsibility for any
> loss, damage or destruction of data or any other property which may arise
> from relying on this email's technical content is explicitly disclaimed.
> The author will in no case be liable for any monetary damages arising from
> such loss, damage or destruction.
>
>
>
>
> On Wed, 23 Feb 2022 at 09:42, Mich Talebzadeh <mi...@gmail.com>
> wrote:
>
>> beeline -u jdbc:hive2://localhost:10000/default
>> org.apache.hive.jdbc.HiveDriver -n <the user name on unix host where hive
>> is running> -p <password for unix user>
>>
>>
>>
>>    view my Linkedin profile
>> <https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/>
>>
>>
>>  https://en.everybodywiki.com/Mich_Talebzadeh
>>
>>
>>
>> *Disclaimer:* Use it at your own risk. Any and all responsibility for
>> any loss, damage or destruction of data or any other property which may
>> arise from relying on this email's technical content is explicitly
>> disclaimed. The author will in no case be liable for any monetary damages
>> arising from such loss, damage or destruction.
>>
>>
>>
>>
>> On Wed, 23 Feb 2022 at 09:35, Aaron Grubb <aa...@kaden.ai> wrote:
>>
>>> Try username "root" and empty password. That works for me on 3.1.2.
>>>
>>> On Wed, 2022-02-23 at 10:16 +0800, Bitfox wrote:
>>>
>>> Hello
>>>
>>> I have hive 2.3.9 installed by default on localhost for testing.
>>> HDFS is also installed on localhost, which works correctly b/c I have
>>> already used the file storage feature.
>>>
>>> I didn't change any configure files for hive.
>>>
>>> I can login into hive shell:
>>>
>>> hive> show databases;
>>>
>>> OK
>>>
>>> default
>>>
>>> Time taken: 4.458 seconds, Fetched: 1 row(s)
>>>
>>>
>>>
>>> After started hiveserver2 which works online, I can't connect via
>>> beeline:
>>>
>>>
>>> beeline> !connect jdbc:hive2://localhost:10000/default
>>>
>>> Connecting to jdbc:hive2://localhost:10000/default
>>>
>>> Enter username for jdbc:hive2://localhost:10000/default: APP
>>>
>>> Enter password for jdbc:hive2://localhost:10000/default: ****
>>>
>>> 22/02/23 10:11:41 [main]: WARN jdbc.HiveConnection: Failed to connect to
>>> localhost:10000
>>>
>>> Could not open connection to the HS2 server. Please check the server URI
>>> and if the URI is correct, then ask the administrator to check the server
>>> status.
>>>
>>> Error: Could not open client transport with JDBC Uri:
>>> jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection
>>> refused (Connection refused) (state=08S01,code=0)
>>>
>>>
>>>
>>> It prompts me to input username and password.
>>>
>>> I have tried both empty user/pass, and user "APP"/pass "mine".
>>>
>>> Neither of them will work.
>>>
>>>
>>>
>>> How can I fix this and connect to Hive correctly via beeline?
>>>
>>>
>>> Sorry I am the newbie to Hive.
>>>
>>>
>>> Thanks a lot.
>>>
>>>
>>>

Re: help with beeline connection to hive

Posted by Mich Talebzadeh <mi...@gmail.com>.
and check that beeline thrift server is indeed running (mine runs on port
10099)

netstat -plten|grep 10099
tcp        0      0 0.0.0.0:10099           0.0.0.0:*               LISTEN
    1



   view my Linkedin profile
<https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/>


 https://en.everybodywiki.com/Mich_Talebzadeh



*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.




On Wed, 23 Feb 2022 at 09:42, Mich Talebzadeh <mi...@gmail.com>
wrote:

> beeline -u jdbc:hive2://localhost:10000/default
> org.apache.hive.jdbc.HiveDriver -n <the user name on unix host where hive
> is running> -p <password for unix user>
>
>
>
>    view my Linkedin profile
> <https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/>
>
>
>  https://en.everybodywiki.com/Mich_Talebzadeh
>
>
>
> *Disclaimer:* Use it at your own risk. Any and all responsibility for any
> loss, damage or destruction of data or any other property which may arise
> from relying on this email's technical content is explicitly disclaimed.
> The author will in no case be liable for any monetary damages arising from
> such loss, damage or destruction.
>
>
>
>
> On Wed, 23 Feb 2022 at 09:35, Aaron Grubb <aa...@kaden.ai> wrote:
>
>> Try username "root" and empty password. That works for me on 3.1.2.
>>
>> On Wed, 2022-02-23 at 10:16 +0800, Bitfox wrote:
>>
>> Hello
>>
>> I have hive 2.3.9 installed by default on localhost for testing.
>> HDFS is also installed on localhost, which works correctly b/c I have
>> already used the file storage feature.
>>
>> I didn't change any configure files for hive.
>>
>> I can login into hive shell:
>>
>> hive> show databases;
>>
>> OK
>>
>> default
>>
>> Time taken: 4.458 seconds, Fetched: 1 row(s)
>>
>>
>>
>> After started hiveserver2 which works online, I can't connect via beeline:
>>
>>
>> beeline> !connect jdbc:hive2://localhost:10000/default
>>
>> Connecting to jdbc:hive2://localhost:10000/default
>>
>> Enter username for jdbc:hive2://localhost:10000/default: APP
>>
>> Enter password for jdbc:hive2://localhost:10000/default: ****
>>
>> 22/02/23 10:11:41 [main]: WARN jdbc.HiveConnection: Failed to connect to
>> localhost:10000
>>
>> Could not open connection to the HS2 server. Please check the server URI
>> and if the URI is correct, then ask the administrator to check the server
>> status.
>>
>> Error: Could not open client transport with JDBC Uri:
>> jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection
>> refused (Connection refused) (state=08S01,code=0)
>>
>>
>>
>> It prompts me to input username and password.
>>
>> I have tried both empty user/pass, and user "APP"/pass "mine".
>>
>> Neither of them will work.
>>
>>
>>
>> How can I fix this and connect to Hive correctly via beeline?
>>
>>
>> Sorry I am the newbie to Hive.
>>
>>
>> Thanks a lot.
>>
>>
>>

Re: help with beeline connection to hive

Posted by Mich Talebzadeh <mi...@gmail.com>.
beeline -u jdbc:hive2://localhost:10000/default
org.apache.hive.jdbc.HiveDriver -n <the user name on unix host where hive
is running> -p <password for unix user>



   view my Linkedin profile
<https://www.linkedin.com/in/mich-talebzadeh-ph-d-5205b2/>


 https://en.everybodywiki.com/Mich_Talebzadeh



*Disclaimer:* Use it at your own risk. Any and all responsibility for any
loss, damage or destruction of data or any other property which may arise
from relying on this email's technical content is explicitly disclaimed.
The author will in no case be liable for any monetary damages arising from
such loss, damage or destruction.




On Wed, 23 Feb 2022 at 09:35, Aaron Grubb <aa...@kaden.ai> wrote:

> Try username "root" and empty password. That works for me on 3.1.2.
>
> On Wed, 2022-02-23 at 10:16 +0800, Bitfox wrote:
>
> Hello
>
> I have hive 2.3.9 installed by default on localhost for testing.
> HDFS is also installed on localhost, which works correctly b/c I have
> already used the file storage feature.
>
> I didn't change any configure files for hive.
>
> I can login into hive shell:
>
> hive> show databases;
>
> OK
>
> default
>
> Time taken: 4.458 seconds, Fetched: 1 row(s)
>
>
>
> After started hiveserver2 which works online, I can't connect via beeline:
>
>
> beeline> !connect jdbc:hive2://localhost:10000/default
>
> Connecting to jdbc:hive2://localhost:10000/default
>
> Enter username for jdbc:hive2://localhost:10000/default: APP
>
> Enter password for jdbc:hive2://localhost:10000/default: ****
>
> 22/02/23 10:11:41 [main]: WARN jdbc.HiveConnection: Failed to connect to
> localhost:10000
>
> Could not open connection to the HS2 server. Please check the server URI
> and if the URI is correct, then ask the administrator to check the server
> status.
>
> Error: Could not open client transport with JDBC Uri:
> jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection
> refused (Connection refused) (state=08S01,code=0)
>
>
>
> It prompts me to input username and password.
>
> I have tried both empty user/pass, and user "APP"/pass "mine".
>
> Neither of them will work.
>
>
>
> How can I fix this and connect to Hive correctly via beeline?
>
>
> Sorry I am the newbie to Hive.
>
>
> Thanks a lot.
>
>
>

Re: help with beeline connection to hive

Posted by Aaron Grubb <aa...@kaden.ai>.
Try username "root" and empty password. That works for me on 3.1.2.

On Wed, 2022-02-23 at 10:16 +0800, Bitfox wrote:
Hello

I have hive 2.3.9 installed by default on localhost for testing.
HDFS is also installed on localhost, which works correctly b/c I have already used the file storage feature.

I didn't change any configure files for hive.

I can login into hive shell:


hive> show databases;

OK

default

Time taken: 4.458 seconds, Fetched: 1 row(s)



After started hiveserver2 which works online, I can't connect via beeline:


beeline> !connect jdbc:hive2://localhost:10000/default

Connecting to jdbc:hive2://localhost:10000/default

Enter username for jdbc:hive2://localhost:10000/default: APP

Enter password for jdbc:hive2://localhost:10000/default: ****

22/02/23 10:11:41 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000

Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.

Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)



It prompts me to input username and password.

I have tried both empty user/pass, and user "APP"/pass "mine".

Neither of them will work.



How can I fix this and connect to Hive correctly via beeline?


Sorry I am the newbie to Hive.


Thanks a lot.


Re: help with beeline connection to hive

Posted by Alessandro Solimando <al...@gmail.com>.
Hi Bitfox,
did you check if HS2 is indeed running on port 10000? ("sudo lsof -i -P -n
| grep LISTEN" for instance).

IIRC the default credentials are "hive/hive", can you try that too?

HTH,
Alessandro

On Wed, 23 Feb 2022 at 03:17, Bitfox <bi...@bitfox.top> wrote:

> Hello
>
> I have hive 2.3.9 installed by default on localhost for testing.
> HDFS is also installed on localhost, which works correctly b/c I have
> already used the file storage feature.
>
> I didn't change any configure files for hive.
>
> I can login into hive shell:
>
> hive> show databases;
>
> OK
>
> default
>
> Time taken: 4.458 seconds, Fetched: 1 row(s)
>
>
>
> After started hiveserver2 which works online, I can't connect via beeline:
>
>
> beeline> !connect jdbc:hive2://localhost:10000/default
>
> Connecting to jdbc:hive2://localhost:10000/default
>
> Enter username for jdbc:hive2://localhost:10000/default: APP
>
> Enter password for jdbc:hive2://localhost:10000/default: ****
>
> 22/02/23 10:11:41 [main]: WARN jdbc.HiveConnection: Failed to connect to
> localhost:10000
>
> Could not open connection to the HS2 server. Please check the server URI
> and if the URI is correct, then ask the administrator to check the server
> status.
>
> Error: Could not open client transport with JDBC Uri:
> jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection
> refused (Connection refused) (state=08S01,code=0)
>
>
>
> It prompts me to input username and password.
>
> I have tried both empty user/pass, and user "APP"/pass "mine".
>
> Neither of them will work.
>
>
>
> How can I fix this and connect to Hive correctly via beeline?
>
>
> Sorry I am the newbie to Hive.
>
>
> Thanks a lot.
>