IBM Support

When Using HMC GUI you see message "Unable to connect to the Database Error occurred "

How To


Summary

When using HMC graphic user interface (GUI) to manage virtual networks or virtual storage on a managed system you might encounter a problem where you see a message, "Unable to connect to the Database Error occurred." The error is describing a message the HMC is getting back from one or more Virtual I/O Server (VIOS) lpars when its trying to access While you cannot proceed past this type of error in the HMC GUI you will have to take action on the VIOS lpars to fix the problem as the issue deals with VIOS not being able to parse data out of its Configuration Management Database (CMDB). Most of the time the issue can be resolved by properly configuring name resolution on VIOS and in cases where that has already been done you might have to take additional measures to deal with CMDB corruption.

Objective

Note: This document has been updated, use the following link to view the updated version.

The issues that need to be dealt with on VIOS include the following.

-- Configuring name resolution.
-- Stopping and starting VIO demons that are used to communicate with HMC.



Environment

IBM Power systems with VIOS 3.1 and higher managed by HMC running v8 or v9.

Steps

Part 1

The first step to resolving the "Unable to connect to database" error that the HMC is getting back from VIOS is to access VIOS as padmin then use oem_setup_env to become root and verify some basic configuration for name resolution.

a. Check both the /etc/hosts file as well as /etc/resolv.conf to determine how hostnames are configured and if DNS is setup.   

(1) Make sure /etc/hosts entries for loopback and that the VIOS hostname has following format.
IP FQDN alias

EXAMPLE: vios2 has IP 9.19.176.117 and domain is dfw.ibm.com
127.0.0.1               loopback localhost      # loopback (lo0) name/address
9.19.176.117            vios2.dfw.ibm.com   vios2 

(2) Make sure /etc/resolv.conf file contains the proper name server and domain search entries if the file exists.

(3) If using IPv4 addresses (common) then edit /etc/netsvc.conf and add following string at end of file.
hosts=local,bind4

b. Test resolution of names and IPs using nslookup if a name server is used in /etc/resolv.conf. 

(1) Test should be for both VIOS’s IP and hostname. 

(2) The return from name server should match what is configured on the /etc/hosts file.

(3) Fully qualified domain name (FQDN) is critical if using DNS so make sure  /etc/hosts file has FQDN since that will also be required on DNS servers.

(4) Use the “host” command on VIOS to check local resolver to see what its returning for hostname and IP if there is no /etc/resolv.conf file being used to designate a name server.

(5) Syntax for using nslookup and host command:
# nslookup 1.2.3.4
# nslookup myhostname.mydomain
# host 1.2.3.4
# host myhostname.mydomain

EXAMPLE: vios2 has IP 9.19.176.117 and domain is dfw.ibm.com
-- Run a reverse name lookup (query for IP in DNS database)
# nslookup 9.19.176.117
Server:         9.0.130.50
Address:        9.0.130.50#53
Non-authoritative answer:
117.176.19.9.in-addr.arpa       name = vios2.dfw.ibm.com.

-- Run a hostname lookup using FQDN
# nslookup vios2.dfw.ibm.com
Server:         9.0.130.50
Address:        9.0.130.50#53
Non-authoritative answer:
Name:   vios2.dfw.ibm.com
Address: 9.19.176.117
NOTE: both the hostname lookup and reverse name lookup returned the same information and this is what you need to see if DNS is configured (/etc/resolv.conf file exists and is configured properly)


-- Also check local name resolution using the host command

# host 9.19.176.117
vios2.dfw.ibm.com is 9.19.176.117
# host vios2.dfw.ibm.com
vios2.dfw.ibm.com is 9.19.176.117
NOTE: both queries returned same information.

c. Correct /etc/hosts and if needed get entries in DNS fixed till all checks return the same information when you lookup VIOS's IP and hostname.  

Part 2: Stop and start RSCT and VIO daemons

a. Using a script to stop and start VIOS as well as refresh CMdb is recommended

b. Use following site to obtain the script:

(1) Login with your IBM ID or as guest and download the script.  The current script as time of this printing is named "rebuild_cmdb_sequence.sh"

(2) The script is updated periodically.  So if you see a different script name than the one above you can use it instead. 

(3) Since it is a script you can inspect it first. If there is a readme document, then you can also review that.

c. Download the script and copy it to /home/padmin on VIOS

d. Become root on VIOS (oem_setup_env)

e. Set permissions on file so it will execute (chmod +x rebuild_cmdb_sequence.sh)

f. Execute the script (./rebuild_cmdb_sequence.sh).

g. Wait a few minutes then try using HMC GUI again to manage virtual storage or virtual network resources.

h.  If everything is working now you are done.

Part 3:  If error continues

Collect debug data and open a case with IBM Support (if not already open) to get additional help.

  1. Collect screen shots of the task being used and error received that show the navigation path to the task and time references.  Any information that can be captured as text output and provided to the case as text will expedite resolution so don't just rely on screen shots.
  2. Collect PE debug data from HMC as noted at HMC Enhanced View: Collecting PEDBG from the HMC
  3. Collect snap from the VIOS in question.
  4. Send the data to IBM for further analysis.



Document Location

Worldwide


[{"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"HW1A1","label":"IBM Power Systems"},"Component":"","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF041","label":"HMC"},{"code":"PF012","label":"IBM i"},{"code":"PF016","label":"Linux"}],"Version":"All Versions","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

More support for:
IBM Power Systems

Software version:
All Versions

Operating system(s):
AIX, HMC, IBM i, Linux

Document number:
1111155

Modified date:
24 September 2024

UID

ibm11111155

Manage My Notification Subscriptions