Changing the IP Address of a Node
Describes how to change the IP address of any node in the cluster using the CLI.
Changing the IP Address of a Data Node
About this task
Complete the following steps to change the IP address of a data node:
Procedure
-
Shut down Warden and ZooKeeper on the node to be changed.
service mapr-zookeeper stop service mapr-warden stop
- Change the IP address of the node.
-
Edit the
/etc/hosts
file on all nodes to reflect the IP address change, or ensure that the IP addresses are resolvable through a DNS search. - On the node where you changed the IP address, restart the network interface. The interface shuts down, so you lose the connection.
- Log into the node using the new IP address.
-
Check the IP address.
For example, run
ifconfig
. -
If the
MAPR_SUBNETS
environment variable is set, edit the value for theMAPR_SUBNETS
environment variable in the/opt/mapr/conf/env.sh
file and make sure that the new IP address is part of it.See Setting Environment Variables for NIC Segregation for more information. - Restart Warden on the node(s) where the IP address has changed.
-
Check that all nodes appear in the output of the node list command.
You might have to wait a few minutes until all nodes are registered before you get the output from this command./opt/mapr/bin/maprcli node list -columns ip
Changing the IP Address of CLDB Node
About this task
Complete the following steps to change an IP address of a CLDB node:
Procedure
-
Shut down Warden and ZooKeeper on the node to be changed.
service mapr-zookeeper stop service mapr-warden stop
- Change the IP address of the node.
-
Edit the
/etc/hosts
file on all nodes to reflect the IP address change, or ensure that the IP addresses are resolvable through a DNS search. - On the node where you changed the IP address, restart the network interface. The interface shuts down, so you lose the connection.
- Log into the node using the new IP address.
-
Check the IP address. For example, run
ifconfig
. -
Run
configure.sh
.Use the-C
option to provide a list of CLDB nodes.NOTEIf the initial setting was based on the IP address, run
configure.sh
on all nodes in the cluster.If the initial setting was based on the hostname, there is no need to run
configure.sh
on any nodes when you change the IP address. - Perform a rolling restart of Warden on all the nodes.
-
Check that all nodes appear in the output of the node list command. You might
have to wait a few minutes until all nodes are registered before you get output
from this command.
/opt/mapr/bin/maprcli node list -columns ip
Changing the IP Address of ZooKeeper Node
About this task
Complete the following steps to change an IP address of a ZooKeeper node:
Procedure
-
Shut down Warden and ZooKeeper on the node to be changed.
service mapr-zookeeper stop service mapr-warden stop
- Change the IP address of the node.
-
Edit the
/etc/hosts
file on all nodes to reflect the IP address change, or ensure that the IP addresses are resolvable through a DNS search. - On the node where you changed the IP address, restart the network interface. The interface shuts down, so you lose the connection.
- Log into the node using the new IP address.
-
Check the IP address.
For example, run
ifconfig
. -
Run
configure.sh
.Use the-Z
option to provide the list of ZooKeeper nodes.NOTEIf the initial setting was based on the IP address, run
configure.sh
on all the ZooKeeper, CLDB, and Data nodes in the cluster.If the initial setting was based on the hostname, there is no need to run
configure.sh
on any nodes when you change the IP address. -
If you run the Drillbit service on any nodes in the cluster:
-
Verify that the new node joined the ZooKeeper quorum.
service mapr-zookeeper status
- Perform a rolling restart of Warden on all the nodes.
-
Check that all nodes appear in the output of the node list command. You might
have to wait a few minutes until all nodes are registered before you get output
from this command.
/opt/mapr/bin/maprcli node list -columns ip