我无法访问hadoop web界面(datanode、resourcemanager)

brccelvz  于 2021-06-01  发布在  Hadoop
关注(0)|答案(1)|浏览(661)

我已经用伪分布式模式安装了hadoop3.1.1。我尝试访问hadoopweb界面,并命名为node( Server's public IP:9870 )和jobhistoryserver( public IP:19888 )ui打开良好,但datanode( public IP:9864 ),资源经理( public IP:8088 )ui被阻止。
但是,当我发出命令 jps ,datanode和resourcemanager仍在工作。而且,日志文件中没有任何特殊的错误消息。

我想知道是什么问题。
硕士学位:

localhost

奴隶:

localhost

hdfs-site.xml:

<configuration>
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
  <property>
    <name>dfs.namenode.name.dir</name>
    <value>(Hadoop Home Dir)/hdata/dfs/namenode</value>
  </property>
  <property>
    <name>dfs.datanode.data.dir</name>
    <value>(Hadoop Home Dir)/hdata/dfs/datanode</value>
  </property>
  <property>
    <name>dfs.datanode.http.address</name>
    <value>localhost:9864</value>
  </property>
</configuration>

core-site.xml:

<configuration>
  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
  </property>
  <property>
    <name>hadoop.tmp.dir</name>
    <value>(Hadoop Home Dir)/hdata</value>
  </property>
</configuration>

mapred-site.xml:

<configuration>
  <property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>
</configuration>

yarn-site.xml:

<configuration>
  <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
  <property>
    <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
    <value>org.apache.hadoop.mapred.ShuffleHandler</value>
  </property>
  <property>
    <name>yarn.resourcemanager.hostname</name>
    <value>localhost</value>
  </property>
  <property>
    <name>yarn.web-proxy.address</name>
    <value>localhost:8089</value>
  </property>
</configuration>

resourcemanager日志:

2018-09-23 17:09:07,192 INFO org.apache.hadoop.yarn.server.resourcemanager.ResourceManager: STARTUP_MSG:
/************************************************************
STARTUP_MSG: Starting ResourceManager
STARTUP_MSG:   host = ubuntu-1cpu-40gb_ssd-2gb_ram-2tb_bw/127.0.1.1
STARTUP_MSG:   args = []
STARTUP_MSG:   version = 3.1.1
kg7wmglp

kg7wmglp1#

我修改了如下配置文件,现在6个进程和web界面都运行良好。
/etc/主机(本地pc/wsl)

127.0.0.1                localhost
(Server's external IP)   (Server's hostname)

127.0.1.1需要删除。
硕士学位:

(Server's external IP)

奴隶:

(Server's external IP)

工人:

(Server's external IP)

hdfs-site.xml:

<configuration>
  <property>
    <name>dfs.replication</name>
    <value>1</value>
  </property>
  <property>
    <name>dfs.namenode.name.dir</name>
    <value>(Hadoop Home Dir)/hdata/dfs/namenode</value>
  </property>
  <property>
    <name>dfs.datanode.data.dir</name>
    <value>(Hadoop Home Dir)/hdata/dfs/datanode</value>
  </property>
</configuration>

core-site.xml:

<configuration>
  <property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
  </property>
  <property>
    <name>hadoop.tmp.dir</name>
    <value>(Hadoop Home Dir)/hdata</value>
  </property>
</configuration>

mapred-site.xml:

<configuration>
  <property>
    <name>mapreduce.framework.name</name>
    <value>yarn</value>
  </property>
</configuration>

yarn-site.xml:

<configuration>
  <property>
    <name>yarn.nodemanager.aux-services</name>
    <value>mapreduce_shuffle</value>
  </property>
  <property>
    <name>yarn.nodemanager.aux-services.mapreduce.shuffle.class</name>
    <value>org.apache.hadoop.mapred.ShuffleHandler</value>
  </property>
</configuration>

相关问题