[
https://issues.apache.org/jira/browse/ACCUMULO-4317?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15304447#comment-15304447
]
Josh Elser commented on ACCUMULO-4317:
--------------------------------------
Relevant code from 1.7.1:
{code}
public static void executeRaw(ClientContext context,
ClientExec<ClientService.Client> exec) throws Exception {
while (true) {
ClientService.Client client = null;
String server = null;
try {
Pair<String,Client> pair = ServerClient.getConnection(context);
server = pair.getFirst();
client = pair.getSecond();
exec.execute(client);
break;
} catch (TTransportException tte) {
log.debug("ClientService request failed " + server + ", retrying ... ",
tte);
UtilWaitThread.sleep(100);
} finally {
if (client != null)
ServerClient.close(client);
}
}
}
public static void close(ClientService.Client client) {
if (client != null && client.getInputProtocol() != null &&
client.getInputProtocol().getTransport() != null) {
ThriftTransportPool.getInstance().returnTransport(client.getInputProtocol().getTransport());
} else {
log.debug("Attempt to close null connection to a server", new
Exception());
}
}
{code}
Looks to me that the socket will ultimately be closed.
> Accumulo client causes 'too many files open' due to infinite loop.
> ------------------------------------------------------------------
>
> Key: ACCUMULO-4317
> URL: https://issues.apache.org/jira/browse/ACCUMULO-4317
> Project: Accumulo
> Issue Type: Bug
> Components: client
> Affects Versions: 1.7.1
> Reporter: Michiel Vanderlee
> Priority: Minor
>
> Accumulo stores hostnames in zookeeper, if the client can not resolve these
> then it will continue to try to connect in a while(true) loop. This will
> eventually cause 'too many files open' errors.
> Loop is in ServerClient.java$executeRaw
> Bug: Should error out after some time, not retry infintely.
> Workaround: Add hostnames to /etc/hosts and restart.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)