stackabletech / stackabletech/hdfs-operator
NameNode UI only listens on HOSTNAME:9870
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 53
- Forks
- 9
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 10
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the NameNode HTTP setup around DFSUtil.httpServerTemplateForNNAndJN and HttpServer2.bindListener, then compare it with the DataNode behavior reported from DatanodeHttpServer.start. Reproduce the requests to 127.0.0.1:9870 and the service hostname, and consider the issue done when the NameNode UI accepts localhost access and kubectl port-forwarding without requiring the pod hostname.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kubernetes
- Domain
- infrastructure, networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100