Network Manager overriding /etc/hosts file

4

I believe the network manager service on Oracle Linux 6 is causing problems for the clouder-scm-agent which is running on my machine. The clouder-scm-agent starts up on the server ip it resolves from looking at /etc/hosts and on restart the network manager seems to be adding unwanted entry in the hosts file causing my cloudera-scm-agent to start on 127.0.0.1:9000 port rather than 10.240.190.43:9000 on which the cloudera-scm-server excepts it to start on.

The reason i want to disable network manager is because it seems to be modifying the /etc/hosts file even if i have set read only permission to my /etc/hosts. My /etc/hosts looks like this

127.0.0.1   localhost.localdomain   localhost
10.240.190.43   slc04vvo.internal.com   slc04vvvo

on restarting Oracle Linux Server 6 it adds

127.0.0.1       slc04vvo localhost.localdomain localhost
::1     localhost6.localdomain6 localhost6

My hostname is

hostname
slc04vvo

Of the two additions happening here , i would not want the hostname to be an existing 127.0.0.1 entry and also i dont want the ipv6 localhost6 entry to be added.

Anyone has any pointers on why this is happening ?

Is there a good documentation some one can point as to what is the role of network manager service in linux and if i disable network manager service across reboots what are the other steps i need to take (what other files i need to modify with static information ) so that i am not affected with disabling network manager.

thanks.

Yatin

Posted 2013-04-08T04:22:20.417

Reputation: 171

Sounds like the wrong solution. You'll want to modify the config file for the clouder-scm-agent not the hosts file. – Matt H – 2013-04-08T04:27:02.180

Looks like the settings file is /etc/cloudera-scm-agent/config.ini – Matt H – 2013-04-08T04:32:35.527

Hi , yes i have seen this file in which i can change few properties , but i believe the first problem i need to solve is the automatic overwrite of /etc/hosts which leads my agent to be started on ipv6 address or the 127.0.0.1 address. How would i go about making sure in linux the hosts file is not overwritten everytime i restart ? – Yatin – 2013-04-08T04:39:54.560

Answers

2

I believe you are being bitten by this bug (like the rest of us). Oracle/Red Hat are two years off the pace at picking this up - if anybody's running a recent (! fc13+) version of fedora to confirm NetworkManager has improved, 'twould be useful feedback.

In general, the NetworkManager doc is on the gnome site, and should be definitive, but they'll be more focussed on the current bleeding edge rather than the versions we're stuck with in the enterprise/mainstream/stable distros.

tryingToBeClever

Posted 2013-04-08T04:22:20.417

Reputation: 140