You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@oozie.apache.org by Huang Meilong <im...@outlook.com> on 2016/12/07 08:03:07 UTC

beeline can not connect to hive server2 in hive2 action

Hi,


I have a simple hive2 action in oozie workflow,  the strerr logs indicate that this action can not connect to hiveserver2:


INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
Dec 07, 2016 3:48:52 PM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
Connecting to jdbc:hive2://localhost:10000/default
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0)
No current connection
Intercepting System.exit(2)
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
log4j:WARN Please initialize the log4j system properly.



but the hiveserver2 is on and I can connect to it:


[hadoop@emr-header-1 logs]$ beeline -u jdbc:hive2://localhost:10000/default

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

16/12/07 16:01:41 INFO jdbc.Utils: Supplied authorities: localhost:10000

16/12/07 16:01:41 INFO jdbc.Utils: Resolved authority: localhost:10000

16/12/07 16:01:41 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default

Connected to: Apache Hive (version 2.0.0)

Driver: Spark Project Core (version 1.6.1)

Transaction isolation: TRANSACTION_REPEATABLE_READ

Beeline version 1.6.1 by Apache Hive

0: jdbc:hive2://localhost:10000/default>



What's the problem, do you have any idea?

答复: beeline can not connect to hive server2 in hive2 action

Posted by Huang Meilong <im...@outlook.com>.
I've just resolved this problem. I'm using oozie on hue, and hue's default hiveserver2 url is localhost, and hive2 action is submitted to yarn(running on a worker host), not running on the host oozie is launching.


It works fine when I set the hiveserver2 rul with full hostname. Thanks Andrey.

________________________________
发件人: Huang Meilong <im...@outlook.com>
发送时间: 2016年12月7日 16:03:07
收件人: user@oozie.apache.org
主题: beeline can not connect to hive server2 in hive2 action

Hi,


I have a simple hive2 action in oozie workflow,  the strerr logs indicate that this action can not connect to hiveserver2:


INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
Dec 07, 2016 3:48:52 PM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
Connecting to jdbc:hive2://localhost:10000/default
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0)
No current connection
Intercepting System.exit(2)
Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]
log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
log4j:WARN Please initialize the log4j system properly.



but the hiveserver2 is on and I can connect to it:


[hadoop@emr-header-1 logs]$ beeline -u jdbc:hive2://localhost:10000/default

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

16/12/07 16:01:41 INFO jdbc.Utils: Supplied authorities: localhost:10000

16/12/07 16:01:41 INFO jdbc.Utils: Resolved authority: localhost:10000

16/12/07 16:01:41 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default

Connected to: Apache Hive (version 2.0.0)

Driver: Spark Project Core (version 1.6.1)

Transaction isolation: TRANSACTION_REPEATABLE_READ

Beeline version 1.6.1 by Apache Hive

0: jdbc:hive2://localhost:10000/default>



What's the problem, do you have any idea?

答复: beeline can not connect to hive server2 in hive2 action

Posted by Huang Meilong <im...@outlook.com>.
I've just checked that oozie is launching on the same host where hiveserver2 is running.

________________________________
发件人: MyGmail <am...@gmail.com>
发送时间: 2016年12月7日 16:08:27
收件人: user@oozie.apache.org
主题: Re: beeline can not connect to hive server2 in hive2 action

Hi, check if oozie is launching on the same host where hiveserver2 is running. Try pointing full hostname, not localhost.

Regards,
Andrey

> 7 дек. 2016 г., в 11:03, Huang Meilong <im...@outlook.com> написал(а):
>
> Hi,
>
>
> I have a simple hive2 action in oozie workflow,  the strerr logs indicate that this action can not connect to hiveserver2:
>
>
> INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
> Dec 07, 2016 3:48:52 PM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
> INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
> Connecting to jdbc:hive2://localhost:10000/default
> Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0)
> No current connection
> Intercepting System.exit(2)
> Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]
> log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
> log4j:WARN Please initialize the log4j system properly.
>
>
>
> but the hiveserver2 is on and I can connect to it:
>
>
> [hadoop@emr-header-1 logs]$ beeline -u jdbc:hive2://localhost:10000/default
>
> Connecting to jdbc:hive2://localhost:10000/default
>
> 16/12/07 16:01:41 INFO jdbc.Utils: Supplied authorities: localhost:10000
>
> 16/12/07 16:01:41 INFO jdbc.Utils: Resolved authority: localhost:10000
>
> 16/12/07 16:01:41 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default
>
> Connected to: Apache Hive (version 2.0.0)
>
> Driver: Spark Project Core (version 1.6.1)
>
> Transaction isolation: TRANSACTION_REPEATABLE_READ
>
> Beeline version 1.6.1 by Apache Hive
>
> 0: jdbc:hive2://localhost:10000/default>
>
>
>
> What's the problem, do you have any idea?

答复: beeline can not connect to hive server2 in hive2 action

Posted by Huang Meilong <im...@outlook.com>.
hi Andrey, where to specify the hiveserver2 url?

________________________________
发件人: MyGmail <am...@gmail.com>
发送时间: 2016年12月7日 16:08:27
收件人: user@oozie.apache.org
主题: Re: beeline can not connect to hive server2 in hive2 action

Hi, check if oozie is launching on the same host where hiveserver2 is running. Try pointing full hostname, not localhost.

Regards,
Andrey

> 7 дек. 2016 г., в 11:03, Huang Meilong <im...@outlook.com> написал(а):
>
> Hi,
>
>
> I have a simple hive2 action in oozie workflow,  the strerr logs indicate that this action can not connect to hiveserver2:
>
>
> INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
> Dec 07, 2016 3:48:52 PM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
> INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
> Connecting to jdbc:hive2://localhost:10000/default
> Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0)
> No current connection
> Intercepting System.exit(2)
> Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]
> log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
> log4j:WARN Please initialize the log4j system properly.
>
>
>
> but the hiveserver2 is on and I can connect to it:
>
>
> [hadoop@emr-header-1 logs]$ beeline -u jdbc:hive2://localhost:10000/default
>
> Connecting to jdbc:hive2://localhost:10000/default
>
> 16/12/07 16:01:41 INFO jdbc.Utils: Supplied authorities: localhost:10000
>
> 16/12/07 16:01:41 INFO jdbc.Utils: Resolved authority: localhost:10000
>
> 16/12/07 16:01:41 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default
>
> Connected to: Apache Hive (version 2.0.0)
>
> Driver: Spark Project Core (version 1.6.1)
>
> Transaction isolation: TRANSACTION_REPEATABLE_READ
>
> Beeline version 1.6.1 by Apache Hive
>
> 0: jdbc:hive2://localhost:10000/default>
>
>
>
> What's the problem, do you have any idea?

Re: beeline can not connect to hive server2 in hive2 action

Posted by MyGmail <am...@gmail.com>.
Hi, check if oozie is launching on the same host where hiveserver2 is running. Try pointing full hostname, not localhost.

Regards,
Andrey

> 7 дек. 2016 г., в 11:03, Huang Meilong <im...@outlook.com> написал(а):
> 
> Hi,
> 
> 
> I have a simple hive2 action in oozie workflow,  the strerr logs indicate that this action can not connect to hiveserver2:
> 
> 
> INFO: Binding org.apache.hadoop.yarn.webapp.GenericExceptionHandler to GuiceManagedComponentProvider with the scope "Singleton"
> Dec 07, 2016 3:48:52 PM com.sun.jersey.guice.spi.container.GuiceComponentProviderFactory getComponentProvider
> INFO: Binding org.apache.hadoop.mapreduce.v2.app.webapp.AMWebServices to GuiceManagedComponentProvider with the scope "PerRequest"
> Connecting to jdbc:hive2://localhost:10000/default
> Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default: java.net.ConnectException: Connection refused (state=08S01,code=0)
> No current connection
> Intercepting System.exit(2)
> Failing Oozie Launcher, Main class [org.apache.oozie.action.hadoop.Hive2Main], exit code [2]
> log4j:WARN No appenders could be found for logger (org.apache.hadoop.mapreduce.v2.app.MRAppMaster).
> log4j:WARN Please initialize the log4j system properly.
> 
> 
> 
> but the hiveserver2 is on and I can connect to it:
> 
> 
> [hadoop@emr-header-1 logs]$ beeline -u jdbc:hive2://localhost:10000/default
> 
> Connecting to jdbc:hive2://localhost:10000/default
> 
> 16/12/07 16:01:41 INFO jdbc.Utils: Supplied authorities: localhost:10000
> 
> 16/12/07 16:01:41 INFO jdbc.Utils: Resolved authority: localhost:10000
> 
> 16/12/07 16:01:41 INFO jdbc.HiveConnection: Will try to open client transport with JDBC Uri: jdbc:hive2://localhost:10000/default
> 
> Connected to: Apache Hive (version 2.0.0)
> 
> Driver: Spark Project Core (version 1.6.1)
> 
> Transaction isolation: TRANSACTION_REPEATABLE_READ
> 
> Beeline version 1.6.1 by Apache Hive
> 
> 0: jdbc:hive2://localhost:10000/default>
> 
> 
> 
> What's the problem, do you have any idea?