# Local client with FS gateway type

**URL:** <https://discuss.elastic.co/t/local-client-with-fs-gateway-type/8923>\
**Category:** Elasticsearch\
**Created:** [September 4, 2012, 12:15pm UTC](https://discuss.elastic.co/t/local-client-with-fs-gateway-type/8923 "2012-09-04T12:15:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Barak\_Yaish](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Barak\_Yaish](https://discuss.elastic.co/u/Barak_Yaish)\
**Post date:** [September 4, 2012, 12:15pm UTC](https://discuss.elastic.co/t/local-client-with-fs-gateway-type/8923/1 "2012-09-04T12:15:58Z")

</div>

I would like to embed IS in my app, so I’m trying local client with FS  
gateway. I’ve an app (a simple main, java client ) that index data, I can  
see on the file system that indices indeed created:

ImmutableSettings.Builder settings = NodeBuilder._nodeBuilder_().settings();

settings.put( "gateway.type", "fs" );

settings.put( "path.data", "c:/tmp/" );

Node node = NodeBuilder._nodeBuilder_().settings(settings).local( _false_).build();

node.start();

Client client = node.client();

//create the index

//index the data

node.stop();

After this, I ran a second app with the same node configuration (a second  
jvm invocation) to search the indexed data, but an exception is raised:

_org.elasticsearch.action.search.SearchPhaseExecutionException_: Failed to  
execute phase [dfs], total failure; shardFailures {[_na_][twitter][0]: No  
active shards}{[_na_][twitter][1]: No active shards}{[_na_][twitter][2]: No  
active shards}{[_na_][twitter][3]: No active shards}{[_na_][twitter][4]: No  
active shards}

```
   at 

```

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(  
_TransportSearchTypeAction.java:248_)

```
   at 

```

org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(  
_TransportSearchTypeAction.java:138_)

```
   at 

```

org.elasticsearch.action.search.type.TransportSearchDfsQueryAndFetchAction.doExecute(  
_TransportSearchDfsQueryAndFetchAction.java:58_)

```
   at 

```

org.elasticsearch.action.search.type.TransportSearchDfsQueryAndFetchAction.doExecute(  
_TransportSearchDfsQueryAndFetchAction.java:50_)

```
   at org.elasticsearch.action.support.BaseAction.execute(*

```

BaseAction.java:61\*)

```
   at org.elasticsearch.action.search.TransportSearchAction.doExecute(*

```

TransportSearchAction.java:106\*)

```
   at org.elasticsearch.action.search.TransportSearchAction.doExecute(*

```

TransportSearchAction.java:42\*)

```
   at org.elasticsearch.action.support.BaseAction.execute(*

```

BaseAction.java:61\*)

```
   at org.elasticsearch.client.node.NodeClient.search(*

```

NodeClient.java:168\*)

```
   at 

```

org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(\*  
SearchRequestBuilder.java:579\*)

```
   at 

```

org.elasticsearch.client.action.support.BaseRequestBuilder.execute(\*  
BaseRequestBuilder.java:56\*)

```
   at 

```

org.elasticsearch.client.action.support.BaseRequestBuilder.execute(\*  
BaseRequestBuilder.java:51\*)

```
   at com.peer39.es.EsEmbedded.main(*EsEmbedded.java:85*)

```

Is there some config I missed?

Thanks.

--

---

<div class="post-metadata">

**Author:** ![Barak\_Yaish](https://avatars.discourse-cdn.com/v4/letter/b/9de053/32.png) [@Barak\_Yaish](https://discuss.elastic.co/u/Barak_Yaish)\
**Post date:** [September 4, 2012, 12:19pm UTC](https://discuss.elastic.co/t/local-client-with-fs-gateway-type/8923/2 "2012-09-04T12:19:07Z")

</div>

A typo, should be: Node node = NodeBuilder._nodeBuilder_  
().settings(settings).local( _true_).build();

On Tuesday, September 4, 2012 3:15:58 PM UTC+3, barak wrote:

> I would like to embed IS in my app, so I’m trying local client with FS  
> gateway. I’ve an app (a simple main, java client ) that index data, I can  
> see on the file system that indices indeed created:
> 
> ImmutableSettings.Builder settings = NodeBuilder._nodeBuilder_  
> ().settings();
> 
> settings.put( "gateway.type", "fs" );
> 
> settings.put( "path.data", "c:/tmp/" );
> 
> Node node = NodeBuilder._nodeBuilder_().settings(settings).local( _false_).build();
> 
> node.start();
> 
> Client client = node.client();
> 
> //create the index
> 
> //index the data
> 
> node.stop();
> 
> After this, I ran a second app with the same node configuration (a second  
> jvm invocation) to search the indexed data, but an exception is raised:
> 
> _org.elasticsearch.action.search.SearchPhaseExecutionException_: Failed  
> to execute phase [dfs], total failure; shardFailures {[_na_][twitter][0]:  
> No active shards}{[_na_][twitter][1]: No active shards}{[_na_][twitter][2]:  
> No active shards}{[_na_][twitter][3]: No active shards}{[_na_][twitter][4]:  
> No active shards}
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.onFirstPhaseResult(  
> _TransportSearchTypeAction.java:248_)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.action.search.type.TransportSearchTypeAction$BaseAsyncAction.start(  
> _TransportSearchTypeAction.java:138_)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.action.search.type.TransportSearchDfsQueryAndFetchAction.doExecute(  
> _TransportSearchDfsQueryAndFetchAction.java:58_)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.action.search.type.TransportSearchDfsQueryAndFetchAction.doExecute(  
> _TransportSearchDfsQueryAndFetchAction.java:50_)
> 
> ```
> at org.elasticsearch.action.support.BaseAction.execute(*
> 
> ```
> 
> BaseAction.java:61\*)
> 
> ```
> at org.elasticsearch.action.search.TransportSearchAction.doExecute(
> 
> ```
> 
> _TransportSearchAction.java:106_)
> 
> ```
> at org.elasticsearch.action.search.TransportSearchAction.doExecute(
> 
> ```
> 
> _TransportSearchAction.java:42_)
> 
> ```
> at org.elasticsearch.action.support.BaseAction.execute(*
> 
> ```
> 
> BaseAction.java:61\*)
> 
> ```
> at org.elasticsearch.client.node.NodeClient.search(*
> 
> ```
> 
> NodeClient.java:168\*)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.client.action.search.SearchRequestBuilder.doExecute(\*  
> SearchRequestBuilder.java:579\*)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.client.action.support.BaseRequestBuilder.execute(\*  
> BaseRequestBuilder.java:56\*)
> 
> ```
> at 
> 
> ```
> 
> org.elasticsearch.client.action.support.BaseRequestBuilder.execute(\*  
> BaseRequestBuilder.java:51\*)
> 
> ```
> at com.peer39.es.EsEmbedded.main(*EsEmbedded.java:85*)
> 
> ```
> 
> Is there some config I missed?
> 
> Thanks.

--

---

<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 6, 2017, 3:14am UTC](https://discuss.elastic.co/t/local-client-with-fs-gateway-type/8923/3 "2017-07-06T03:14:11Z")

</div>

Closed on July 6, 2017, 3:14am UTC


