Ambari Metrics Monitor-401 Error sending metrics to server

After enabling Kerberos and HTTP authentication on Hadoop, we recently ran into errors gathering memory, network, and CPU metrics with Ambari Metrics Collector. While all services turned on, the ambari-metrics-collector.log reported:

“Error sending metrics to server – 401 authentication required”

It seems that the metrics collector does not yet support SPNEGO authentication and there is an open JIRA issue. In order to resolve this, we needed to set the following configuration parameters in core-site.xml to allow the metric service to communicate anonymously.

  • hadoop.http.authentication.simple.anonymous.allowed=true
  • hadoop.http.authentication.type=undefined (deleted)
  • hadoop.http.filter.initializers=undefined (deleted)

After restarting all affected services along with the metrics collector and metrics monitor clients, resource use reporting for memory, network, and CPU was visible in Ambari.

Share This Story:

Leave a Reply