How to change the hostname of the eHealth server (Legacy KB ID CNC TS9672 )

Document ID : KB000023165
Last Modified Date : 14/02/2018
Show Technical Document Details

The following steps are required after changing an eHealth system's hostname:

  1. Stop the eHealth server processes
    nhServer stop (on Unix)

  2. The nh_machine table needs to be updated with the new hostname.

    *If the eHealth system in question is a stand-alone system, follow these steps:

    1. Open sqlplus as the $NH_USER
      sqlplus %NH_USER%/%NH_USER% (Windows)
      sqlplus $NH_USER/$NH_USER (UNIX)

    2. SQL>update nh_machine set name='<new hostname>';

      Example: if you changed the hostname from orange to apple, run the sql below:
      update nh_machine set name='apple';

    3. SQL>commit;
    4. SQL>exit

    *If the eHealth system in question is part of an eHealth cluster, follow these steps:

    1. Open sqlplus as the $NH_USER
      sqlplus %NH_USER%/%NH_USER% (Windows)
      sqlplus $NH_USER/$NH_USER (UNIX)
    2. SQL>update nh_machine set name='<new hostname>' where name='<old hostname>;
      Example: if you changed the hostname from orange to apple, run the sql below:
      update nh_machine set name='apple' where name='orange';
    3. SQL>commit;
    4. SQL>exit

  3. Update file $NH_ORACLE_HOME/network/admin/tnsnames.ora to reflect the new host name. Please note that there is a second copy of this file in $NH_HOME/client/network/ADMIN for eHealth versions 6.3.2.0 and above

    The tnsnames.ora file uses the format shown here, in which ${HOSTNAME} should be changed.

    ${HOSTNAME}_EHEALTH=
    (DESCRIPTION=
    (ADDRESS= (PROTOCOL = TCP) (HOST= ${HOSTNAME})(PORT = 1521))
    (CONNECT_DATA=(SID=EHEALTH))
    )

  4. Update file $NH_ORACLE_HOME/network/admin/listener.ora to reflect the new host name.
  5. Update the $NH_HOME/lmgr/license.dat file to new hostname as well.

    Modifying the hostname in the license.dat file is not mandatory, but it's a good practice to have correct and identical hostname in the license.dat file.

  6. The environment variable NH_DB_CONNECT_STRING consists of hostname_SID, thus this variable needs to be changed in the $NH_HOME/nethealthrc* files (Unix/Linux) or under Environment Variables in the System control panel (Windows). The same update is also required for NH_DB_CONNECT_STRING appearing in the /e.tc/init.d/httpd.sh file on Unix.

  7. Modify $NH_HOME/web/httpd/conf/httpd.conf with the new hostname (at the top of the file for the "ServerName" entry) and regenerate httpd.conf as instructed in the solution TEC519984

  8. Check $NH_HOME/web/tomcat/conf/server.xml for old hostname entries. If there are , change to the new hostname.

  9. If the eHealth system in question is part of an eHealth cluster, the cluster member table needs to be updated:
    nhModifyClusterMember -name <old hostname> -newName <new hostname> -all

  10. Restart the eHealth server processes
    nhServer start

NOTE:

Hostnames can contain characters such as A-Z, a-z, 0-9, dashes (-), and underscores (_). Hostnames cannot contain characters such as spaces and periods (.). If the hostname has invalid characters, change it before installing eHealth. This means that a fully qualified host name, such as 'apple.concord.com' is not supported. If you are using a fully qualified host name, please call CA eHealth Technical Support.