Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Error sending metrics to server. 'NoneType' object has no attribute 'encode'

Error sending metrics to server. 'NoneType' object has no attribute 'encode'

New Contributor

when i tail -f /var/log/ambari-metrics-monitor/ambari-metrics-monitor.out, i see some error like "Error sending metrics to server. 'NoneType' object has no attribute 'encode'";

and when i tail -f /var/log/hbase/hbase-hbase-regionserver-ambari-agent.hugedata.com.log, i see some erro like "[HBase-Metrics2-1] impl.MetricsSystemImpl: Error creating sink 'timeline' org.apache.hadoop.metrics2.impl.MetricsConfigException: Error creating plugin: org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink at org.apache.hadoop.metrics2.impl.MetricsConfig.getPlugin(MetricsConfig.java:203) at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.newSink(MetricsSystemImpl.java:529) at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.configureSinks(MetricsSystemImpl.java:501) at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.configure(MetricsSystemImpl.java:480) at org.apache.hadoop.metrics2.impl.MetricsSystemImpl.start(MetricsSystemImpl.java:189) at org.apache.hadoop.metrics2.impl.JmxCacheBuster$JmxCacheBusterRunnable.run(JmxCacheBuster.java:109) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) Caused by: java.lang.NullPointerException at org.apache.hadoop.metrics2.sink.timeline.HadoopTimelineMetricsSink.init(HadoopTimelineMetricsSink.java:108) at org.apache.hadoop.metrics2.impl.MetricsConfig.getPlugin(MetricsConfig.java:199) ... 13 more"

3 REPLIES 3

Re: Error sending metrics to server. 'NoneType' object has no attribute 'encode'

Mentor

Please post result of the following command assuming you are on RHEL, otherwise equivalent OS command

rpm -qa | grep ambari*

Re: Error sending metrics to server. 'NoneType' object has no attribute 'encode'

New Contributor

Thanks for Artem, when i run rpm -qa | grep ambari* in ambari-agent, the result is :

ambari-infra-solr-client-2.4.1.0-22.x86_64

ambari-agent-2.4.1.0-0.x86_64

ambari-metrics-hadoop-sink-2.4.1.0-22.x86_64

ambari-infra-solr-2.4.1.0-22.x86_64

ambari-metrics-monitor-2.4.1.0-22.x86_64

ambari-metrics-grafana-2.4.1.0-22.x86_64

but when i tail -f /var/log/ambari-metrics-monitor,:

2016-12-02 11:29:57,019 [WARNING] emitter.py:84 - Error sending metrics to server. [Errno 111] Connection refused 2016-12-02 11:29:57,019 [WARNING] emitter.py:90 - Retrying after 5 ...

Re: Error sending metrics to server. 'NoneType' object has no attribute 'encode'

Rising Star

Did you figure it out? I am having same message.

Don't have an account?
Coming from Hortonworks? Activate your account here