hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manish Malhotra (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11400) GraphiteSink does not reconnect to Graphite after 'broken pipe'
Date Mon, 26 Oct 2015 07:55:27 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14973870#comment-14973870
] 

Manish Malhotra commented on HADOOP-11400:
------------------------------------------

Thanks Kamil for the patch !! 

Though I have few questions regarding MetricSystem in general (so may be someone can also
please comment), and for GraphiteSink : 

1. Case, target Graphite Server is down, or not reachable: 

In case of putMetrics throws exception, client gets "broken pipe" exception which goes till
MetricSinkAdapter. 
Then Hadoop MetricSystem in general has notion of retry and wait-time, but after retry it
just stop using the errored Sink.
Even after few mins if the target server is up, it doesn't try to publish metric again. 

I tested this scenario with GraphiteSink.

My understanding of this flow, might be wrong :), but if not then I think best place to fix
this in the MetricSystem framework, and it should check the sinks availability after every
few secs / mins based on the config. 


2. GraphiteSink is using single TCP connection, should it uses a TCP connection pool? 

Regards,
Manish

> GraphiteSink does not reconnect to Graphite after 'broken pipe'
> ---------------------------------------------------------------
>
>                 Key: HADOOP-11400
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11400
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 2.5.1, 2.6.0
>            Reporter: Kamil Gorlo
>            Assignee: Kamil Gorlo
>             Fix For: 2.7.0
>
>         Attachments: HADOOP-11400.patch
>
>
> I see that after network error GraphiteSink does not reconnects to Graphite server and
in effect metrics are not sent. 
> Here is stacktrace I see (this is from nodemanager):
> 2014-12-11 16:39:21,655 ERROR org.apache.hadoop.metrics2.impl.MetricsSinkAdapter: Got
sink exception, retry in 4806ms
> org.apache.hadoop.metrics2.MetricsException: Error flushing metrics
>         at org.apache.hadoop.metrics2.sink.GraphiteSinkFixed.flush(GraphiteSinkFixed.java:120)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:184)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:43)
>         at org.apache.hadoop.metrics2.impl.SinkQueue.consumeAll(SinkQueue.java:87)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.publishMetricsFromQueue(MetricsSinkAdapter.java:129)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter$1.run(MetricsSinkAdapter.java:88)
> Caused by: java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
>         at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
>         at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
>         at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
>         at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
>         at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
>         at org.apache.hadoop.metrics2.sink.GraphiteSinkFixed.flush(GraphiteSinkFixed.java:118)
>         ... 5 more
> 2014-12-11 16:39:26,463 ERROR org.apache.hadoop.metrics2.impl.MetricsSinkAdapter: Got
sink exception and over retry limit, suppressing further error messages
> org.apache.hadoop.metrics2.MetricsException: Error flushing metrics
>         at org.apache.hadoop.metrics2.sink.GraphiteSinkFixed.flush(GraphiteSinkFixed.java:120)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:184)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.consume(MetricsSinkAdapter.java:43)
>         at org.apache.hadoop.metrics2.impl.SinkQueue.consumeAll(SinkQueue.java:87)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter.publishMetricsFromQueue(MetricsSinkAdapter.java:129)
>         at org.apache.hadoop.metrics2.impl.MetricsSinkAdapter$1.run(MetricsSinkAdapter.java:88)
> Caused by: java.net.SocketException: Broken pipe
>         at java.net.SocketOutputStream.socketWrite0(Native Method)
>         at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:113)
>         at java.net.SocketOutputStream.write(SocketOutputStream.java:159)
>         at sun.nio.cs.StreamEncoder.writeBytes(StreamEncoder.java:221)
>         at sun.nio.cs.StreamEncoder.implFlushBuffer(StreamEncoder.java:291)
>         at sun.nio.cs.StreamEncoder.implFlush(StreamEncoder.java:295)
>         at sun.nio.cs.StreamEncoder.flush(StreamEncoder.java:141)
>         at java.io.OutputStreamWriter.flush(OutputStreamWriter.java:229)
>         at org.apache.hadoop.metrics2.sink.GraphiteSinkFixed.flush(GraphiteSinkFixed.java:118)
>         ... 5 more
> GraphiteSinkFixed.java is simply GraphiteSink.java from Hadoop 2.6.0 (with fixed https://issues.apache.org/jira/browse/HADOOP-11182)
because I cannot simply upgrade Hadoop (I am using CDH5).
> I see that GraphiteSink is using OutputStreamWriter which is created only in init method
(which is probably called only once per application runtime) and there is no reconnection
logic.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message