Support Questions
Find answers, ask questions, and share your expertise

CDH4 VM IP address changes causing cluster problems

New Contributor

Hello,

I recently started using the CDH4 VM. Because of some changes and file additions to the image, I've decided to make a copy of this VM for later use. I have tried to use the saved copy now, but none of the services comes up. After some digging, I've noticed that the IP address assinged to the VM has changed, hence the SCM agent does not recognize the host and in the Cloudera Manager HOSTS tab, the ip address is different from the hostname, so none of the services come up.

 

Also, I've noticed that any subsequent copies of this VM image, generates a different IP address, hence making the cluster not accessible.

 

 

Is there any way to change the new ip address on the cloudera manager to reflect the new ip address?? or is there a way to keep  the VM copy from generating a new ip address?? 

 

I am using VMware player 6.0.2 to start these images. Here a sample of the problem.

 

[root@localhost cloudera]# itconfig

eth2 Link encap:Ethernet Hwaddr OO:OC:29:C7:29:32

met addr: 192. 168.6.134 Bcast: 192.168.6.255 Mask:255.255.255.O

 

Cloudera Manager Hosts Tab Entry

localhost.localdomain 192.168.6.1 28 /default unknown Cluster 1 - CDH4 b20 Role(s) O Concerning Health

 

 

Your feedback is much appreciated

8 REPLIES 8

Re: CDH4 VM IP address changes causing cluster problems

Expert Contributor
Use static ip address all the time while trying to setup the hadoop cluster.

Try using the same ip address and assign the hostname to the ipaddress.
Em Jay

Re: CDH4 VM IP address changes causing cluster problems

Explorer

@Manikumar : Can you please list out the steps needed to set up a static ip. I tried doing that in another system, but somehow ended up not being able to use the internet anymore. It would be helpful if someone using Cloudera can list the necessary steps to set up Static ip.

Re: CDH4 VM IP address changes causing cluster problems

Expert Contributor

If you are using centos or redhat

edit the file /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0

BOOTPROTO=static

GATEWAY=192.168.1.1

IPADDR=192.168.1.54

BROADCAST=192.168.1.255

NETMASK=255.255.255.0

ONBOOT=yes

If you see any other properties in the file don't delete them

 

if you are using ubuntu

edit the filel in /etc/network/interfaces

 iface eth0 inet static
     address 192.168.1.10
     network 192.168.1.0
     netmask 255.255.255.0
     broadcast 192.168.1.255
     gateway 192.168.1.254

 

After making the above changes, check your /etc/resolv.conf

add your nameservers like the following

 

nameserver 192.168.1.1

nameserver 8.8.8.8

 

 

And final step restrat the networking services

 

/etc/init.d/network/restart   for redhat/centos

 

service networking restart    for ubuntu

 

Em Jay

Re: CDH4 VM IP address changes causing cluster problems

Explorer

Should the broadcast and nameserver value be same?

You have tha same for Redhat and not for Ubuntu. Hence asking.

Re: CDH4 VM IP address changes causing cluster problems

Expert Contributor

broadcast and nameserver values are different always...

Em Jay

Re: CDH4 VM IP address changes causing cluster problems

New Contributor

Thanks for your post, nice information about login into admin panel trick but there are numerous of IP address which allows you to change your admin username and password. 192.168.254.254 is private IP address which comes a certain credential along with them to protecting your network that nobody unknown person can conflict your home network.

 

In case of your network loss your web connection, then what to do for accessing your network again and how to recover my admin password, username, router setting, and additional troubleshooting. Here is some IP address you can pick up them out of one according to your IP address and go to additional setting. 192.168.254.254, 192.168.1.254, 192.168.100.1, 192.168.10.100

Re: CDH4 VM IP address changes causing cluster problems

Explorer

@Manikumar - Thanks for replying.This is my terminal:

[Piyush@redhatcdh4_1 ~]$ cat /etc/sysconfig/network-scripts/ifcfg-eth0 
DEVICE=eth0
HWADDR=00:0C:29:BE:52:B7
TYPE=Ethernet
UUID=8bd6e426-9bad-4f0c-a098-9345e1d51bfa
ONBOOT=yes
NM_CONTROLLED=no
BOOTPROTO=static
IPADDR=192.168.31.217
NETMASK=255.255.255.0
BROADCAST=192.168.1.255
[Piyush@redhatcdh4_1 ~]$ cat /etc/resolv.conf # Generated by NetworkManager nameserver 192.168.31.2 nameserver 8.8.8.8 # No nameservers found; try putting DNS servers into your # ifcfg files in /etc/sysconfig/network-scripts like so: # # DNS1=xxx.xxx.xxx.xxx # DNS2=xxx.xxx.xxx.xxx # DOMAIN=lab.foo.com bar.foo.com [Piyush@redhatcdh4_1 ~]$ cat /etc/sysconfig/network NETWORKING=yes HOSTNAME=redhatcdh4_1 GATEWAY=192.168.31.2 NTPSERVERARGS=iburst [Piyush@redhatcdh4_1 ~]$ /etc/init.d/network/restart bash: /etc/init.d/network/restart: Not a directory [Piyush@redhatcdh4_1 ~]$ /etc/init.d/network restart [Piyush@redhatcdh4_1 ~]$ ifconfig lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:444 errors:0 dropped:0 overruns:0 frame:0 TX packets:444 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:35256 (34.4 KiB) TX bytes:35256 (34.4 KiB)

 I do not have any network (like eth0) on my RedHat. Hence, unable to connect.

Can you point out what is wrong?

Re: CDH4 VM IP address changes causing cluster problems

Expert Contributor

I'm sorry about that, I thought you are using a standalone server...

 

Since you are using the virtual machine, please check your settings whiole you create your VM. There might be something that allow you to configure the static IP for VM's.

 

Em Jay