Caused by: java.net.ConnectException: Call From master/192.168.199.130 to master:9000 failed on connection exception: java.net.ConnectException: Conne

简介: 1:安装好hive,准备启动的时候出现下面的错误(由于hive是基于Hadoop的,所以必须先将你的集群启动起来,我就是没有启动集群,直接启动hive导致的错误): 1 [root@master bin]# .

1:安装好hive,准备启动的时候出现下面的错误(由于hive是基于Hadoop的,所以必须先将你的集群启动起来,我就是没有启动集群,直接启动hive导致的错误):

 1 [root@master bin]# ./hive
 2 
 3 Logging initialized using configuration in jar:file:/home/hadoop/soft/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties
 4 Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException: Call From master/192.168.199.130 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
 5     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:522)
 6     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:677)
 7     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
 8     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 9     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
10     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
11     at java.lang.reflect.Method.invoke(Method.java:606)
12     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
13     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
14 Caused by: java.net.ConnectException: Call From master/192.168.199.130 to master:9000 failed on connection exception: java.net.ConnectException: Connection refused; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused
15     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
16     at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
17     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
18     at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
19     at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:791)
20     at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:731)
21     at org.apache.hadoop.ipc.Client.call(Client.java:1473)
22     at org.apache.hadoop.ipc.Client.call(Client.java:1400)
23     at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:232)
24     at com.sun.proxy.$Proxy17.getFileInfo(Unknown Source)
25     at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:752)
26     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
27     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
28     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
29     at java.lang.reflect.Method.invoke(Method.java:606)
30     at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:187)
31     at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:102)
32     at com.sun.proxy.$Proxy18.getFileInfo(Unknown Source)
33     at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1977)
34     at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1118)
35     at org.apache.hadoop.hdfs.DistributedFileSystem$18.doCall(DistributedFileSystem.java:1114)
36     at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
37     at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1114)
38     at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1400)
39     at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:596)
40     at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:554)
41     at org.apache.hadoop.hive.ql.session.SessionState.start(SessionState.java:508)
42     ... 8 more
43 Caused by: java.net.ConnectException: Connection refused
44     at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
45     at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739)
46     at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)
47     at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:530)
48     at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:494)
49     at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:608)
50     at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:706)
51     at org.apache.hadoop.ipc.Client$Connection.access$2800(Client.java:369)
52     at org.apache.hadoop.ipc.Client.getConnection(Client.java:1522)
53     at org.apache.hadoop.ipc.Client.call(Client.java:1439)
54     ... 28 more
55 [root@master bin]# 

2:启动你的集群,然后再启动你的hive再次尝试:

 1 [root@master bin]# start-dfs.sh 
 2 Starting namenodes on [master]
 3 master: starting namenode, logging to /home/hadoop/soft/hadoop-2.6.4/logs/hadoop-root-namenode-master.out
 4 master: starting datanode, logging to /home/hadoop/soft/hadoop-2.6.4/logs/hadoop-root-datanode-master.out
 5 slaver2: starting datanode, logging to /home/hadoop/soft/hadoop-2.6.4/logs/hadoop-root-datanode-slaver2.out
 6 slaver1: starting datanode, logging to /home/hadoop/soft/hadoop-2.6.4/logs/hadoop-root-datanode-slaver1.out
 7 Starting secondary namenodes [master]
 8 master: starting secondarynamenode, logging to /home/hadoop/soft/hadoop-2.6.4/logs/hadoop-root-secondarynamenode-master.out
 9 [root@master bin]# start-yarn.sh 
10 starting yarn daemons
11 starting resourcemanager, logging to /home/hadoop/soft/hadoop-2.6.4/logs/yarn-hadoop-resourcemanager-master.out
12 slaver1: starting nodemanager, logging to /home/hadoop/soft/hadoop-2.6.4/logs/yarn-root-nodemanager-slaver1.out
13 slaver2: starting nodemanager, logging to /home/hadoop/soft/hadoop-2.6.4/logs/yarn-root-nodemanager-slaver2.out
14 master: starting nodemanager, logging to /home/hadoop/soft/hadoop-2.6.4/logs/yarn-root-nodemanager-master.out
15 [root@master bin]# jps
16 23933 ResourceManager
17 24081 NodeManager
18 23391 SecondaryNameNode
19 22992 NameNode
20 24147 Jps

3:启动完集群以后再次启动hive的时候依旧还报错,不过是新的错误,如下所示,解决方法见下篇:

 1 [root@master bin]# ls
 2 beeline  ext  hive  hive-config.sh  hiveserver2  metatool  schematool
 3 [root@master bin]# clear
 4 ls
 5 [root@master bin]# ls
 6 beeline  ext  hive  hive-config.sh  hiveserver2  metatool  schematool
 7 [root@master bin]# ./hive
 8 
 9 Logging initialized using configuration in jar:file:/home/hadoop/soft/apache-hive-1.2.1-bin/lib/hive-common-1.2.1.jar!/hive-log4j.properties
10 [ERROR] Terminal initialization failed; falling back to unsupported
11 java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
12     at jline.TerminalFactory.create(TerminalFactory.java:101)
13     at jline.TerminalFactory.get(TerminalFactory.java:158)
14     at jline.console.ConsoleReader.<init>(ConsoleReader.java:229)
15     at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
16     at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
17     at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:787)
18     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:721)
19     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
20     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
21     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
22     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
23     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
24     at java.lang.reflect.Method.invoke(Method.java:606)
25     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
26     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
27 
28 Exception in thread "main" java.lang.IncompatibleClassChangeError: Found class jline.Terminal, but interface was expected
29     at jline.console.ConsoleReader.<init>(ConsoleReader.java:230)
30     at jline.console.ConsoleReader.<init>(ConsoleReader.java:221)
31     at jline.console.ConsoleReader.<init>(ConsoleReader.java:209)
32     at org.apache.hadoop.hive.cli.CliDriver.setupConsoleReader(CliDriver.java:787)
33     at org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:721)
34     at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:681)
35     at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:621)
36     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
37     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
38     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
39     at java.lang.reflect.Method.invoke(Method.java:606)
40     at org.apache.hadoop.util.RunJar.run(RunJar.java:221)
41     at org.apache.hadoop.util.RunJar.main(RunJar.java:136)
42 [root@master bin]# 

停更......

2017-12-10 10:59:53

目录
相关文章
|
1月前
|
Java 网络安全 Maven
Exception in thread "main" java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builder.sslSocketFactory(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder; 问题处理
【10月更文挑战第26天】Exception in thread "main" java.lang.NoSuchMethodError: okhttp3.OkHttpClient$Builder.sslSocketFactory(Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/X509TrustManager;)Lokhttp3/OkHttpClient$Builder; 问题处理
43 2
|
2月前
|
Java
让星星⭐月亮告诉你,Java异常分类[Throwable(Error/Exception(RuntimeException/其他异常)) 检查时异常 非检查时异常]
本文深入解析了Java异常处理机制,重点介绍了`Throwable`类及其子类`Error`和`Exception`,并通过实例代码、流程图和表格详细解释了异常的分类、区别及处理方法,帮助读者掌握异常处理的关键技巧,提升程序的稳定性和健壮性。
64 1
|
3月前
|
缓存 Java Linux
java操作hbase报错:KeeperErrorCode=NoNode for /hbase-unsecure/master
java操作hbase报错:KeeperErrorCode=NoNode for /hbase-unsecure/master
219 2
|
4月前
|
Java 测试技术 Maven
成功解决:nested exception is java.lang.NoClassDefFoundError: org/springframework/aop/TargetSource
这篇文章介绍了解决Spring框架中出现的`java.lang.NoClassDefFoundError: org/springframework/aop/TargetSource`错误的步骤,指出错误原因是缺少`spring-aop`模块的jar包,并提供了通过Maven依赖或手动添加jar包到项目中的方法来解决这个问题。
成功解决:nested exception is java.lang.NoClassDefFoundError: org/springframework/aop/TargetSource
成功解决:Failed to load resource: net::ERR_FILE_NOT_FOUND
这篇文章提供了解决"Failed to load resource: net::ERR_FILE_NOT_FOUND"错误的步骤,通过修改配置文件中的资源路径设置为相对路径"./"来成功运行打包后的项目。
成功解决:Failed to load resource: net::ERR_FILE_NOT_FOUND
|
4月前
|
前端开发
Request method ‘POST‘ not supported。 Failed to load resource: net::ERR_FAILED
这篇文章讲述了在前后端分离的项目中,由于前端错误地使用了GET请求方法而不是支持的POST,导致请求被后端拒绝的问题,并提供了相应的解决方法和HTTP方法的CRUD映射知识。
Request method ‘POST‘ not supported。 Failed to load resource: net::ERR_FAILED
|
4月前
|
Oracle 关系型数据库
Navicat 连接Oracle ORA-28547: connection to server failed, probable Oracle Net admin error
Navicat 连接Oracle ORA-28547: connection to server failed, probable Oracle Net admin error
123 0
|
4月前
|
Java
Exception in thread "main" java.lang.UnsatisfiedLinkError: xxx()V
Exception in thread "main" java.lang.UnsatisfiedLinkError: xxx()V
29 0
|
3月前
|
开发框架 前端开发 JavaScript
ASP.NET MVC 教程
ASP.NET 是一个使用 HTML、CSS、JavaScript 和服务器脚本创建网页和网站的开发框架。
50 7
|
3月前
|
存储 开发框架 前端开发
ASP.NET MVC 迅速集成 SignalR
ASP.NET MVC 迅速集成 SignalR
79 0