# Can i run rally on local elastic instance

**URL:** <https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488>\
**Category:** Elasticsearch\
**Tags:** rally\
**Created:** [November 28, 2017, 10:34pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488 "2017-11-28T22:34:22Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ankit3](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Ankit3](https://discuss.elastic.co/u/Ankit3)\
**Post date:** [November 28, 2017, 10:34pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/1 "2017-11-28T22:34:22Z")

</div>

Hi ,

I am very new to elastic search and rally. I downloaded elastic on my local and running on 127.0.0.1:9200  
Can i run rally on local elastic instance ? I tried few options even with target host but none worked.

Can we run rally on local or is there any prerequisite ?

---

<div class="post-metadata">

**Author:** ![geekpete](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/geekpete/32/20409_2.png) [@geekpete](https://discuss.elastic.co/u/geekpete)\
**Post date:** [November 29, 2017, 12:29am UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/2 "2017-11-29T00:29:52Z")

</div>

Hi,

So an example run on a local cluster might look like:

```auto
esrally --pipeline=benchmark-only --target-hosts=localhost:9200 --client-options="basic_auth_user:'elastic',basic_auth_password:'changeme'" --track=geonames --challenge=append-fast-with-conflicts

```

Also if you're running a single node then rally won't run against a non-green cluster, so set your replicas to 0 to get your cluster green first, eg:

```auto
curl -XPUT "elastic:changeme@localhost:9200/*/_settings" -H 'Content-Type: application/json' -d '
{
    "index" : {
        "number_of_replicas" : 0
    }
}'

```

---

<div class="post-metadata">

**Author:** ![Ankit3](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Ankit3](https://discuss.elastic.co/u/Ankit3)\
**Post date:** [November 29, 2017, 4:02pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/3 "2017-11-29T16:02:29Z")

</div>

Hi ,

Thanks for your inputs . I followed mentioned steps & i am getting below error now.  
I tried with different options but none worked

[ERROR] Cannot race. ('This race ended with a fatal crash.', None)

**Elastic console :**

[2017-11-29T09:51:35,153][INFO][o.e.h.n.Netty4HttpServerTransport] [oKclEzK] publish\_address {127.0.0.1:9200}, bound\_addresses {[fe80::1]:9200}, {[::1]:9200}, {127.0.0.1:9200}  
[2017-11-29T09:51:35,153][INFO][o.e.n.Node] [oKclEzK] started  
[2017-11-29T09:51:35,327][INFO][o.e.g.GatewayService] [oKclEzK] recovered [6] indices into cluster\_state  
[2017-11-29T09:51:35,573][INFO][o.e.c.r.a.AllocationService] [oKclEzK] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.kibana][0]] ...]).

**logs**

2017-11-29 15:52:29,464 PID:68488 rally.main INFO Detected a working Internet connection.  
2017-11-29 15:52:29,502 PID:68488 rally.process INFO Skipping myself (PID [68488]).  
2017-11-29 15:52:29,502 PID:68488 rally.main INFO Actor system already running locally? [True]  
2017-11-29 15:52:29,502 PID:68488 rally.actor INFO Joining already running actor system with system base [multiprocTCPBase].  
2017-11-29 15:52:29,517 PID:68488 rally.racecontrol INFO User specified pipeline [benchmark-only].  
2017-11-29 15:52:29,517 PID:68488 rally.racecontrol INFO Using configured hosts [{'host': '127.0.0.1', 'port': 9200}]  
2017-11-29 15:52:29,518 PID:68488 rally.actor INFO Joining already running actor system with system base [multiprocTCPBase].  
2017-11-29 15:53:19,519 PID:68488 root ERROR Cannot run subcommand [race].  
Traceback (most recent call last):  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 379, in run  
pipeline(cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 63, in **call**  
self.target(cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 327, in benchmark\_only  
return race(cfg, external=True)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 271, in race  
benchmark\_actor = actor\_system.createActor(BenchmarkActor, targetActorRequirements={"coordinator": True})  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/thespian/actors.py", line 697, in createActor  
sourceHash)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/thespian/system/systemBase.py", line 218, in newPrimaryActor  
str(self.transport.myAddress)))  
thespian.actors.ActorSystemRequestTimeout: No response received to PendingActor request to Admin at ActorAddr-(T|:1900) from ActorAddr-(T|:61953)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/rally.py", line 449, in dispatch\_sub\_command  
race(cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/rally.py", line 383, in race  
with\_actor\_system(lambda c: racecontrol.run(c), cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/rally.py", line 403, in with\_actor\_system  
runnable(cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/rally.py", line 383, in   
with\_actor\_system(lambda c: racecontrol.run(c), cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 387, in run  
raise exceptions.RallyError("This race ended with a fatal crash.").with\_traceback(tb)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 379, in run  
pipeline(cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 63, in **call**  
self.target(cfg)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 327, in benchmark\_only  
return race(cfg, external=True)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/esrally/racecontrol.py", line 271, in race  
benchmark\_actor = actor\_system.createActor(BenchmarkActor, targetActorRequirements={"coordinator": True})  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/thespian/actors.py", line 697, in createActor  
sourceHash)  
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/thespian/system/systemBase.py", line 218, in newPrimaryActor  
str(self.transport.myAddress)))  
esrally.exceptions.RallyError: ('This race ended with a fatal crash.', None)  
~

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [November 29, 2017, 4:36pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/4 "2017-11-29T16:36:15Z")

</div>

Hi,

from the logs it looks as if some process is listening on port 1900 (Rally uses this one for internal communication). Can you please run the following command?

```auto
lsof -i :1900

```

If some process is listening on port 1900, please paste the output here. If no process is listening, then the output of this command should be empty.

Daniel

---

<div class="post-metadata">

**Author:** ![Ankit3](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Ankit3](https://discuss.elastic.co/u/Ankit3)\
**Post date:** [November 29, 2017, 4:38pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/5 "2017-11-29T16:38:11Z")

</div>

> [@danielmitterdorfer](#):
>
> lsof -i :1900

Python seems to be running on this port

COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME  
Python 49078 abcd 10u IPv4 0x457e63687f1d7aa5 0t0 TCP \*:ssdp (LISTEN)  
Python 49079 abcd 10u IPv4 0x457e63687f1d7aa5 0t0 TCP \*:ssdp (LISTEN)

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [November 29, 2017, 4:41pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/6 "2017-11-29T16:41:40Z")

</div>

Hi,

that is actually expected so probably just a leftover from a previous run (+ they seem to be hanging). You could first try: `esrallyd stop` (note the additional **d** after esrally) and then check again with lsof. If that does not help, you should kill those two processes as a last resort with `kill -9 49078 49079`.

Daniel

---

<div class="post-metadata">

**Author:** ![Ankit3](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Ankit3](https://discuss.elastic.co/u/Ankit3)\
**Post date:** [November 29, 2017, 4:46pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/7 "2017-11-29T16:46:55Z")

</div>

Perfect.. Thanks a lot. I used esrallyd stop and rally seems to be working fine now.

---

<div class="post-metadata">

**Author:** ![danielmitterdorfer](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/danielmitterdorfer/32/110510_2.png) [@danielmitterdorfer](https://discuss.elastic.co/u/danielmitterdorfer)\
**Post date:** [November 29, 2017, 4:51pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/8 "2017-11-29T16:51:44Z")

</div>

Glad to hear! 🙂

Just to be clear: `esrallyd stop` should just be necessary in special circumstances like these where something seemed to be hanging. Usually, Rally will just transparently start / stop this internal process by itself.

---

<div class="post-metadata">

**Author:** ![Ankit3](https://avatars.discourse-cdn.com/v4/letter/a/bc79bd/32.png) [@Ankit3](https://discuss.elastic.co/u/Ankit3)\
**Post date:** [November 29, 2017, 5:14pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/9 "2017-11-29T17:14:28Z")

</div>

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:** [December 27, 2017, 5:14pm UTC](https://discuss.elastic.co/t/can-i-run-rally-on-local-elastic-instance/109488/10 "2017-12-27T17:14:47Z")

</div>

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