Minimal config for testing?

What is the best way to get a minimal ES configured to testing an application?

I thought this worked when I last used ES, some years ago:

# Disable starting multiple nodes on a single system:
node.max_local_storage_nodes: 1

But when I run this, the logs reads:

[2016-09-12 09:13:49,161][WARN ][rest.suppressed          ] /test/posting Params: {index=test, type=posting}
RemoteTransportException[[golem-1][127.0.0.1:9300][indices:data/write/index[p]]]; nested: UnavailableShardsException[[test][2] Not enough active copies to meet write consistency of [QUORUM] (have 1, needed 3). Timeout: [1m], request: [index {[test][posting][AVcdPcIHfNWPXrF272uA], source[{"id": ...
Caused by: UnavailableShardsException[[test][2] Not enough active copies to meet write consistency of [QUORUM] (have 1, needed 3). Timeout: [1m], request: [index {[test][posting][AVcdPcIHfNWPXrF272uA], s...
...	at org.elasticsearch.action.support.replication.TransportReplicationAction$PrimaryPhase.finishBecauseUnavailable(TransportReplication

Any help appreciated.

TIA
Lee

The error you get is because you are creating an index with 2 replicas in a cluster that doesn't have enough nodes to allocate the replicas, I assume a single node cluster. When you try indexing against such a cluster you get a timeout waiting for those replicas to allocate, which they couldn't.

This behaviour didn't change though, I think you just need to change the settings for the index that you are creating if you want things to work against a single node cluster, decrease the number of replicas to 0 (or leave the default 1).

Cheers
Luca

1 Like

Thank you so much for your help — silly fool I am, I had a bug that meant I was loading the wrong config file, setting more shards/replicas than I thought.