This documentation relates to the latest released version of BMC Discovery.
See the information on this topic for versions 11.0 or 10.2.

Changing the appliance hostname

The netadmin user is the preferred way of configuring networking

The preferred way of administering any of the appliance network configuration is to use the netadmin user account. The netadmin user account enables you to change network, hostname and gateway settings without requiring root privileges. You can also use the netadmin user to reboot the appliance.

This section describes how to set the appliance hostname and to ensure that it is locally resolved even if the IP address of the appliance changes.

You can set the hostname either locally, or using DHCP/DNS.

 

Impact of your configuration changes

After changing the hostname, if the appliance belongs to a cluster you must change its address using Cluster Management. If the appliance is not clustered, you must delete the /usr/tideway/etc/cluster.conf file and either restart the cluster services or reboot. The file is recreated with the new hostname.

To set the hostname locally

If you want the appliance to use the same hostname for all NICs, set the hostname in the /etc/sysconfig/network file.
If you want to use different hostnames for individual NICs, set the hostname in the /etc/sysconfig/network-scripts/ifcfg-ethX file. X is the number of the interface, for example eth0.

Add the following line to the file:

HOSTNAME=london01

where london01 is the new hostname.

If you do not have a DNS entry for the host, or you require a failsafe when DNS is unavailable, enter the hostname and FQDN in the etc/hosts file. Use the appliance IP address if it is unlikely to change, or a loopback IP address other than 127.0.0.1 (which can interfere with the resolution of localhost and localdomain.

The following example uses london01 as the hostname, london.com as the domain name, and 192.168.0.100 as the IP address. Add only one of the example entries.

127.0.0.1           localhost.localdomain localhost
::1                 localhost6.localdomain6 localhost6

### Enter either this line if the IP address is known
192.168.0.100       london01.london.com london01

### Or this line to use a loopback address
127.0.0.2           london01.london.com london01

The following example uses the same host and domain names as above and shows commands to enter to ensure that the hostname is set correctly:

[tideway@london01 ~]$ hostname
london01
[tideway@london01 ~]$ hostname --domain
london.com
[tideway@london01 ~]$ hostname --fqdn
london01.london.com
[tideway@london01 ~]$ ping `hostname`
PING london01 (192.168.0.100) 56(84) bytes of data.
64 bytes from london01 (192.168.0.100): icmp_seq=1 ttl=64 time=0.050 ms
64 bytes from london01 (192.168.0.100): icmp_seq=2 ttl=64 time=0.047 ms
64 bytes from london01 (192.168.0.100): icmp_seq=3 ttl=64 time=0.042 ms
64 bytes from london01 (192.168.0.100): icmp_seq=4 ttl=64 time=0.041 ms

--- london01 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3002ms
rtt min/avg/max/mdev = 0.041/0.045/0.050/0.003 ms
[tideway@london01 ~]$

To set the hostname using DHCP/DNS

Some networks are configured so that you can set your own hostname and update the DHCP and DNS servers accordingly.

To enable this for all NICs, set the DHCP_HOSTNAME in the /etc/sysconfig/network file.
To enable this for individual NICs, set the DHCP_HOSTNAME in the /etc/sysconfig/network-scripts/ifcfg-ethX file.
Where, X is the number of the interface. For example, eth0.

The following example uses london01 as the hostname and london.com as the domain name.

DHCP_HOSTNAME=london01.london.com

When the appliance renews its IP address with the DHCP server, the DHCP server will also update the DNS server with the hostname and IP address of the appliance.

Diagnosing hostname problems

Some issues are indicative of incorrectly configured hostnames.

Visualizations and export do not display

This problem can be identified if you see a 500 Error - Internal Server Error! page in the user interface (UI) when attempting to load visualizations. You will also see the following error message in $TIDEWAY/tomcat/logs/catalina.out:

java.net.UnknownHostException: local_hostname: local_hostname

where, local_hostname is the hostname set on the computer.

To resolve this problem, see the previous section, Setting the hostname locally.

Cannot access the UI — 500 internal server error

This error can have many causes, as it results from one or more of the tideway services failing to start. A common cause however is that localhost cannot be resolved. If this is the case errors of the following form are displayed when restarting the tideway services.

[current date/time] [error] couldn't resolve WKServer address
[current date/time] [error] Couldn't resolve hostname for WebKit Server

  • No labels

© Copyright 2003-2017 BMC Software, Inc.

Legal notices