Support Questions
Find answers, ask questions, and share your expertise

Ambari Hosts Tab does not show hosts

Re: Ambari Hosts Tab does not show hosts

I can see from the other Rest API calls one of the decommissioned node is still present and status is UNKNOWN.Does that mean the host table in ambari db is stale ?? If yes what needs to be done

Re: Ambari Hosts Tab does not show hosts

@nshelke I ran the select * from hosts. I have found some hostnames which should not be present in the hosts table. How should i proceed in correcting them.

Re: Ambari Hosts Tab does not show hosts

@nshelke I ran select * from hosts and i have some unwanted hosts in the table which defnitely show that it is inconsistent. Can you please help me as in what should i do?

Re: Ambari Hosts Tab does not show hosts

@nshelke How can we rectify these inconsistencies in ambari db

Re: Ambari Hosts Tab does not show hosts

Explorer

@sparkifyed , see if you can login to decommission node and see if ambari-agent is stopped on that server. If not stop all hadoop services on decommission node and see if you are able to view "hosts" in Ambari.

It may be possible that Amabri-server is trying to connect to decommission server every time and hangs in between. Open a case with Hortonworks , if it is impacting your production system.

Regards,

Fahim

Re: Ambari Hosts Tab does not show hosts

Well I fixed this issue eventually by checking the ambari database hosts and one more table relating to hosts and have seen inconsistencies in the table.i have deleted the entries using the curl commands and restarted ambari and hosts tab works now. Before doing this I have checked the browser developer tools and seen the response where it is failing from the up part which also helped me to figure this issue. Hope it helps someone

Re: Ambari Hosts Tab does not show hosts

New Contributor

I too had this issue on HDP 2.6

ambari-server.log reported

ERROR: invalid page header in block 13760 of relation base/16995/67484

Just below that error, there was the query which threw that error. Runnig the same on Postgre threw the same error.

In my case ambri.alert_history was corrupt.

Below step fixed the issue

database=# SET zero_damaged_pages = on;
SET
database=# VACUUM FULL damaged_table;
WARNING: invalid page header in block 13748 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13749 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13757 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13758 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13759 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13760 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13762 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13782 of relation base/16995/67484; zeroing out page
(...)
WARNING: index "damaged_table_site_id" contains 14697831 row versions, but table contains 14709258 row versions
HINT: Rebuild the index with REINDEX.
WARNING: invalid page header in block 13762 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13816 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13817 of relation base/16995/67484; zeroing out page
WARNING: invalid page header in block 13818 of relation base/16995/67484; zeroing out page
(...)
WARNING: index "damaged_table_site_id" contains 14697498 row versions, but table contains 14709258 row versions
HINT: Rebuild the index with REINDEX.
VACUUM

database=# REINDEX TABLE damaged_table;