Can i run rally on local elastic instance

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 ?

Hi,

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

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:

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

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)
~

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?

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

2 Likes

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)

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

2 Likes

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

Glad to hear! :slight_smile:

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.

2 Likes

Thanks :slight_smile:

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