Member since
03-22-2017
16
Posts
0
Kudos Received
0
Solutions
01-27-2021
11:17 AM
It is not recommended to update ambari DB directly but as in this case the cmd 'ambari-server update-host-names host_names_changes.json' is not a much help, we can perform below actions by taking ambari DB back up. I tested and it worked. Note: Please take DB backup! and PLEASE only do at your own risk. In this case, the new host_name is ambarinn.cluster.com and new name is ambarinn261.cluster.com We need to concentrate on the host_name that says healthStatus":"UNKNOWN". Steps to resolve: ambari-agent and ambari-server successfully stopped [root@ambarinn261 ~]# su - postgres Last login: Wed Jan 27 13:14:40 EST 2021 on pts/0 -bash-4.2$ psql psql (9.2.24) Type "help" for help. postgres=# \c ambari You are now connected to database "ambari" as user "postgres". ambari=# select host_id,host_name,discovery_status,last_registration_time,public_host_name from ambari.hosts; host_id | host_name | discovery_status | last_registration_time | public_host_name ---------+-------------------------+------------------+------------------------+------------------------- 201 | ambarinn261.cluster.com | | 1611772466200 | ambarinn261.cluster.com 1 | ambarinn.cluster.com | | 1611768543457 | ambarinn.cluster.com (2 rows) ambari=# select * from ambari.hoststate; agent_version | available_mem | current_state | health_status | host_id | time_in_state | maintenance_state -----------------------+---------------+---------------+----------------------------------------------+---------+---------------+------------------- {"version":"2.6.1.5"} | 279948 | INIT | {"healthStatus":"HEALTHY","healthReport":""} | 201 | 1611772466200 | {"version":"2.6.1.5"} | 2120176 | INIT | {"healthStatus":"UNKNOWN","healthReport":""} | 1 | 1611768543457 | (2 rows) ambari=# UPDATE ambari.hosts SET host_name='ambarinn261.cluster.com' WHERE host_id=1; ERROR: duplicate key value violates unique constraint "uq_hosts_host_name" DETAIL: Key (host_name)=(ambarinn261.cluster.com) already exists. ambari=# UPDATE ambari.hosts SET public_host_name='ambarinn261.cluster.com' WHERE host_id=1; UPDATE 1 ambari=# UPDATE ambari.hosts SET public_host_name='ambarinn261a.cluster.com' WHERE host_id=201; UPDATE 1 ambari=# UPDATE ambari.hosts SET host_name='ambarinn261a.cluster.com' WHERE host_id=201; UPDATE 1 ambari=# UPDATE ambari.hosts SET host_name='ambarinn261.cluster.com' WHERE host_id=1; UPDATE 1 ambari=# \q -bash-4.2$ exit logout [root@ambarinn261 ~]# ambari-server start
... View more
09-25-2017
04:15 PM
1 Kudo
Hi @Adrián Gil, Make sure that two kafka brokers are running. 1) Did you try restarting all the Kafka brokers from Ambari. 2) Do you see any alerts for Kafka brokers in the UI. If you do not see any alerts in the UI, please check if the brokers are actually running by running ps -ef | grep kafka Also, pass the znode while creating the topic. ie, --zookeeper bigdata:2181/kafka If this doesn't work, try running with replication factor as 1 just to confirm if it is the issue with create topics itself or the no of brokers. Thanks, Aditya
... View more