# FSCrawler : Retry connection, when it gets failure

**URL:** https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488
**Category:** Elasticsearch
**Created:** [January 5, 2022, 2:16am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488 "2022-01-05T02:16:14Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 5, 2022, 2:16am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/1 "2022-01-05T02:16:14Z")

</div>

Hi David,  
Please share your suggestions. We are using fscrawler-2.4..

When we startup.. getting below connection error.. is there way to look (or) wait for connection success, then continue the process within the \_settings.json script.

05:15:08,480 DEBUG [f.p.e.c.f.FsCrawler] Starting job [processformstemplates]...  
05:15:08,629 TRACE [f.p.e.c.f.FsCrawler] settings used for this crawler: [{  
"name" : "processformstemplates0",  
"fs" : {  
"url" : "/usr/share/fscrawler/data",  
"update\_rate" : "15m",  
"excludes" : ["_/~_"],  
"json\_support" : false,  
"filename\_as\_id" : true,  
"add\_filesize" : true,  
"remove\_deleted" : false,  
"add\_as\_inner\_object" : false,  
"store\_source" : false,  
"index\_content" : true,  
"attributes\_support" : false,  
"raw\_metadata" : false,  
"xml\_support" : false,  
"index\_folders" : true,  
"lang\_detect" : false,  
"continue\_on\_error" : false,  
"pdf\_ocr" : true,  
"ocr" : {  
"language" : "eng"  
}  
},  
"Elasticsearch" : {  
"nodes" : [ {  
"host" : "Elasticsearch-documents-http.app-doc.svc.cluster.local",  
"port" : 9200,  
"scheme" : "HTTP"  
} ],  
"index" : "templatesindex",  
"bulk\_size" : 100,  
"flush\_interval" : "5s",  
"username" : "elastic"  
},  
"rest" : {  
"port" : 0  
}  
}]  
05:15:09,159 WARN [f.p.e.c.f.c.ElasticsearchClientManager] failed to create Elasticsearch client, disabling crawler...  
05:15:09,159 FATAL [f.p.e.c.f.FsCrawler] Fatal error received while running the crawler: [Connection refused]  
05:15:09,160 DEBUG [f.p.e.c.f.FsCrawler] error caught  
java.net.ConnectException: Connection refused  
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:1.8.0\_121]  
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:1.8.0\_121]  
at org.Elasticsearch.client.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvent(DefaultConnectingIOReactor.java:171) ~[Elasticsearch-rest-client-6.0.0-beta1.jar:6.0.0-beta1]  
at org.Elasticsearch.client.http.impl.nio.reactor.DefaultConnectingIOReactor.processEvents(DefaultConnectingIOReactor.java:145) ~[Elasticsearch-rest-client-6.0.0-beta1.jar:6.0.0-beta1]  
at org.Elasticsearch.client.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:348) ~[Elasticsearch-rest-client-6.0.0-beta1.jar:6.0.0-beta1]  
at org.Elasticsearch.client.http.impl.nio.conn.PoolingNHttpClientConnectionManager.execute(PoolingNHttpClientConnectionManager.java:192) ~[Elasticsearch-rest-client-6.0.0-beta1.jar:6.0.0-beta1]  
at org.Elasticsearch.client.http.impl.nio.client.CloseableHttpAsyncClientBase$1.run(CloseableHttpAsyncClientBase.java:64) ~[Elasticsearch-rest-client-6.0.0-beta1.jar:6.0.0-beta1]  
at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0\_121]

Thank You,  
Joseph

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 5, 2022, 4:24am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/2 "2022-01-05T04:24:54Z")

</div>

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.  
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.

Now back to the question. What is your Elasticsearch version?

What gives:

```
curl Elasticsearch-documents-http.app-doc.svc.cluster.local:9200
```

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 5, 2022, 11:31am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/3 "2022-01-05T11:31:45Z")

</div>

Hi David,  
Sorry, i update the format.. in between.. i am placing this..

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bc19d7b492e9b8eeb546d709a843ceb4f142ff98.png)

Our Elastic Version is 6.8.14.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 5, 2022, 1:17pm UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/4 "2022-01-05T13:17:36Z")

</div>

Could you upgrade to FSCrawler 2.7?

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 6, 2022, 4:06am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/5 "2022-01-06T04:06:23Z")

</div>

Yes David, even we thought of doing before. But unfortunately, our other related applications all are in JDK 1.8, If we move to FS Crawler 2.7, then our ELK version needs to be changed and JDK version also. Thanks

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 6, 2022, 5:58am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/6 "2022-01-06T05:58:46Z")

</div>

FSCrawler 2.7 has a distribution for es6.  
I don't understand why you would have to upgrade Elasticsearch

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 6, 2022, 7:38am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/7 "2022-01-06T07:38:35Z")

</div>

For this combination, in linux, we have faced an issue. So, we did with FS Crawler 2.6.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 6, 2022, 7:53am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/8 "2022-01-06T07:53:53Z")

</div>

What kind of issue?

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 6, 2022, 8:52am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/9 "2022-01-06T08:52:37Z")

</div>

that we had 6 months back, then we continue with FSCrawler 2.4 and ELK 6.8.14. Yes.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 6, 2022, 9:06am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/10 "2022-01-06T09:06:37Z")

</div>

I'm not following.  
You should upgrade and fix the issue you faced 6 months ago. Not sure what it was and if I can help on this.

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 6, 2022, 10:53am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/11 "2022-01-06T10:53:48Z")

</div>

Hi David, We are trying to upgrade to FS Crawler 2.7 Version.  
Thanks.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 6, 2022, 12:39pm UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/12 "2022-01-06T12:39:01Z")

</div>

FYI, I will build in the next days hopefully a version 2.9 of FSCrawler.

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 6, 2022, 1:28pm UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/13 "2022-01-06T13:28:52Z")

</div>

Sure, Thanks David. We will look on it..  
Mean time, we have upgraded to FS Crawler 2.7 and we got the same error, what i have mentioned above 'Connection Refused error'.  
Could You please suggest.

And we have referred below thread and tried to follow:

> [@Fscrawler](https://discuss.elastic.co/t/fscrawler/260467):
>
> Hi I am running elasticsearch cluster in docker. Setup fscrawler, but when I am running it is giving error We can not start Elasticsearch Client. Exiting. Here are complete error Recreating fscrawler ... done Attaching to fscrawler fscrawler | 16:18:13,512 INFO [f.p.e.c.f.c.BootstrapChecks] Memory [Free/Total=Percent]: HEAP [191.5mb/3gb=6.14%], RAM [5.7gb/13.7gb=42.12%], Swap [1.9gb/1.9gb=100.0%]. fscrawler | 16:18:14,196 WARN [f.p.e.c.f.c.v.ElasticsearchClientV7] failed to create ela…

Thanks a lot for your time.

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 6, 2022, 2:15pm UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/14 "2022-01-06T14:15:56Z")

</div>

In Additionally, we tried for curl command..

> curl Elasticsearch-documents-http.app-doc.svc.cluster.local:9200  
> curl: (6) Could not resolve host: Elasticsearch-documents-http.app-doc.svc.cluster.local; Unknown error

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [January 15, 2022, 4:49am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/15 "2022-01-15T04:49:45Z")

</div>

That means that your Elasticsearch cluster can not be reached from the machine where FSCrawler is running.

What are the Elasticsearch logs when it starts?

Please format your code, logs or configuration files using `</>` icon as explained in [this guide](https://discuss.elastic.co/t/about-the-elasticsearch-category/21) and not the citation button. It will make your post more readable.

Or use markdown style like:

````
```
CODE
```

````

This is the icon to use if you are not using markdown format:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/7/e/7e6e239431ec2d71cbf1beef741f2e93e7cc762c.jpg)

---

<div class="post-metadata">

### Author: ![joseph-l.amalraj](https://avatars.discourse-cdn.com/v4/letter/j/da6949/32.png) [@joseph-l.amalraj](https://discuss.elastic.co/u/joseph-l.amalraj)
#### Post date: [January 15, 2022, 5:41am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/16 "2022-01-15T05:41:26Z")

</div>

Yes.. Thanks a lot David.. As you mentioned same kind of issue.. due to proxy request did not receive and our team got fixed this.

---

<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: [February 12, 2022, 5:42am UTC](https://discuss.elastic.co/t/fscrawler-retry-connection-when-it-gets-failure/293488/17 "2022-02-12T05:42:19Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
