# Fail to run rest api test

**URL:** https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495
**Category:** Elasticsearch
**Created:** [July 18, 2017, 5:01am UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495 "2017-07-18T05:01:34Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![lucianspec](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lucianspec](https://discuss.elastic.co/u/lucianspec)
#### Post date: [July 18, 2017, 5:01am UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495/1 "2017-07-18T05:01:34Z")

</div>

$ gradle :distribution:integ-test-zip:integTest \

> -Dtests.class="org.elasticsearch.test.rest.\*Yaml\*IT"   
> -Dtests.method="test {p0=cat.shards/10\_basic/Help}"

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ':distribution:integ-test-zip:integTestCluster#wait'.

> Elasticsearch cluster failed to pass wait condition

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [July 18, 2017, 10:04am UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495/2 "2017-07-18T10:04:13Z")

</div>

I just ran this on a checkout of the current [master](https://github.com/elastic/elasticsearch/commit/0d8b753325fa5c5eeaa23dc3e2372bc257861b54) and it worked for me. Can you run the regular unit test, e.g. in `../core` run `gradle clean test` ?

---

<div class="post-metadata">

### Author: ![lucianspec](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lucianspec](https://discuss.elastic.co/u/lucianspec)
#### Post date: [July 18, 2017, 10:27am UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495/3 "2017-07-18T10:27:53Z")

</div>

that is so strange & i test it again on v5.4.3(because my local es is 5.4.3) and passed,  
only 1 failure on master branch,

but i still don't know why i failed before. here is the full log in my console.

> Task :distribution:integ-test-zip:integTestCluster#wait

Node 0 configuration:  
|-----------------------------------------  
| cwd: /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/cwd  
| command: sh /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/cwd/run -E node.portsfile=true --path.conf /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/elasticsearch-6.0.0-beta1-SNAPSHOT/config -E path.data=/Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/elasticsearch-6.0.0-beta1-SNAPSHOT/data  
| environment:  
| JAVA\_HOME: /Users/luxin433/.jenv/versions/1.8  
| ES\_JAVA\_OPTS: -Xms512m -Xmx512m -ea -esa  
| CONF\_DIR: /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/elasticsearch-6.0.0-beta1-SNAPSHOT/config  
|  
| [run]  
"/Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/elasticsearch-6.0.0-beta1-SNAPSHOT/bin/elasticsearch" "$@" \> run.log 2\>&1 ; if [$? != 0]; then touch run.failed; fi  
|  
| [elasticsearch.yml]  
| cluster.name: distribution\_integ-test-zip\_integTestCluster  
| node.name: node-0  
| pidfile: /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/es.pid  
| path.repo: /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/shared/repo  
| path.shared\_data: /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/shared/  
| node.attr.testattr: test  
| node.max\_local\_storage\_nodes: 1  
| http.port: 0  
| transport.tcp.port: 0  
| cluster.routing.allocation.disk.watermark.low: 1b  
| cluster.routing.allocation.disk.watermark.high: 1b

| cluster.routing.allocation.disk.watermark.flood\_stage: 1b |
| --- |
| Node 0 output: |
| ----------------------------------------- |
| failure marker exists: false |
| pid file exists: true |
| http ports file exists: true |
| transport ports file exists: true |
| |
| [ant output] |
| [echo] ==\> [Tue Jul 18 12:39:34 CST 2017] checking health: http://[::1]:49360/\_cluster/health?wait\_for\_nodes=\>=1&wait\_for\_status=yellow |
| [get] Getting: http://[::1]:49360/\_cluster/health?wait\_for\_nodes=\>=1&wait\_for\_status=yellow |
| [get] To: /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/cwd/wait.success |
| [get] Error getting http://[::1]:49360/\_cluster/health?wait\_for\_nodes=\>=1&wait\_for\_status=yellow to /Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/cwd/wait.success |
| |
| [log] |
| [2017-07-18T12:39:28,620][INFO][o.e.n.Node] [node-0] initializing ... |
| [2017-07-18T12:39:28,701][INFO][o.e.e.NodeEnvironment] [node-0] using [1] data paths, mounts [[/ (/dev/disk1)]], net usable\_space [27.4gb], net total\_space [232.6gb], types [hfs] |
| [2017-07-18T12:39:28,702][INFO][o.e.e.NodeEnvironment] [node-0] heap size [494.9mb], compressed ordinary object pointers [true] |
| [2017-07-18T12:39:28,703][INFO][o.e.n.Node] [node-0] node name [node-0], node ID [mO70HEboQAKUMd-Gf8kGZw] |
| [2017-07-18T12:39:28,703][INFO][o.e.n.Node] [node-0] version[6.0.0-beta1-SNAPSHOT], pid[28479], build[7739aad/2017-07-18T04:13:23.285Z], OS[Mac OS X/10.12.1/x86\_64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0\_92/25.92-b14] |
| [2017-07-18T12:39:28,703][INFO][o.e.n.Node] [node-0] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+DisableExplicitGC, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Djdk.io.permissionsUseCanonicalPath=true, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -Xms512m, -Xmx512m, -ea, -esa, -Des.path.home=/Users/luxin433/WorkSpace/ResearchLab/Elasticsearch/elasticsearch/distribution/integ-test-zip/build/cluster/integTestCluster node0/elasticsearch-6.0.0-beta1-SNAPSHOT] |
| [2017-07-18T12:39:28,704][WARN][o.e.n.Node] [node-0] version [6.0.0-beta1-SNAPSHOT] is a pre-release version of Elasticsearch and is not suitable for production |
| [2017-07-18T12:39:28,829][INFO][o.e.p.PluginsService] [node-0] loaded module [transport-netty4] |
| [2017-07-18T12:39:28,829][INFO][o.e.p.PluginsService] [node-0] no plugins loaded |
| [2017-07-18T12:39:30,034][INFO][o.e.d.DiscoveryModule] [node-0] using discovery type [zen] |
| [2017-07-18T12:39:30,688][INFO][o.e.t.TransportService] [node-0] publish\_address {127.0.0.1:49350}, bound\_addresses {[fe80::1]:49348}, {[::1]:49349}, {127.0.0.1:49350} |
| [2017-07-18T12:39:33,750][INFO][o.e.c.s.MasterService] [node-0] zen-disco-elected-as-master ([0] nodes joined), reason: new\_master {node-0}{mO70HEboQAKUMd-Gf8kGZw}{crvelHxNTQ27oc200zVrtQ}{127.0.0.1}{127.0.0.1:49350}{testattr=test} |
| [2017-07-18T12:39:33,755][INFO][o.e.c.s.ClusterApplierService] [node-0] new\_master {node-0}{mO70HEboQAKUMd-Gf8kGZw}{crvelHxNTQ27oc200zVrtQ}{127.0.0.1}{127.0.0.1:49350}{testattr=test}, reason: apply cluster state (from master [master {node-0}{mO70HEboQAKUMd-Gf8kGZw}{crvelHxNTQ27oc200zVrtQ}{127.0.0.1}{127.0.0.1:49350}{testattr=test} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]]) |
| [2017-07-18T12:39:33,773][INFO][o.e.h.n.Netty4HttpServerTransport] [node-0] publish\_address {127.0.0.1:49361}, bound\_addresses {[fe80::1]:49359}, {[::1]:49360}, {127.0.0.1:49361} |
| [2017-07-18T12:39:33,775][INFO][o.e.n.Node] [node-0] started |
| [2017-07-18T12:39:33,776][INFO][o.e.g.GatewayService] [node-0] recovered [0] indices into cluster\_state |

FAILURE: Build failed with an exception.

- What went wrong:  
Execution failed for task ':distribution:integ-test-zip:integTestCluster#wait'.

> Elasticsearch cluster failed to pass wait condition

---

<div class="post-metadata">

### Author: ![lucianspec](https://avatars.discourse-cdn.com/v4/letter/l/3bc359/32.png) [@lucianspec](https://discuss.elastic.co/u/lucianspec)
#### Post date: [July 18, 2017, 10:32am UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495/4 "2017-07-18T10:32:40Z")

</div>

any suggestion about when my es node will happen to reject wait condition ?  
my es log always print this, but i don't think it matters.

[2017-07-18T18:30:40,462][INFO][o.e.c.r.a.DiskThresholdMonitor] [XV6b3C6] low disk watermark [85%] exceeded on [XV6b3C6rSluWjP0gDo2cNw][XV6b3C6][/usr/local/elasticsearch-5.4.3/data/nodes/0] free: 27.1gb[11.6%], replicas will not be assigned to this node

---

<div class="post-metadata">

### Author: ![cbuescher](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cbuescher/32/60402_2.png) [@cbuescher](https://discuss.elastic.co/u/cbuescher)
#### Post date: [July 18, 2017, 4:56pm UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495/5 "2017-07-18T16:56:59Z")

</div>

In test you can ignore this. If this is not about running a test, please open a new issue, this thread was about running rest api test. Lets not mix things here please.

---

<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: [August 15, 2017, 4:57pm UTC](https://discuss.elastic.co/t/fail-to-run-rest-api-test/93495/6 "2017-08-15T16:57:18Z")

</div>

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