Question
· Dec 6, 2022

How does InterSystems IRIS determine it's hostname for $System / $System.INetInfo.LocalHostName()?

We have a UNIX VM with an InterSystems IRIS instance which we cloned for testing purposes, and we have found that $System (which is used for self-identification in email notifications) is still showing the hostname of the original VM, rather than the hostname of the cloned VM.  This is coming from $System.INetInfo.LocalHostHame().

Does anyone know what you need to change on a UNIX clone in order for it to display the appropriate new host name in $System?  

Product version: IRIS 2022.1
Discussion (1)1
Log in or sign up to continue

As we looked into things further on our side, it appears as though the UNIX 'hostname'.  We were able to resolve the issue in UNIX by doing the following to change the hostname to 'mynewhost':

log in as root
hostname mynewhost
echo mynewhost > /etc/hostname

The 2nd line will change the hostname in the current processes, and the 3rd will make sure that the change will persist during a reboot.  

Hope this is helpful to someone else.