Bug 1406165 - (hadoop-hdfs_network-online) hadoop-namenode listens on loopback interface
hadoop-namenode listens on loopback interface
Status: NEW
Product: Fedora
Classification: Fedora
Component: hadoop (Show other bugs)
27
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Christopher Tubbs
Fedora Extras Quality Assurance
:
Depends On:
Blocks: network-online.target
  Show dependency treegraph
 
Reported: 2016-12-19 16:20 EST by Christopher Tubbs
Modified: 2018-02-07 16:29 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Christopher Tubbs 2016-12-19 16:20:15 EST
Description of problem:
When the hadoop-namenode service is configured to start at boot (systemctl enable hadoop-namenode), it incorrectly binds to the loopback interface instead of the public interface. This is probably because the systemd unit file does not wait on the network interfaces to start up fully.

Version-Release number of selected component (if applicable):
hadoop-hdfs-2.4.1-24.fc25.noarch

How reproducible:
Almost always, after a reboot.

Steps to Reproduce:
1. systemctl enable hadoop-namenode
2. reboot
3. netstat -tlnp

Actual results:
the namenode is bound to 127.0.0.2

Expected results:
it should be bound to the IP address for the primary NIC

Additional info:
The namenode can be restarted after the system is fully up, and then it will correctly bind to the right interface.
Comment 1 Christopher Tubbs 2016-12-19 16:20:44 EST
It could also bind to 0.0.0.0 instead, which would make sense as a default.
Comment 2 Michal Ambroz 2017-11-06 15:16:15 EST
I guess this could very well be race condition with the network manager starting the network. During this race condition on a machine with more network cards the resolv of hostname could result in 127.0.0.2. 
Can you try changing the hadoop-hdfs.service from network.target to depend on network-online.target ?

Seems to affect rawhide / fedora 27 as well.

Note You need to log in before you can comment on or make changes to this bug.