Open potatop opened 7 years ago
I encountered the same errors as yours. The problem is the XdrBufferEncodingStream( MAX_BUFFER_SIZE ) use the fixed buffer 2014 size, In my case,one metric maybe more then 15 tag&value, and one tagName is 170byte long . So the I encounter this error.
My current solution is make this buffer size bigger. maybe the gmetric4j project should make this buffersize configurable.
I'm getting the following error when sending a metric with 10 attributes. How can I increase this buffer? I tried changing the udp receive buffer in gmond to 20 mb but that did not help. info.ganglia.gmetric4j.gmetric.GangliaException: Exception announcing metric at info.ganglia.gmetric4j.gmetric.GMetric.announce(GMetric.java:138) at com.googlecode.jmxtrans.model.output.GangliaWriter.internalWrite(GangliaWriter.java:203) at com.googlecode.jmxtrans.model.output.BaseOutputWriter.doWrite(BaseOutputWriter.java:157) at com.googlecode.jmxtrans.jmx.ResultProcessor$1.run(ResultProcessor.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: org.acplt.oncrpc.OncRpcException: ONC/RPC buffer overflow at org.acplt.oncrpc.XdrBufferEncodingStream.xdrEncodeOpaque(XdrBufferEncodingStream.java:198) at org.acplt.oncrpc.XdrEncodingStream.xdrEncodeOpaque(XdrEncodingStream.java:167) at org.acplt.oncrpc.XdrEncodingStream.xdrEncodeDynamicOpaque(XdrEncodingStream.java:148) at org.acplt.oncrpc.XdrEncodingStream.xdrEncodeString(XdrEncodingStream.java:358) at info.ganglia.gmetric4j.xdr.v31x.Ganglia_extra_data.xdrEncode(Ganglia_extra_data.java:25) at info.ganglia.gmetric4j.xdr.v31x.Ganglia_metadata_message.xdrEncode(Ganglia_metadata_message.java:35) at info.ganglia.gmetric4j.xdr.v31x.Ganglia_metadatadef.xdrEncode(Ganglia_metadatadef.java:25) at info.ganglia.gmetric4j.xdr.v31x.Ganglia_metadata_msg.xdrEncode(Ganglia_metadata_msg.java:36) at info.ganglia.gmetric4j.gmetric.Protocolv31x.encodeGMetric(Protocolv31x.java:131) at info.ganglia.gmetric4j.gmetric.Protocolv31x.announce(Protocolv31x.java:73) at info.ganglia.gmetric4j.gmetric.GMetric.announce(GMetric.java:136) ... 8 more