Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Celebrating as our community reaches 100,000 members! Thank you!
Labels (1)
avatar
Super Guru

When executing Step 3 of the Ambari installation wizard "Confirm Hosts", Ambari will (by default) SSH to each node and start an instance of the Ambari Agent process. In some cases, it is possible that the local RPM database is corrupted and this registration process will fail.

The error message in Ambari would look something like:

INFO:root:Executing parallel bootstrap
ERROR:root:ERROR: Bootstrap of host myhost.mydomain fails because previous action finished with non-zero exit code (1)
ERROR MESSAGE: tcgetattr: Invalid argumentConnection to myhost.mydomain closed.


STDOUT: Error: database disk image is malformed
Error: database disk image is malformedDesired version (2.5.0.0) of ambari-agent package is not available.

tcgetattr: Invalid argumentConnection to myhost.mydomain closed.

In this case, the local RPM database is malformed and all actions to alter the installed packages on the system will fail until the database is rebuilt.

This can be done by the following commands as root on the host reporting the error:

[root@myhost ~] # mv /var/lib/rpm/__db* /tmp
[root@myhost ~] # rpm --rebuilddb

Then, click the "Retry Failed Hosts" button in Ambari and the registration should succeed.

831 Views