如何解决hadoop文件无法浏览问题“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了如何解决hadoop文件无法浏览问题“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“相关的知识,希望对你有一定的参考价值。


搭建好了hadoop环境后,namenode、datanode看着都是正常的。但是当点到browser the file system时,结果报错了,报错的内容是“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“.

如何解决hadoop文件无法浏览问题“Failed

 在解决这个问题上,我走了一些弯路。比如修改hadoop的core-site.xml,hdfs-site.xml。设置文件权限,修改文件目录等。但都不起作用。

后来我看了下hadoop官网的介绍,它支持的jdk的最新版本是11。而我的足迹的jdk的版本是18。

后来我从oracel的官网上下载了jdk的11版本,上传到服务器上,解压缩,重新配置JAVA_HOME环境变量。

修改bashrc文件:

export JAVA_HOME=/root/jdk-11.0.16.1
export PATH=$PATH:$JAVA_HOME/bin:.

然后将hadoop重新启动后,问题解决了。

如何解决hadoop文件无法浏览问题“Failed

这个jdk版本的大坑,希望学习大数据的同学跳过这个大坑。 

Hadoop Java Versions
Skip to end of metadata
Created by Akira Ajisaka, last modified on Oct 19, 2020Go to start of metadata
Supported Java Versions
Apache Hadoop 3.3 and upper supports Java 8 and Java 11 (runtime only)
Please compile Hadoop with Java 8. Compiling Hadoop with Java 11 is not supported:  HADOOP-16795 - Java 11 compile support OPEN
Apache Hadoop from 3.0.x to 3.2.x now supports only Java 8
Apache Hadoop from 2.7.x to 2.10.x support both Java 7 and 8
Supported JDKs/JVMs
Now Apache Hadoop community is using OpenJDK for the build/test/release environment, and thats why OpenJDK should be supported in the community.
​​​ https://github.com/apache/hadoop/blob/rel/release-3.2.1/dev-support/docker/Dockerfile#L92​​ Other jdks/jvms should work well. If you find they dont work as expected, please file a JIRA.

以上是关于如何解决hadoop文件无法浏览问题“Failed to retrieve data from /webhdfs/v1/?op=LISTSTATUS: Server Error“的主要内容,如果未能解决你的问题,请参考以下文章

解决nginx无法下载大文件,解决open()failed 问题

解决spark运行中failed to locate the winutils binary in the hadoop binary path的问题

hadoop集群无法启动namenode: ERROR namenode.NameNode: Failed to start namenode.

已解决:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask

已解决:FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.tez.TezTask

DLL load failed: 页面文件太小,无法完成操作