Created on 05-24-2018 12:54 PM - edited 08-17-2019 10:13 PM
Hi,
We have enabled the NN HA by appending the parameters in hdfs-site.xml and core-site.xml by using config.py. But active and standby namenode state is not showing up in ambari UI. Please find the details below.
Parameters:
hdfs-site.xml:
"ha.zookeeper.quorum":"master.wpm.com:2181,wpm111.wpm.com:2181,wpm333.wpm.com:2181" "dfs.ha.automatic-failover.enabled":"true" "dfs.ha.fencing.methods":"shell(/bin/true)" "dfs.client.failover.proxy.provider.mycluster":"org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider" "dfs.namenode.shared.edits.dir":"qjournal://master.wpm.com:8485;wpm111.wpm.com:8485;wpm333.wpm.com:8485/mycluster" "dfs.namenode.http-address.mycluster.nn2":"wpm111.wpm.com:50070" "dfs.namenode.http-address.mycluster.nn1":"master.wpm.com:50070" "dfs.namenode.rpc-address.mycluster.nn2":"wpm111.wpm.com:8020" "dfs.namenode.rpc-address.mycluster.nn1":"master.wpm.com:8020" "dfs.namenode.https-address.mycluster.nn2": "wpm111.wpm.com:50470", "dfs.namenode.https-address.mycluster.nn1": "master.wpm.com:50470" "dfs.ha.namenodes.mycluster":"nn1,nn2" "dfs.nameservices":"mycluster"
core-site.xml
"fs.defaultFS" : "hdfs://mycluster/"
Service State:
[hdfs@WPM0 0]$ hdfs haadmin -getServiceState nn1 standby [hdfs@WPM0 0]$ hdfs haadmin -getServiceState nn2 active
Please find the ambari UI, Namenode UI and custom hdfs-site.xml screenshot here
I could see a few warning and errors in ambari-server log.
24 May 2018 21:08:08,401 WARN [ambari-client-thread-71] Errors:173 - The following warnings have been detected with resource and/or provider classes: WARNING: A HTTP GET method, public javax.ws.rs.core.Response org.apache.ambari.server.api.services.TaskService.getComponents(java.lang.String,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), should not consume any entity. WARNING: A HTTP GET method, public javax.ws.rs.core.Response org.apache.ambari.server.api.services.TaskService.getTask(java.lang.String,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo,java.lang.String), should not consume any entity. 24 May 2018 21:08:27,654 WARN [ambari-client-thread-71] Errors:173 - The following warnings have been detected with resource and/or provider classes: WARNING: A HTTP GET method, public javax.ws.rs.core.Response org.apache.ambari.server.api.services.WidgetService.getServices(java.lang.String,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), should not consume any entity. WARNING: A HTTP GET method, public javax.ws.rs.core.Response org.apache.ambari.server.api.services.WidgetService.getService(java.lang.String,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo,java.lang.String), should not consume any entity. 24 May 2018 21:08:27,785 WARN [ambari-client-thread-71] Errors:173 - The following warnings have been detected with resource and/or provider classes: WARNING: A HTTP GET method, public javax.ws.rs.core.Response org.apache.ambari.server.api.services.WidgetLayoutService.getServices(java.lang.String,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo), should not consume any entity. WARNING: A HTTP GET method, public javax.ws.rs.core.Response org.apache.ambari.server.api.services.WidgetLayoutService.getService(java.lang.String,javax.ws.rs.core.HttpHeaders,javax.ws.rs.core.UriInfo,java.lang.String), should not consume any entity. 24 May 2018 21:08:29,972 INFO [ambari-client-thread-71] StackAdvisorRunner:47 - Script=/var/lib/ambari-server/resources/scripts/stack_advisor.py, actionDirectory=/var/run/ambari-server/stack-recommendations/3, command=recommend-configurations 24 May 2018 21:08:29,976 INFO [ambari-client-thread-71] StackAdvisorRunner:61 - Stack-advisor output=/var/run/ambari-server/stack-recommendations/3/stackadvisor.out, error=/var/run/ambari-server/stack-recommendations/3/stackadvisor.err
Could you please help on this.
Thanks,
Created 05-25-2018 01:04 PM
@Sampath Kumar :
It looks like namenode is not installed on one of the hosts configured for namenode HA. Check both the hosts where you are trying to configure nn1 and nn2, and install the namenode on the host where it is not installed.
curl -u <ambari_user>:<ambari_password> -H "X-Requested-By:ambari" -i -X POST http://<ambari-port>:<ambari-port>/api/v1/clusters/<cluster_name>/hosts/<host_name>/host_components/...
Created 05-25-2018 01:04 PM
@Sampath Kumar :
It looks like namenode is not installed on one of the hosts configured for namenode HA. Check both the hosts where you are trying to configure nn1 and nn2, and install the namenode on the host where it is not installed.
curl -u <ambari_user>:<ambari_password> -H "X-Requested-By:ambari" -i -X POST http://<ambari-port>:<ambari-port>/api/v1/clusters/<cluster_name>/hosts/<host_name>/host_components/...