# BULK Indexing using JAVA API

**URL:** <https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614>\
**Category:** Elasticsearch\
**Created:** [October 20, 2015, 7:39pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614 "2015-10-20T19:39:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohitbordia](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rohitbordia](https://discuss.elastic.co/u/rohitbordia)\
**Post date:** [October 20, 2015, 7:39pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614/1 "2015-10-20T19:39:44Z")

</div>

Guys, We are working on a POC for indexing 10 million plus document and also a delta update which might have 2-3 milliion data updates. We are seeing connection reset error between client and cluster and some times we get error like, No port available to accept.

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [October 20, 2015, 10:23pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614/2 "2015-10-20T22:23:14Z")

</div>

Are you using the node or transport client? Can you be more specific about the error that you are getting?

---

<div class="post-metadata">

**Author:** ![rohitbordia](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rohitbordia](https://discuss.elastic.co/u/rohitbordia)\
**Post date:** [October 20, 2015, 10:51pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614/3 "2015-10-20T22:51:55Z")

</div>

HI Adrien ,

I'm using TransportClient. I have 3 clients , 3 Master and 2 Data nodes. Basically 2 shard and 1 replica.  
Using Spring batch to fetch 100 records using JDBCpaging to call bulk api to update existing data. Below is the error while calling delta update.

[Jeanne-Marie Beaubier] exception caught on transport layer [[id: 0x8a83ae52]], closing connection  
java.net.BindException: Cannot assign requested address  
at sun.nio.ch.Net.connect0(Native Method)

[Helio] exception caught on transport layer [[id: 0x84378b3f]], closing connection  
java.net.BindException: Cannot assign requested address  
at sun.nio.ch.Net.connect0(Native Method)  
at sun.nio.ch.Net.connect(Net.java:458)  
at sun.nio.ch.Net.connect(Net.java:450)  
at sun.nio.ch.SocketChannelImpl.connect(SocketChannelImpl.java:648)

---

<div class="post-metadata">

**Author:** ![jpountz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jpountz/32/45836_2.png) [@jpountz](https://discuss.elastic.co/u/jpountz)\
**Post date:** [October 20, 2015, 11:04pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614/4 "2015-10-20T23:04:48Z")

</div>

Sorry I'm not very familiar with this, but found this [stackoverflow post](http://stackoverflow.com/questions/8965155/cannot-assign-requested-address-jvm-bind) that gives potential reasons for this error. Maybe this can help you find the cause of your problem?

---

<div class="post-metadata">

**Author:** ![rohitbordia](https://avatars.discourse-cdn.com/v4/letter/r/dc4da7/32.png) [@rohitbordia](https://discuss.elastic.co/u/rohitbordia)\
**Post date:** [October 20, 2015, 11:13pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614/5 "2015-10-20T23:13:26Z")

</div>

Thanks.Will check it out..

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 11:43pm UTC](https://discuss.elastic.co/t/bulk-indexing-using-java-api/32614/6 "2017-07-05T23:43:44Z")

</div>


