If the hostname of a Variphy OVA server is changed with the Hostname command, Variphy may fail to launch afterward.
After the server is rebooted, or the Variphy service is restarted, it may fail to load the Variphy application login page with an Apache Tomcat error.
You can confirm if this is due to changing the hostname by searching the output.log file in /opt/variphy/apps/insight/logs for the phrase “java.net.UnknownHostException”.
It should reference the old hostname afterward, e.g. if you changed the hostname from Variphy1 to Variphy2, you would see an error like this:
“java.net.UnknownHostException: Variphy2: Variphy2: unknown error”
This occurs because the hosts file still shows the old server name of Variphy1 and doesn’t know how to resolve the new name.
The hostname and hosts file can be changed with the following steps, and be applied without rebooting the server:
Step 1) In the command line, enter the following command
sudo hostname (insert-new-name-here)e.g sudo hostname Variphy123
Step 2) Edit the hostname file in /etc/hostname with the following steps:
sudo vi hostname
Use SHIFT + R to enter insert mode and type the new hostname over the existing one.
Once the new hostname has been entered, press ESC followed by SHIFT + :
type x! to save changes and exit.
Step 3) Although this will change the hostname of the server successfully, the hosts file will still contain the old host name file, which may cause the above error to occur when launching Variphy.
To fix this, follow the same steps as Step #2, only edit the hosts file instead of the hostname file.
sudo vi hosts
Step 4) Once the hosts file has been saved with the new hostname, restart the variphy service:
sudo sh variphy restart
Upon restarting, the Variphy web interface should load normally after a moment or two.