记一次HDFS Web报错Couldn‘t preview the file. NetworkError: Failed to execute ‘send‘ on ‘XMLHttpRequest‘ 您所在的位置:网站首页 topone翻译 记一次HDFS Web报错Couldn‘t preview the file. NetworkError: Failed to execute ‘send‘ on ‘XMLHttpRequest‘

记一次HDFS Web报错Couldn‘t preview the file. NetworkError: Failed to execute ‘send‘ on ‘XMLHttpRequest‘

2024-01-16 15:17| 来源: 网络整理| 查看: 265

报错内容

Couldn’t preview the file. NetworkError: Failed to execute ‘send’ on ‘XMLHttpRequest’: Failed to load ‘http://slave1:9864/webhdfs/v1/HelloHadoop.txt?op=OPEN&namenoderpcaddress=master:9820&offset=0&_=1609724219001’. 在这里插入图片描述

Hadoop 集群背景

https://blog.csdn.net/llwy1428/article/details/111144524

报错原因

hdfs-site.xml 文件中的 dfs.webhdfs.enabled 没有配置或者配置为 false

解决方案

1、编辑文件 hdfs-site.xml

[root@master ~]# vim /usr/bigdata/hadoop-3.3.0/etc/hadoop/hdfs-site.xml

2、增加或修改的配置信息为:

dfs.webhdfs.enabled true

3、并把文件 hdfs-site.xml 分发给各个节点(或修改各个节点的 hdfs-site.xml 文件) 4、配置浏览器所在系统的 hosts 文件 (1)windows: 修改文件 C:\Windows\System32\drivers\etc\hosts 增加内容(Hadoop集群中各节点及主机名的映射) 在这里插入图片描述 (2)Centos系统

[root@localhost ~]# vi /etc/hosts

增加内容(Hadoop集群中各节点及主机名的映射) 在这里插入图片描述 5、重启 Hadoop 集群

至此,报错解决!



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有