how i change single node cluster loopback ip address?

Hi, I have a single node cluster that is installed on localhost now I want to change the IP address of my cluster(consist of a single node). So kindly suggest me how I achieve this task.Thanks in advance

Answers

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited December 2018

    Check out the doc page "Mapping New IP Addresses:"

    https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/AdministratorsGuide/ManageNodes/ReMapIPs/ReMapIPOverview.htm

    Example:

    [dbadmin@vertica9 ~]$ vsql -c "SELECT node_name, node_address, export_address FROM nodes;"
          node_name       | node_address | export_address
    ----------------------+--------------+----------------
     v_test_reip_node0001 | 127.0.0.1    | 127.0.0.1
    (1 row)
    
    [dbadmin@vertica9 ~]$ cat mapfile.txt
    127.0.0.1 192.168.2.210
    
    [dbadmin@vertica9 ~]$ admintools -t stop_db -d test_reip
    Info: no password specified, using none
            Connecting to database
            Issuing shutdown command to database
    Database test_reip stopped successfully
    
    [dbadmin@vertica9 ~]$ admintools -t re_ip -f mapfile.txt
    Parsing mapfile ...
    New settings for Host 127.0.0.1 are:
      address: 192.168.2.210
      controlAddress: 192.168.2.210
      controlBroadcast: 192.168.2.255
    
    The following databases would be affected by this tool: test_reip
    Checking DB status ...
    
    Please check your new settings carefully, incorrect settings may cause database damage!
    Enter "yes" to write new settings or "no" to exit > yes
    Backing up local admintools.conf ...
    Writing new settings to local admintools.conf ...
    
    Writing new settings to the catalogs of database test_reip ...
    The change was applied to all nodes.
    Success. Change committed on a quorum of nodes.
    You can start database test_reip again.
    
    Initiating admintools.conf distribution ...
    Success. Local admintools.conf sent to all hosts in the cluster.
    

    Write new settings successfully.

    [dbadmin@vertica9 ~]$ admintools -t start_db -d test_reip
    Info: no password specified, using none
            Starting nodes:
                    v_test_reip_node0001 (192.168.2.210)
            Starting Vertica on all nodes. Please wait, databases with a large catalog may take a while to initialize.
            Node Status: v_test_reip_node0001: (DOWN)
            Node Status: v_test_reip_node0001: (DOWN)
            Node Status: v_test_reip_node0001: (DOWN)
            Node Status: v_test_reip_node0001: (DOWN)
            Node Status: v_test_reip_node0001: (UP)
    Database test_reip: Startup Succeeded.  All Nodes are UP
    
    [dbadmin@vertica9 ~]$ vsql -c "SELECT node_name, node_address, export_address FROM nodes;"
          node_name       | node_address  | export_address
    ----------------------+---------------+----------------
     v_test_reip_node0001 | 192.168.2.210 | 192.168.2.210
    (1 row)
    
  • edited December 2018

    Thanks Jim for your response I will implement this and give feedback about this solution.

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    Which version of Vertica are you running? This feature was first implemented in Vertica 8.1.1.

    See:
    https://www.vertica.com/docs/8.1.x/HTML/index.htm#Authoring/NewFeatures/8.1/8.1.1/Database.htm

  • I use Vertica Analytic Database v7.2.1-0 version

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    Hi,

    Unfortunately it is not as easy to re-ip a node prior to Vertica 8.1.1 and Vertica 7.2.1-0 isn't supported anymore.

    For suggested instructions see this post:

    https://forum.vertica.com/discussion/238708/how-to-change-ip-address-of-node

    If you can wait I can test these commands later this afternoon (i.e. around 3 PM EST) and let you know if it works. I'd hate for you to mess up your database! MAKE SURE YOU TAKE A BACKUP if you decode to try.

  • Jim_KnicelyJim_Knicely - Select Field - Administrator
    edited December 2018

    @Imran_Shabbir -

    I installed Vertica 7.2.1-0 on a VM using the loopback address of 127.0.0.1.

    dbadmin=> SELECT version();
                  version
    ------------------------------------
     Vertica Analytic Database v7.2.1-0
    (1 row)
    
    dbadmin=> SELECT NODE_NAME, NODE_ADDRESS FROM NODES;
          NODE_NAME       | NODE_ADDRESS
    ----------------------+--------------
     v_test_reip_node0001 | 127.0.0.1
    (1 row)
    
    dbadmin=> ALTER NODE v_test_reip_node0001 HOSTNAME '192.168.2.210';
    ROLLBACK 4145:  Node is active and cannot be altered
    

    As you can see you won't be able to use this method to alter the IP address of a single node cluster.

    Been a while since I used Vertica 7.2!

    Anyway, beyond using the catalog editor, it should be possible to add 2 nodes to the DB, then offline the original node, change the IP, then remove the 2 nodes you added... A lot of work!

    Any change you can upgrade to 8.1.1?

  • But we can't add more nodes because of the loopback IP. And this is mention in vertica documentation.

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    Oh, yeah, forgot about that! :s

    Can you stand up another node with the correct IP and just do a COPY from Vertica?

    See:
    https://www.vertica.com/docs/9.2.x/HTML/Content/Authoring/SQLReferenceManual/Statements/EXPORTTOVERTICA.htm

    Or if the database isn't that big, stand up anther node with correct IP then export the catalog and table data and simply bulk load it into the new node.

  • No, I can't stand up with another node and I have to change the loopback IP address of my existing node.

  • Jim_KnicelyJim_Knicely - Select Field - Administrator

    Is this a production class database?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file