Skip to content

NameNode UI only listens on HOSTNAME:9870 #438

Description

@siegfriedweber

The UI of the NameNode is only accessible via http://HOSTNAME:9870/ but not localhost or 127.0.0.1.

Port-forwarding with kubectl does not work and proxies, like the oauth-proxy, must specify the hostname.

NameNode logs:

INFO  hdfs.DFSUtil (DFSUtil.java:httpServerTemplateForNNAndJN(1716)) - Starting Web-server for hdfs at: http://simple-hdfs-namenode-default-0.simple-hdfs-namenode-default.default.svc.cluster.local:9870
INFO  http.HttpServer2 (HttpServer2.java:bindListener(1355)) - Jetty bound to port 9870

Trying to access the UI on 127.0.0.1:

$ kubectl exec -ti simple-hdfs-namenode-default-0 -c namenode -- curl -L -I http://127.0.0.1:9870/
curl: (7) Failed to connect to 127.0.0.1 port 9870: Connection refused

On the other hand, the UI of the DataNode listens on 0.0.0.0:

INFO  web.DatanodeHttpServer (DatanodeHttpServer.java:start(318)) - Listening HTTP traffic on /0.0.0.0:9864

and can be accessed via 127.0.0.1:

$ kubectl exec -ti simple-hdfs-datanode-default-0 -c datanode -- curl -L -I http://127.0.0.1:9864/
HTTP/1.1 302 Found

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions