Change the IP address of different servers
search cancel

Change the IP address of different servers

book

Article ID: 331271

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

  • Provide steps to change the IP address of a Smarts NCM Application Server (AS), Device Server (DS), and/or Reporting Server (RA).
  • Application Server is unable to communicate with a Device Server as IP of DS changed but AS has old entry in infraDB.
  • Login to NCM GUI fails as AS is unable to communicate with DB as IP of DB changed.

Environment

NCM - 10.1.x

Resolution

To change IP addresses of Smarts NCM Application Server, Device Server, and/or Reporting Server, please perform the following steps depending on Smarts NCM distributed environment.

NOTE: To complete the following procedure, root or administrator access is required to the Smarts NCM server(s).

======================================================================================================
Change IP address of APPLICATION SERVER (AS):
======================================================================================================

  1. Stop all the service as systemctl stop vcmaster 
  2. Replace the AS IP(s) in /etc/hosts
  3. Replace the IP(s) of the application server and the reporting server in the following file:
    $VOYENCE_HOME/ncmcore/webapps/voyence/powerup.jnlp
    Example:
    <property name="jnlp.server_ip" value="<NEW_AS_IP>"/> 
    <property name="jnlp.legacy_reports_advisor_url" value="https://<NEW_RA_IP>/web/"/>
  4. If the remote Device Server IP address has changed also, perform step 5, 6 and 7 explained below else it is safe to skip.

  5. Run commands:

    1. Set environmental variable as source /etc/voyence.conf

    2. Navigate to cgi-bin as cd $VOYENCE_HOME/cgi-bin

    3. Run ./cflist.cgi > AS.txt to extract infraDB

  6. Edit the AS.txt file and replace the IP address(es) of the device server(s) as follow:
    1. Every Device Server has a POP line entry in the infrastructure database. This line contains the IP Address that will need to be updated. Locate the POP entry line for Device Server which needs update.
      Example:
      POP 1000 "<DS_NAME>" NetList= RsrcList= DevList=1001,1002,1003 EmsList= : ADDR="<OLD_IP>" AGE_DAYS=730 CLEANUP_DAYS=90 AD_ENABLE=0 AD_ARPCACHE=0 AD_DFLTROUTE=0 AD_AUTO_RESOURCE=0 AD_DEFAULT_POLL=0 SNMP_TIMEOUT=500 SNMP_RETRY=3 CM_DEBUGSESSION=1 SORTCONFIG=1 CM_MAXMAINTASKS=20 CM_PULLTIMER=1200 MAX_COMM_ATTEMPTS="5" AD_BATCHSIZE=50 AD_NUMHOP=10 RECORDVER="1.0"
    2. Edit the IP of DS with NEW_DS_IP 
    3. Save the file.
  7. Run the command to save the config to infraDB ./cfwrite.cgi < AS.txt
  8. Replace the IP address of the Reporting Server and Application Server in Database server (DB) conf file:
    $VOYENCE_HOME/db/controldb/data/pg_hba.conf
  9. Replace the IP of the Application server for parameter listen_addresses in Database server:
    $VOYENCE_HOME/db/controldb/data/postgresql.conf
  10. Start the service as systemctl start vcmaster 

======================================================================================================
Change IP address of DEVICE SERVER (DS):
======================================================================================================

  1. Stop all the service as systemctl stop vcmaster
  2. Replace the DS IP(s) in /etc/hosts
  3. Follow steps 5,6 and 7 mentioned in above section ("Change IP address of APPLICATION SERVER (AS)")
  4. Replace the IP(s) of the application server in:
    $VOYENCE_HOME/data/devserver/master.addr
  5. Remove the .rhttps under the following directory:
    $VOYENCE_HOME/data
  6. Start the service as systemctl start vcmaster 

======================================================================================================
Change IP address of REPORTING SERVER (RA):
======================================================================================================

  1. Stop following service
    service httpd stop
    service tomcat stop
  2. Replace the RA IP(s) in /etc/hosts
  3. If the remote Remote Advisor then ensure that step 3 mentioned in above section ("Change IP address of APPLICATION SERVER (AS)") has been performed else it is safe to skip.
  4. Replace the IP(s) of the application server in the following file:
    $VOYENCE_HOME/web/conf/web.properties
  5. Restart the services:
    service httpd start
    service tomcat start

======================================================================================================
Change IP address of DATABASE SERVER (DB):
======================================================================================================

  1. Stop service as systemctl stop controldb
  2. Ensure that service in AS and RA are also stopped, refer above section ("Change IP address of APPLICATION SERVER (AS)" and "Change IP address of REPORTING SERVER (RA)") for respective service command.
  3. Replace the DB IP(s) in /etc/hosts 
  4. If the remote DB server then ensure that step 8 and 9 mentioned in above section ("Change IP address of APPLICATION SERVER (AS)") has been performed else it is safe to skip.
  5. Follow the below steps on the Application (AS) server
    1. Modify below line in /etc/controldb.conf file   
      DB_IP=<NEW_DB_IP>
    2. Modify below line in $VOYENCE_HOME/ncmcore/webapps/ncm-webapp/WEB-INF/classes/jdbc.properties file
      url=jdbc:postgresql://<<NEW_DB_IP>:5435/voyencedb
  6. Follow the below steps on the Report Advisor (RA):
    1. Modify below 2 lines in /opt/smarts-ncm/web/conf/web.properties     
      vc.jdbc.url=jdbc:postgresql://<NEW_DB_IP>:5435/voyencedb
      vcweb.jdbc.url=jdbc:postgresql://<NEW_DB_IP>:5435/voyencedb
  7. Complete the following commands on the respective servers:
    1. Application Server - systemctl start vcmaster 
    2. Database Server -  systemctl start controldb
    3. Report Advisor Server - service tomcat restart

Additional Information

Consider redistributing lockbox and unlock once IPs of other servers are updated.

Refer KB: Lockbox Utility Guide