Concurrent Modification Exception being received

Hi,
I'm running ES 0.16.0 and I'm getting the following exception when
creating a TransportClient:

Exception in thread "main" java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
at org.elasticsearch.client.transport.TransportClientNodesService
$ScheduledSniffNodesSampler.run(TransportClientNodesService.java:258)
at
org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddress(TransportClientNodesService.java:
117)
at
org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:
197)
at
com.mycom.pac.elasticsearch.example.ElasticSearchExample.main(ElasticSearchExample.java:
30)

I'm creating a TransportClient node as follows:

TransportClient client = new
TransportClient(settingsBuilder().put("cluster.name","myCluster")
.put("client.transport.sniff",true))
.addTransportAddress(new
InetSocketTransportAddress("ec2-ip-address", 9300));

If I remove the client.transport.sniff settings put, the client
connects correctly.

Am I doing this wrong or is it a bug of some sort?

Thanks,
Pat

Fixed: Possible failure when using TransportClient (with sniffing) · Issue #923 · elastic/elasticsearch · GitHub. Will be part of 0.16.1 which will be released in a couple of days.
On Wednesday, May 11, 2011 at 1:53 AM, Pat Christopher wrote:

Hi,
I'm running ES 0.16.0 and I'm getting the following exception when
creating a TransportClient:

Exception in thread "main" java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
at org.elasticsearch.client.transport.TransportClientNodesService
$ScheduledSniffNodesSampler.run(TransportClientNodesService.java:258)
at
org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddress(TransportClientNodesService.java:
117)
at
org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:
197)
at
com.mycom.pac.elasticsearch.example.ElasticSearchExample.main(ElasticSearchExample.java:
30)

I'm creating a TransportClient node as follows:

TransportClient client = new
TransportClient(settingsBuilder().put("cluster.name","myCluster")
.put("client.transport.sniff",true))
.addTransportAddress(new
InetSocketTransportAddress("ec2-ip-address", 9300));

If I remove the client.transport.sniff settings put, the client
connects correctly.

Am I doing this wrong or is it a bug of some sort?

Thanks,
Pat

yay!

Thanks Shay.

On May 10, 4:01 pm, Shay Banon shay.ba...@elasticsearch.com wrote:

Fixed:Possible failure when using TransportClient (with sniffing) · Issue #923 · elastic/elasticsearch · GitHub. Will be part of 0.16.1 which will be released in a couple of days.

On Wednesday, May 11, 2011 at 1:53 AM, Pat Christopher wrote:

Hi,
I'm running ES 0.16.0 and I'm getting the following exception when
creating a TransportClient:

Exception in thread "main" java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(Unknown Source)
at java.util.HashMap$KeyIterator.next(Unknown Source)
at org.elasticsearch.client.transport.TransportClientNodesService
$ScheduledSniffNodesSampler.run(TransportClientNodesService.java:258)
at
org.elasticsearch.client.transport.TransportClientNodesService.addTransportAddress(TransportClientNodesService.java:
117)
at
org.elasticsearch.client.transport.TransportClient.addTransportAddress(TransportClient.java:
197)
at
com.mycom.pac.elasticsearch.example.ElasticSearchExample.main(ElasticSearchExample.java:
30)

I'm creating a TransportClient node as follows:

TransportClient client = new
TransportClient(settingsBuilder().put("cluster.name","myCluster")
.put("client.transport.sniff",true))
.addTransportAddress(new
InetSocketTransportAddress("ec2-ip-address", 9300));

If I remove the client.transport.sniff settings put, the client
connects correctly.

Am I doing this wrong or is it a bug of some sort?

Thanks,
Pat