Support Questions

Find answers, ask questions, and share your expertise
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

Host file

Hi gurus,


Is there a way to identify which is the address to set in the host file? I am trying with and I am getting errors, all the time. I would like to set an address and be able to configure the node in cloudera manager.


Thanks a lot,





were you able to fix it ? if not i can help you  that

No, i could not.


I don´t know which is the address that I have to set in the host file.


If you could help me it would be great.






Gotcha . its just matter of two files that you need to tweak.

are you plaining to perform single node or multi node cluster ? 

it will be a 2 node cluster.


I assume you are using vm . 

so edit the file accordingly , to perform the SSH configuration follow the link 


On both the nodes . 


/etc/hosts    master    slave

On the master node



on the slave node




Below is the best link to walk through the rest of the configuration ,mate

thanks. what if i am using a single node cluster?


Thanks a lot!




if you are plaining for Single node cluster ,

then just the hostname would be of your choice . 


/etc/hosts   Hello


You have to configure Yum repository , MR2 yarn setup - the below is good link from Cloudera for Single node cluster setup .



Great, i will try it. Then with this information, which is the IP that I should look for specifying the hosts? Is this the same that I specified in the hosts file?


Thanks a lot,




@mercedes012345 The hosts file is a mapping between IPs and hostnames. Each lines corresponds to a single entry. The first column if for the IP address, the second column is for the fully qualified domain name, and the last column is for the hostname (columns can be separated by spaces or tabs).


You can have as many entires as needed. I honestly haven't done an install that didn't use DNS first, but unless my memory is failing all hosts need to be resolve each other. So if you are only using hosts files for name resolution you need to include all hosts in the cluster.


@csguna provided some examples. I would flesh it out by include all three columns


/etc/host  master  worker

The hostname in the network file should be in the format of


@mbigelow  it come be a dumb question please bear with me . 

is it mandatory to use  fully qualified domain name ? because we dont not mention them in any of the hadoop configuration files. when it comes to networking not really my area. could you clarify 

@csguna no it isn't a requirement. They just all need to resolved the same on all hosts. For me it is about keeping it within enterprise standards and like I said I usually use DNS, which usually contains multiple zones. As a user of it, it find it cleaner to have and . use the FQDN versus just the hostname when it comes to the URLs (although alias can be used as well).



Just a question, file /etc/sysconfig/network does not exist, should I create from scratch?


which operating system are you using ?

if you are using ubuntu

it should be




if you are using Centos do an ls command - below directory


you should see one as network .

I am using Ubuntu 14.04. I have a a folder with name /etc/network but no file inside. Should I directly create it? How should I name it?


Thanks a lot,


Kind regards,


if you want to change the hostname then do either one of the following 

sudo nano /etc/hostname


sudo vi  /etc/hostname

then restart the machine 


to check your hostname after restart - open the terminal and type 



To configure IP address do the following 


sudo nano /etc/hosts

I have already done this and after checked those file, I can see that the host has changed.


However, I can´t still access to cloudera manager there something else I should do?


Thanks a lot,


Kind regards,


are you using vm ?

what error are u getting when you try to hit cloduera manager ? 

Ok, the hosts file on the cluster nodes doesn't impact the CM UI. Check the CM logs for any errors (/var/log/cloudera-scm-server/).

Get the IP address from the CM host and use that in the URL (http://<cm_ip>:7180). You can also verify that CM is runnning (ps -ef | grep cloudera-scm-server) and that it is listening on the right port (sudo netstat -alpn | grep :7180). You can also try access it from the CM host itself (curl http://localhost:7180).

That will help to see if it is working without messing with name resolution.


@mbigelowThanks for the information , will follow the same and adher the  standards.

Oh, if you are searching within CM for hosts to install the agent on, include all IPs for each hosts, which would be the ones you entered into the hosts for all hosts.
Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.