You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by brajmohan saxena <br...@gmail.com> on 2016/04/04 04:43:16 UTC
How to setup Hive JDBC client to connect remote Hiveserver
Hi,
Could you please tell me how to connect a simple JDBC program to remote
Hiveserver2 with default Derby database.
I have Hiveserver2 running on remote machine and i am trying to run simple
JDBC program from client machine (
DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default", "",
""); )
but getting the following error.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://
192.168.1.103:10001: java.net.ConnectException: Connection refused
(state=08S01,code=0)
Do I need to change hive-site.xml file at server side.
Thanks in advance
Regards
Braj
Re: How to setup Hive JDBC client to connect remote Hiveserver
Posted by Mich Talebzadeh <mi...@gmail.com>.
This telnet does not specify the port that Hiveserver2 is running on
(default 10000)
Mine is running on 10010
*telnet 50.140.197.217 10010*Trying 50.140.197.217...
Connected to rhes564 (50.140.197.217).
Escape character is '^]'.
Dr Mich Talebzadeh
LinkedIn * https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw
<https://www.linkedin.com/profile/view?id=AAEAAAAWh2gBxianrbJd6zP6AcPCCdOABUrV8Pw>*
http://talebzadehmich.wordpress.com
On 4 April 2016 at 05:00, brajmohan saxena <br...@gmail.com> wrote:
> Hi Shumin,
>
> I did telnet
>
> braj-laptop:bin brajmohan$ telnet 192.168.1.103
>
> Trying 192.168.1.103...
>
> telnet: connect to address 192.168.1.103: Connection refused
>
> telnet: Unable to connect to remote host
>
> Thanks
>
> Braj
>
> On Mon, Apr 4, 2016 at 8:41 AM, Shumin Guo <gs...@gmail.com> wrote:
>
>> Can you telnet to that port?
>>
>> $ telnet 192.168.1.103 10000
>>
>> On Sun, Apr 3, 2016 at 9:43 PM, brajmohan saxena <
>> braj.saxena.13@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Could you please tell me how to connect a simple JDBC program to remote
>>> Hiveserver2 with default Derby database.
>>>
>>> I have Hiveserver2 running on remote machine and i am trying to run
>>> simple JDBC program from client machine (
>>> DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default",
>>> "", ""); )
>>>
>>> but getting the following error.
>>>
>>> Error: Could not open client transport with JDBC Uri: jdbc:hive2://
>>> 192.168.1.103:10001: java.net.ConnectException: Connection refused
>>> (state=08S01,code=0)
>>>
>>> Do I need to change hive-site.xml file at server side.
>>>
>>> Thanks in advance
>>>
>>> Regards
>>>
>>> Braj
>>>
>>
>>
>
Re: How to setup Hive JDBC client to connect remote Hiveserver
Posted by Daniel Haviv <da...@veracity-group.com>.
You can see which pid is listening on port 10000 by running "netstat -pan | grep 10000"
The logs are usually under /var/log/hive or under a log dir inside Hive's dir
Thank you.
Daniel
> On 4 Apr 2016, at 08:11, brajmohan saxena <br...@gmail.com> wrote:
>
> My Hiveserver2 is up and running.
> But I think its not able to listening at port 10000.
> What should i do now ?
>
> Also I am using apache-hive-1.2.1-bin copied in my home directory and running the Hiveserver2 from bin.
> But I do not find any hive.log file anywhere, Could you please suggest me the exact location.
>
> Thanks
> Braj
>
>> On Mon, Apr 4, 2016 at 10:25 AM, Daniel Haviv <da...@veracity-group.com> wrote:
>> It seems your hive server is not up (or not listening on port 10000).
>> hiveserver's logs might shed some light (usually at /var/log/hive)
>>
>> Thank you.
>> Daniel
>>
>>> On 4 Apr 2016, at 07:00, brajmohan saxena <br...@gmail.com> wrote:
>>>
>>> Hi Shumin,
>>>
>>> I did telnet
>>>
>>> braj-laptop:bin brajmohan$ telnet 192.168.1.103
>>>
>>> Trying 192.168.1.103...
>>>
>>> telnet: connect to address 192.168.1.103: Connection refused
>>>
>>> telnet: Unable to connect to remote host
>>>
>>> Thanks
>>>
>>> Braj
>>>
>>>
>>>> On Mon, Apr 4, 2016 at 8:41 AM, Shumin Guo <gs...@gmail.com> wrote:
>>>> Can you telnet to that port?
>>>>
>>>> $ telnet 192.168.1.103 10000
>>>>
>>>>> On Sun, Apr 3, 2016 at 9:43 PM, brajmohan saxena <br...@gmail.com> wrote:
>>>>> Hi,
>>>>>
>>>>> Could you please tell me how to connect a simple JDBC program to remote Hiveserver2 with default Derby database.
>>>>>
>>>>> I have Hiveserver2 running on remote machine and i am trying to run simple JDBC program from client machine ( DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default", "", ""); )
>>>>>
>>>>> but getting the following error.
>>>>> Error: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.1.103:10001: java.net.ConnectException: Connection refused (state=08S01,code=0)
>>>>>
>>>>> Do I need to change hive-site.xml file at server side.
>>>>>
>>>>> Thanks in advance
>>>>>
>>>>> Regards
>>>>>
>>>>> Braj
>>>>>
>
Re: How to setup Hive JDBC client to connect remote Hiveserver
Posted by brajmohan saxena <br...@gmail.com>.
My Hiveserver2 is up and running.
But I think its not able to listening at port 10000.
What should i do now ?
Also I am using apache-hive-1.2.1-bin copied in my home directory and
running the Hiveserver2 from bin.
But I do not find any hive.log file anywhere, Could you please suggest me
the exact location.
Thanks
Braj
On Mon, Apr 4, 2016 at 10:25 AM, Daniel Haviv <
daniel.haviv@veracity-group.com> wrote:
> It seems your hive server is not up (or not listening on port 10000).
> hiveserver's logs might shed some light (usually at /var/log/hive)
>
> Thank you.
> Daniel
>
> On 4 Apr 2016, at 07:00, brajmohan saxena <br...@gmail.com>
> wrote:
>
> Hi Shumin,
>
> I did telnet
>
> braj-laptop:bin brajmohan$ telnet 192.168.1.103
>
> Trying 192.168.1.103...
>
> telnet: connect to address 192.168.1.103: Connection refused
>
> telnet: Unable to connect to remote host
>
> Thanks
>
> Braj
>
> On Mon, Apr 4, 2016 at 8:41 AM, Shumin Guo <gs...@gmail.com> wrote:
>
>> Can you telnet to that port?
>>
>> $ telnet 192.168.1.103 10000
>>
>> On Sun, Apr 3, 2016 at 9:43 PM, brajmohan saxena <
>> braj.saxena.13@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Could you please tell me how to connect a simple JDBC program to remote
>>> Hiveserver2 with default Derby database.
>>>
>>> I have Hiveserver2 running on remote machine and i am trying to run
>>> simple JDBC program from client machine (
>>> DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default",
>>> "", ""); )
>>>
>>> but getting the following error.
>>>
>>> Error: Could not open client transport with JDBC Uri: jdbc:hive2://
>>> 192.168.1.103:10001: java.net.ConnectException: Connection refused
>>> (state=08S01,code=0)
>>>
>>> Do I need to change hive-site.xml file at server side.
>>>
>>> Thanks in advance
>>>
>>> Regards
>>>
>>> Braj
>>>
>>
>>
>
Re: How to setup Hive JDBC client to connect remote Hiveserver
Posted by Daniel Haviv <da...@veracity-group.com>.
It seems your hive server is not up (or not listening on port 10000).
hiveserver's logs might shed some light (usually at /var/log/hive)
Thank you.
Daniel
> On 4 Apr 2016, at 07:00, brajmohan saxena <br...@gmail.com> wrote:
>
> Hi Shumin,
>
> I did telnet
>
> braj-laptop:bin brajmohan$ telnet 192.168.1.103
>
> Trying 192.168.1.103...
>
> telnet: connect to address 192.168.1.103: Connection refused
>
> telnet: Unable to connect to remote host
>
> Thanks
>
> Braj
>
>
>> On Mon, Apr 4, 2016 at 8:41 AM, Shumin Guo <gs...@gmail.com> wrote:
>> Can you telnet to that port?
>>
>> $ telnet 192.168.1.103 10000
>>
>>> On Sun, Apr 3, 2016 at 9:43 PM, brajmohan saxena <br...@gmail.com> wrote:
>>> Hi,
>>>
>>> Could you please tell me how to connect a simple JDBC program to remote Hiveserver2 with default Derby database.
>>>
>>> I have Hiveserver2 running on remote machine and i am trying to run simple JDBC program from client machine ( DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default", "", ""); )
>>>
>>> but getting the following error.
>>> Error: Could not open client transport with JDBC Uri: jdbc:hive2://192.168.1.103:10001: java.net.ConnectException: Connection refused (state=08S01,code=0)
>>>
>>> Do I need to change hive-site.xml file at server side.
>>>
>>> Thanks in advance
>>>
>>> Regards
>>>
>>> Braj
>>>
>
Re: How to setup Hive JDBC client to connect remote Hiveserver
Posted by brajmohan saxena <br...@gmail.com>.
Hi Shumin,
I did telnet
braj-laptop:bin brajmohan$ telnet 192.168.1.103
Trying 192.168.1.103...
telnet: connect to address 192.168.1.103: Connection refused
telnet: Unable to connect to remote host
Thanks
Braj
On Mon, Apr 4, 2016 at 8:41 AM, Shumin Guo <gs...@gmail.com> wrote:
> Can you telnet to that port?
>
> $ telnet 192.168.1.103 10000
>
> On Sun, Apr 3, 2016 at 9:43 PM, brajmohan saxena <braj.saxena.13@gmail.com
> > wrote:
>
>> Hi,
>>
>> Could you please tell me how to connect a simple JDBC program to remote
>> Hiveserver2 with default Derby database.
>>
>> I have Hiveserver2 running on remote machine and i am trying to run
>> simple JDBC program from client machine (
>> DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default",
>> "", ""); )
>>
>> but getting the following error.
>>
>> Error: Could not open client transport with JDBC Uri: jdbc:hive2://
>> 192.168.1.103:10001: java.net.ConnectException: Connection refused
>> (state=08S01,code=0)
>>
>> Do I need to change hive-site.xml file at server side.
>>
>> Thanks in advance
>>
>> Regards
>>
>> Braj
>>
>
>
Re: How to setup Hive JDBC client to connect remote Hiveserver
Posted by Shumin Guo <gs...@gmail.com>.
Can you telnet to that port?
$ telnet 192.168.1.103 10000
On Sun, Apr 3, 2016 at 9:43 PM, brajmohan saxena <br...@gmail.com>
wrote:
> Hi,
>
> Could you please tell me how to connect a simple JDBC program to remote
> Hiveserver2 with default Derby database.
>
> I have Hiveserver2 running on remote machine and i am trying to run simple
> JDBC program from client machine (
> DriverManager.getConnection("jdbc:hive2://192.168.1.103:10000/default",
> "", ""); )
>
> but getting the following error.
>
> Error: Could not open client transport with JDBC Uri: jdbc:hive2://
> 192.168.1.103:10001: java.net.ConnectException: Connection refused
> (state=08S01,code=0)
>
> Do I need to change hive-site.xml file at server side.
>
> Thanks in advance
>
> Regards
>
> Braj
>