上海古都建筑设计集团,上海办公室装修设计公司,上海装修公司高质量的内容分享社区,上海装修公司我们不是内容生产者,我们只是上海办公室装修设计公司内容的搬运工平台

hive安装完成无法启动,binhive报错Exception in thread “main“ java.lang.RuntimeException: java.net.ConnectExcept

guduadmin21天前

报错完整内容:Exception in thread "main" java.lang.RuntimeException: java.net.ConnectException: Call From hadoop102/192.168.10.102 to hadoop102:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

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

    at org.apache.hadoop.hive.ql.session.SessionState.beginStart(SessionState.java:591)

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

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

    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:498)

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

    at org.apache.hadoop.util.RunJar.main(RunJar.java:232)

Caused by: java.net.ConnectException: Call From hadoop102/192.168.10.102 to hadoop102:8020 failed on connection exception: java.net.ConnectException: 拒绝连接; For more details see:  http://wiki.apache.org/hadoop/ConnectionRefused

    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:423)

    at org.apache.hadoop.net.NetUtils.wrapWithMessage(NetUtils.java:831)

    at org.apache.hadoop.net.NetUtils.wrapException(NetUtils.java:755)

    at org.apache.hadoop.ipc.Client.getRpcResponse(Client.java:1549)

    at org.apache.hadoop.ipc.Client.call(Client.java:1491)

    at org.apache.hadoop.ipc.Client.call(Client.java:1388)

    at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:233)

    at org.apache.hadoop.ipc.ProtobufRpcEngine$Invoker.invoke(ProtobufRpcEngine.java:118)

    at com.sun.proxy.$Proxy28.getFileInfo(Unknown Source)

    at org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB.getFileInfo(ClientNamenodeProtocolTranslatorPB.java:904)

    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:498)

    at org.apache.hadoop.io.retry.RetryInvocationHandler.invokeMethod(RetryInvocationHandler.java:422)

    at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeMethod(RetryInvocationHandler.java:165)

    at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invoke(RetryInvocationHandler.java:157)

    at org.apache.hadoop.io.retry.RetryInvocationHandler$Call.invokeOnce(RetryInvocationHandler.java:95)

    at org.apache.hadoop.io.retry.RetryInvocationHandler.invoke(RetryInvocationHandler.java:359)

    at com.sun.proxy.$Proxy29.getFileInfo(Unknown Source)

    at org.apache.hadoop.hdfs.DFSClient.getFileInfo(DFSClient.java:1661)

    at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1577)

    at org.apache.hadoop.hdfs.DistributedFileSystem$29.doCall(DistributedFileSystem.java:1574)

    at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)

    at org.apache.hadoop.hdfs.DistributedFileSystem.getFileStatus(DistributedFileSystem.java:1589)

    at org.apache.hadoop.fs.FileSystem.exists(FileSystem.java:1683)

    at org.apache.hadoop.hive.ql.exec.Utilities.ensurePathIsWritable(Utilities.java:4486)

    at org.apache.hadoop.hive.ql.session.SessionState.createRootHDFSDir(SessionState.java:760)

    at org.apache.hadoop.hive.ql.session.SessionState.createSessionDirs(SessionState.java:701)

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

    ... 9 more

Caused by: java.net.ConnectException: 拒绝连接

    at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)

    at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717)

    at org.apache.hadoop.net.SocketIOWithTimeout.connect(SocketIOWithTimeout.java:206)

    at org.apache.hadoop.net.NetUtils.connect(NetUtils.java:531)

    at org.apache.hadoop.ipc.Client$Connection.setupConnection(Client.java:700)

    at org.apache.hadoop.ipc.Client$Connection.setupIOstreams(Client.java:804)

    at org.apache.hadoop.ipc.Client$Connection.access$3800(Client.java:421)

    at org.apache.hadoop.ipc.Client.getConnection(Client.java:1606)

    at org.apache.hadoop.ipc.Client.call(Client.java:1435)

    ... 34 more

原因是namenode没有启动

如果启动报错Attempting to operate on hdfs namenode as root

那就参照我另外一篇文章,去配置环境变量

至于为什么namenode没有启动

先关闭hadoop:stop-all.sh

删除文件夹 (/opt/module/hadoop-3.1.3/tmp/)的tmp/文件夹里边所有的东西

删除日志 : 删除 logs文件夹下所有的东西:rm -rf logs/

mkdir logs

重新格式化:bin/hadoop namenode -format

格式完成后启动Hadoop

hive安装完成无法启动,binhive报错Exception in thread “main“ java.lang.RuntimeException: java.net.ConnectExcept,第1张

这时候再去启动hive就成功了

 hive安装完成无法启动,binhive报错Exception in thread “main“ java.lang.RuntimeException: java.net.ConnectExcept,第2张

 

网友评论

搜索
最新文章
热门文章
热门标签