分享

HIVE配置完成后的一些错误

mvs2008 发表于 2015-7-15 09:49:53 [显示全部楼层] 回帖奖励 阅读模式 关闭右栏 6 52500
HI,各位大神。小弟初学配置HIVE,根据网上步骤配置。
兴高采烈的运行HIVE,结果爆ERROR!HIVE-0.12,HADOOP-2.7.0
ERROR如下:
doop@master bin]$ hive
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.max.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.min.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.min.split.size.per.rack is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.rack
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.min.split.size.per.node is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.node
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
15/07/14 18:35:16 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated.
Instead, use mapreduce.reduce.speculative
Logging initialized using configuration in file:/home/hadoop/hive/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop-2.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hive/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Java HotSpot(TM) Server VM warning: You have loaded library /home/hadoop/hadoop-2.7.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard.
The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecs
tack'.

Exception in thread "main" java.lang.RuntimeException: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.
HiveMetaStoreClient

at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:295)

at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:679)

at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:623)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.RuntimeException: Unable to instantiate org.apache.hadoop.hive.metastore.HiveMetaStoreClient

at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1345)

at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:62)

at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)

at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2420)

at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2432)

at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:289)
... 8 more
Caused by: java.lang.reflect.InvocationTargetException

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:422)

at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1343)
... 13 more
Caused by: MetaException(message:Could not connect to meta store using any of the URIs provided.
Most recent failure: org.apache.thrift.transport.TTransportException: java.net.ConnectException: Connection refused

at org.apache.thrift.transport.TSocket.open(TSocket.java:185)

at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:288)

at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:169)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1343)

at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:62)

at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:72)

at org.apache.hadoop.hive.ql.metadata.Hive.createMetaStoreClient(Hive.java:2420)

at org.apache.hadoop.hive.ql.metadata.Hive.getMSC(Hive.java:2432)

at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:289)

at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:679)

at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:623)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:497)

at org.apache.hadoop.util.RunJar.run(RunJar.java:221)

at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.net.ConnectException: Connection refused

at java.net.PlainSocketImpl.socketConnect(Native Method)

at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)

at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)

at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)

at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)

at java.net.Socket.connect(Socket.java:589)

at org.apache.thrift.transport.TSocket.open(TSocket.java:180)
... 20 more
)

at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:334)

at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:169)
... 18 more

请问下应该怎么改配置呢?

已有(6)人评论

跳转到指定楼层
Alkaloid0515 发表于 2015-7-15 21:50:56
首先hadoop2.7.0不是稳定版本,最好使用稳定版本。
根据楼主的信息,应该是url也就是hdfs://路径有问题。看看端口等,能否在hdfs上正常访问文件。
Could not connect to meta store using any of the URIs provided.

楼主是通过那个配置访问的 meta store,把相关内容贴出来看看
回复

使用道具 举报

mvs2008 发表于 2015-7-16 10:18:29
Alkaloid0515 发表于 2015-7-15 21:50
首先hadoop2.7.0不是稳定版本,最好使用稳定版本。
根据楼主的信息,应该是url也就是hdfs://路径有问题。 ...

谢谢您的回复。我的元数据一开始配置的是mysql,问题出在元数据的配置这里,既然这样我就先不配置元数据库
我把mysql的配置都注释掉就可以进入hive了。但是每次进入都会有很多信息提示,特别是这个SLF4J和Java HotSpot(TM) Server VM warning
[hadoop@master conf]$ hive
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.input.dir.recursive is deprecated. Instead, use mapreduce.input.fileinputformat.input.dir.recursive
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.max.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.maxsize
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.min.split.size is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.min.split.size.per.rack is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.rack
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.min.split.size.per.node is deprecated. Instead, use mapreduce.input.fileinputformat.split.minsize.per.node
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.reduce.tasks is deprecated. Instead, use mapreduce.job.reduces
15/07/15 19:00:07 INFO Configuration.deprecation: mapred.reduce.tasks.speculative.execution is deprecated. Instead, use mapreduce.reduce.speculative
Logging initialized using configuration in file:/home/hadoop/hive/conf/hive-log4j.properties
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/home/hadoop/hadoop-2.7.0/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/home/hadoop/hive/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.slf4j.impl.Log4jLoggerFactory]
Java HotSpot(TM) Server VM warning: You have loaded library /home/hadoop/hadoop-2.7.0/lib/native/libhadoop.so.1.0.0 which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
>hive show tables;
OK
Time taken: 1.513 seconds

>hive create table t(id int,name string);
OK
Time taken: 1.609 seconds
hive> show tables;
OK
t
Time taken: 0.212 seconds, Fetched: 1 row(s)



感觉那些warning信息并不影响HIVE的正常运行,如何能去掉那些烦人的提示信息呢?
回复

使用道具 举报

levycui 发表于 2015-7-17 16:30:23
看看兼容列表,选择合适的版本。
http://www.aboutyun.com/home.php ... forward=1&id=62
回复

使用道具 举报

小钟 发表于 2016-10-6 13:51:19
nohup hive --service metastore &
nohup hive --service hiveserver2 &
把服务开启就行了。
回复

使用道具 举报

小钟 发表于 2016-10-6 13:54:10
hive --service metastore
hive --service hiveserver2
把服务开启就行了。
回复

使用道具 举报

小钟 发表于 2016-10-6 14:22:11
mvs2008 发表于 2015-7-16 10:18
谢谢您的回复。我的元数据一开始配置的是mysql,问题出在元数据的配置这里,既然这样我就先不配置元数据 ...

hive --service metastore
hive --service hiveserver2
把服务开启就行了。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条