[
https://issues.apache.org/jira/browse/FLUME-3042?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15892128#comment-15892128
]
Saygun Onay commented on FLUME-3042:
------------------------------------
I ran into the same issue and noticed that since Kafka channel does not have a
channel size and capacity, both of these values are 0 which caused the logic in
ChannelCounter.getChannelFillPercentage() to return Double.MAX_VALUE. I created
my own version of KafkaChannel and copied over the code from original flume
KafkaChannel. I only added the following lines after counter.start() in
KafkaChannel.start():
counter.start();
counter.setChannelCapacity(1);
counter.setChannelSize(0);
And voilla, it works! Probably the root cause is that
ChannelCounter.getChannelFillPercentage() returns Double.MAX_VALUE but in
GangliaServer.createGangliaMessage() (or in
GangliaServer.createGangliaMessage31()) the metric value is parsed using Float:
try {
Float.parseFloat(value);
type = "float";
} catch (NumberFormatException ex) {
// The param is a string, and so leave the type as is.
}
> use ganglia to monitoring flume KafkaChannel error
> --------------------------------------------------
>
> Key: FLUME-3042
> URL: https://issues.apache.org/jira/browse/FLUME-3042
> Project: Flume
> Issue Type: Bug
> Components: Kafka Channel
> Affects Versions: v1.7.0
> Reporter: tiany
>
> when i used ganglia to monitor kafkachannel, it is being given as follows:
> There was an error collecting ganglia data (127.0.0.1:8652): fsockopen error:
> Connection refused
> and find gmetad service was dead,debug as follows:
> *** buffer overflow detected ***: gmetad terminated
> ======= Backtrace: =========
> /lib64/libc.so.6(__fortify_fail+0x37)[0x3cb14ff3f7]
> /lib64/libc.so.6[0x3cb14fd2e0]
> /lib64/libc.so.6[0x3cb14fc739]
> /lib64/libc.so.6(_IO_default_xsputn+0xc9)[0x3cb1473899]
> /lib64/libc.so.6(_IO_vfprintf+0x3826)[0x3cb1447516]
> /lib64/libc.so.6(__vsprintf_chk+0x9d)[0x3cb14fc7dd]
> /lib64/libc.so.6(__sprintf_chk+0x7f)[0x3cb14fc71f]
> gmetad[0x40b098]
> gmetad[0x408d19]
> /usr/lib64/libganglia.so.0(hash_foreach+0x59)[0x7fe91d9bf639]
> gmetad[0x408a41]
> This problem occurs only when useing KafkaChannel,others is not occurs(ex:
> memoryChannel、KafkaSink and so on) . why is there this problem? please help
> me, thanks
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)