本想安装好hive,启动hive-meta服务后,配置好hive 客户端,执行hive 就可以连接了,接下来一系列没想到啊.....
1:
Failed with exception java.io.IOException:java.net.ConnectException: Call From slave1/192.168.220.139 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see: nRefused
我在master机器上lsof -i:9000 确实这个端口没有打开!
我hadoop的配置文件
-
[hadoop@master hadoop]$ cat core-site.xml
-
<?xml version="1.0" encoding="UTF-8"?>
-
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
-
-
<configuration>
-
<property>
-
<name>fs.default.name</name>
-
<value>hdfs://master:9000</value>
-
</property>
-
<property>
-
<name>ha.zookeeper.quorum</name>
-
<value>ZooKeeper-node1:2181,ZooKeeper-node2:2181,ZooKeeper-node3:2181</value>
-
</property>
-
</configuration>
无论如何9000端口就是不能启动(日志里面也没有报错,lsof -i:9000也没有任何的输出),我将9000修改为8020 ,并将修改后的core-site.xml 覆盖到其他的hadoop机器上,然后重启hadoop集群
该问题解决了!
2:
[hadoop@slave1 conf]$ /home/hadoop/hive-client/bin/hive
16/01/18 23:48:01 WARN conf.HiveConf: HiveConf of name hive.metastore.local does not exist
Logging initialized using configuration in jar:file:/home/hadoop/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties
Exception in thread "main" java.lang.RuntimeException: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)
at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
Caused by: java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
at org.apache.hadoop.fs.Path.initialize(Path.java:206)
at org.apache.hadoop.fs.Path.(Path.java:172)
at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:563)
at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:508)
... 8 more
Caused by: java.net.URISyntaxException: Relative path in absolute URI: ${system:java.io.tmpdir%7D/$%7Bsystem:user.name%7D
at java.net.URI.checkPath(URI.java:1804)
at java.net.URI.(URI.java:752)
at org.apache.hadoop.fs.Path.initialize(Path.java:203)
在hive client机器上修改hive-site.xml中的所有${system:java.io.tmpdir}和${system:user.name}变量为具体的路径!
例如: 我在/home/hadoop/hive/目录下创建一个tmp目录,然后在tmp目录下创建一个hadoop目录,我将${system:java.io.tmpdir}替换为/home/hadoop/hive/tmp,将
${system:user.name}替换为hadoop
3:Caused by: org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.StandbyException): Operation category READ is not supported in state standby
原因: 我在hive client的hive-site.xml中配置master:9083,但master为standby状态,只要切换master机器为active namenode 即可
4:
[ERROR] Terminal initialization failed; falling back to unsupported
java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expecte
解决方法是:
将hive下的新版本jline的JAR包拷贝到hadoop下:
cd /*/*/hadoop-2.6.0/share/hadoop/yarn/lib
mv jline-0.9.94.jar jline-0.9.94.jar.bak
cp /*/hive/apache-hive-1.1.0-bin/lib/jline-2.12.jar /*/*/hadoop-2.6.0/share/hadoop/yarn/lib
-rw-r--r-- 1 root root 87325 Mar 10 18:10 jline-0.9.94.jar.bak
-rw-r--r-- 1 root root 213854 Mar 11 22:22 jline-2.12.jar
问题即可解决!
5:
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 767 bytes
解决方法:
alter database hive_meta character set latin1;
阅读(3917) | 评论(0) | 转发(0) |