Syed B. Ahmed created AVRO-1627:
-----------------------------------
Summary: org.apache.avro.ipc.NettyTransceiver created resources
are not cleaned when connecting to non listening ip address
Key: AVRO-1627
URL: https://issues.apache.org/jira/browse/AVRO-1627
Project: Avro
Issue Type: Bug
Components: java
Affects Versions: 1.7.2
Environment: Apache Flume Agent / logback-flume appender running on
ubuntu/centos
Reporter: Syed B. Ahmed
We are using logback-flume appender which internally uses NettyTransceiver.
Everything is fine if the flume agent is running. If flume agent is not up. We
start a background thread to try connect to the configured flume agent. We do
it every 30 seconds. The issue is that NettyTransceiver seems to open handles
in its constructor and then throws exception during its construction, when
getChannel is called. There is no way for the caller to clean up the allocated
handles. This leads to "Too Many Handles" issues within an Hour on our system
-- wherein we are using the NettyTransceiver in a retry thread every 30 secs to
make connection ..
Here are the exception details:
java.io.IOException: Error connecting to localhost/127.0.0.1:7070
at
org.apache.avro.ipc.NettyTransceiver.getChannel(NettyTransceiver.java:261)
~[avro-ipc-1.7.3.jar:1.7.3]
at
org.apache.avro.ipc.NettyTransceiver.<init>(NettyTransceiver.java:203)
~[avro-ipc-1.7.3.jar:1.7.3]
at
org.apache.avro.ipc.NettyTransceiver.<init>(NettyTransceiver.java:152)
~[avro-ipc-1.7.3.jar:1.7.3]
at
org.apache.avro.ipc.NettyTransceiver.<init>(NettyTransceiver.java:120)
~[avro-ipc-1.7.3.jar:1.7.3]
at
org.apache.avro.ipc.NettyTransceiver.<init>(NettyTransceiver.java:107)
~[avro-ipc-1.7.3.jar:1.7.3]
at flume.FlumeAvroManager.connect(FlumeAvro
---
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)