[ERROR] Cannot race. pid file not available after 60 seconds! in rally

I tried to run rally with following command

esrally race --distribution-version=8.4.0 --track=geonames --challenge=append-no-conflicts 

but I got this error message

[ERROR] Cannot race. pid file not available after 60 seconds!
	Traceback (most recent call last):
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/mechanic.py", line 598, in receiveMsg_StartNodes
    self.mechanic.start_engine()
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/mechanic.py", line 718, in start_engine
    self.nodes = self.launcher.start(self.node_configs)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 133, in start
    return [self._start_node(node_configuration, node_count_on_host) for node_configuration in node_configurations]
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 133, in <listcomp>
    return [self._start_node(node_configuration, node_count_on_host) for node_configuration in node_configurations]
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 163, in _start_node
    node_pid = self._start_process(binary_path, env)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 224, in _start_process
    return wait_for_pidfile(pid_path)
  File "/Users/my-mac6/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 115, in wait_for_pidfile
    raise exceptions.LaunchError(msg)
esrally.exceptions.LaunchError: pid file not available after 60 seconds!

and this is the part of rally.log because it is too long I did'nt uploaded full log message but I would do if you want to

2022-11-20 13:43:31,674 ActorAddr-(T|:64579)/PID:21243 esrally.metrics INFO Creating file race store
2022-11-20 13:43:31,675 ActorAddr-(T|:64579)/PID:21243 esrally.actor INFO Asking mechanic to start the engine.
2022-11-20 13:43:31,675 ActorAddr-(T|:64579)/PID:21243 esrally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:1900', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Version': (3, 8, 9, 'final', 0), 'Thespian Generation': (3, 10), 'Thespian Version': '1668951809958'}] match requirements [{'coordinator': True}].
2022-11-20 13:43:31,697 ActorAddr-(T|:64596)/PID:21261 esrally.actor INFO Received signal from race control to start engine.
2022-11-20 13:43:32,331 ActorAddr-(T|:64596)/PID:21261 esrally.utils.repo INFO Checking out [master] in [/Users/my-mac/.rally/benchmarks/teams/default] for distribution version [8.4.0].
2022-11-20 13:43:32,360 ActorAddr-(T|:64596)/PID:21261 esrally.utils.process INFO 'master' 브랜치로 전환합니다
브랜치가 'origin/master'에 맞게 업데이트된 상태입니다.

2022-11-20 13:43:32,361 ActorAddr-(T|:64596)/PID:21261 esrally.utils.repo INFO Rebasing on [master] in [/Users/my-mac/.rally/benchmarks/teams/default] for distribution version [8.4.0].
2022-11-20 13:43:32,400 ActorAddr-(T|:64596)/PID:21261 esrally.utils.process INFO 이미 'master'에 있습니다
브랜치가 'origin/master'에 맞게 업데이트된 상태입니다.

2022-11-20 13:43:32,426 ActorAddr-(T|:64596)/PID:21261 esrally.utils.process INFO Current branch master is up to date.

2022-11-20 13:43:32,453 ActorAddr-(T|:64596)/PID:21261 esrally.actor INFO Cluster consisting of [{'host': '127.0.0.1', 'port': 39200}] will be provisioned by Rally.
2022-11-20 13:43:32,454 ActorAddr-(T|:64596)/PID:21261 esrally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:1900', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Version': (3, 8, 9, 'final', 0), 'Thespian Generation': (3, 10), 'Thespian Version': '1668951809958'}] match requirements [{}].
2022-11-20 13:43:32,471 ActorAddr-(T|:64613)/PID:21279 esrally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:1900', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Version': (3, 8, 9, 'final', 0), 'Thespian Generation': (3, 10), 'Thespian Version': '1668951809958'}] match requirements [{'coordinator': True}].
2022-11-20 13:43:32,486 ActorAddr-(T|:64616)/PID:21280 esrally.actor INFO Starting node(s) [0] on [127.0.0.1].
2022-11-20 13:43:32,490 ActorAddr-(T|:64616)/PID:21280 esrally.metrics INFO Opening metrics store for race timestamp=[20221120T134329Z], track=[geonames], challenge=[append-no-conflicts], car=[['defaults']]
2022-11-20 13:43:33,177 ActorAddr-(T|:64616)/PID:21280 esrally.utils.repo INFO Checking out revision [c9ca37f] in [/Users/my-mac/.rally/benchmarks/teams/default].
2022-11-20 13:43:33,208 ActorAddr-(T|:64616)/PID:21280 esrally.utils.process INFO Note: switching to 'c9ca37f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD의 현재 위치는 c9ca37f Add arch specific build commands (#75)

2022-11-20 13:44:59,154 ActorAddr-(T|:64579)/PID:21243 esrally.actor INFO Received a benchmark failure from [ActorAddr-(T|:64596)] and will forward it now.
2022-11-20 13:43:33,212 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.supplier INFO Enabling source artifact caching.
2022-11-20 13:44:59,156 -not-actor-/PID:21237 esrally.racecontrol ERROR A benchmark failure has occurred
2022-11-20 13:44:59,156 -not-actor-/PID:21237 esrally.racecontrol INFO Telling benchmark actor to exit.
2022-11-20 13:43:33,213 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.java_resolver INFO Allowed JDK versions are [18, 17, 16, 15, 14, 13, 12, 11].
2022-11-20 13:44:59,157 ActorAddr-(T|:64579)/PID:21243 esrally.actor INFO BenchmarkActor received unknown message [ActorExitRequest] (ignoring).
2022-11-20 13:43:33,291 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.java_resolver INFO Detected JDK with major version [17] in [/Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home].
2022-11-20 13:43:33,294 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.supplier INFO Resolved download URL [https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-8.4.0-darwin-x86_64.tar.gz?x-elastic-no-kpi=true] for version [8.4.0]
2022-11-20 13:44:59,159 ActorAddr-(T|:64596)/PID:21261 esrally.actor INFO MechanicActor#receiveMessage unrecognized(msg = [<class 'thespian.actors.ActorExitRequest'>] sender = [ActorAddr-(T|:64579)])
2022-11-20 13:43:33,295 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.supplier INFO Skipping download for version [8.4.0]. Found an existing binary at [/Users/my-mac/.rally/benchmarks/distributions/elasticsearch-8.4.0-darwin-x86_64.tar.gz].
2022-11-20 13:43:33,295 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Preparing candidate locally in [/Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install].
2022-11-20 13:44:59,161 ActorAddr-(T|:64613)/PID:21279 esrally.actor INFO mechanic.Dispatcher#receiveMessage unrecognized(msg = [<class 'thespian.actors.ActorExitRequest'>] sender = [ActorAddr-(T|:64596)])
2022-11-20 13:43:33,298 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Unzipping /Users/my-mac/.rally/benchmarks/distributions/elasticsearch-8.4.0-darwin-x86_64.tar.gz to /Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install
2022-11-20 13:43:39,54 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Deleting pre-bundled Elasticsearch configuration at [/Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install/elasticsearch-8.4.0/config]
2022-11-20 13:44:59,295 ActorAddr-(T|:64613)/PID:21279 esrally.actor INFO mechanic.Dispatcher#receiveMessage unrecognized(msg = [<class 'thespian.actors.ChildActorExited'>] sender = [ActorAddr-(T|:64616)])
2022-11-20 13:43:39,56 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Reading config template file [/Users/my-mac/.rally/benchmarks/teams/default/cars/v1/vanilla/templates/config/elasticsearch.yml] and writing to [/Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install/elasticsearch-8.4.0/config/elasticsearch.yml].
2022-11-20 13:44:59,296 ActorAddr-(T|:64596)/PID:21261 esrally.actor ERROR Child actor exited with [ChildActorExited:ActorAddr-(T|:64613)] while in status [starting].
2022-11-20 13:43:39,68 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Reading config template file [/Users/my-mac/.rally/benchmarks/teams/default/cars/v1/vanilla/templates/config/log4j2.properties] and writing to [/Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install/elasticsearch-8.4.0/config/log4j2.properties].
2022-11-20 13:43:39,69 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Reading config template file [/Users/my-mac/.rally/benchmarks/teams/default/cars/v1/vanilla/templates/config/jvm.options] and writing to [/Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install/elasticsearch-8.4.0/config/jvm.options].
2022-11-20 13:44:59,299 ActorAddr-(T|:64579)/PID:21243 esrally.actor INFO BenchmarkActor received unknown message [ChildActorExited:ActorAddr-(T|:64596)] (ignoring).
2022-11-20 13:43:39,76 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.java_resolver INFO Allowed JDK versions are [18, 17, 16, 15, 14, 13, 12, 11].
2022-11-20 13:43:39,131 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.java_resolver INFO Detected JDK with major version [17] in [/Library/Java/JavaVirtualMachines/jdk-17.0.5.jdk/Contents/Home].
2022-11-20 13:43:39,132 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.launcher INFO Starting node [rally-node-0].
2022-11-20 13:44:59,136 ActorAddr-(T|:64616)/PID:21280 root ERROR pid file not available after 60 seconds!
2022-11-20 13:44:59,137 ActorAddr-(T|:64616)/PID:21280 esrally.actor ERROR Cannot process message [<esrally.mechanic.mechanic.StartNodes object at 0x1087717c0>]
Traceback (most recent call last):

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/mechanic.py", line 598, in receiveMsg_StartNodes
    self.mechanic.start_engine()

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/mechanic.py", line 718, in start_engine
    self.nodes = self.launcher.start(self.node_configs)

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 133, in start
    return [self._start_node(node_configuration, node_count_on_host) for node_configuration in node_configurations]

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 133, in <listcomp>
    return [self._start_node(node_configuration, node_count_on_host) for node_configuration in node_configurations]

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 163, in _start_node
    node_pid = self._start_process(binary_path, env)

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 224, in _start_process
    return wait_for_pidfile(pid_path)

  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/mechanic/launcher.py", line 115, in wait_for_pidfile
    raise exceptions.LaunchError(msg)

esrally.exceptions.LaunchError: pid file not available after 60 seconds!

2022-11-20 13:44:59,163 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.mechanic INFO Stopping nodes [].
2022-11-20 13:44:59,163 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.launcher INFO Shutting down [0] nodes on this host.
2022-11-20 13:44:59,164 ActorAddr-(T|:64616)/PID:21280 esrally.metrics INFO Creating file race store
2022-11-20 13:44:59,164 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.mechanic WARNING Cannot store system metrics: No race with race id [f7466114-0ecc-4859-b4c0-7b0d4049d079].
2022-11-20 13:44:59,164 ActorAddr-(T|:64616)/PID:21280 esrally.metrics INFO Closing metrics store.
2022-11-20 13:44:59,164 ActorAddr-(T|:64616)/PID:21280 esrally.mechanic.provisioner INFO Wiping benchmark candidate installation at [/Users/my-mac/.rally/benchmarks/races/f7466114-0ecc-4859-b4c0-7b0d4049d079/rally-node-0/install/elasticsearch-8.4.0].
2022-11-20 13:45:02,161 -not-actor-/PID:21237 esrally.rally INFO Attempting to shutdown internal actor system.
2022-11-20 13:45:02,164 -not-actor-/PID:21242 root INFO ActorSystem Logging Shutdown
2022-11-20 13:45:02,186 -not-actor-/PID:21241 root INFO ---- Actor System shutdown
2022-11-20 13:45:02,187 -not-actor-/PID:21237 esrally.rally INFO Actor system is still running. Waiting...
2022-11-20 13:45:03,191 -not-actor-/PID:21237 esrally.rally INFO Shutdown completed.
2022-11-20 13:45:03,192 -not-actor-/PID:21237 esrally.rally ERROR Cannot run subcommand [race].
Traceback (most recent call last):
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/rally.py", line 1107, in dispatch_sub_command
    race(cfg, args.kill_running_processes)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/rally.py", line 865, in race
    with_actor_system(racecontrol.run, cfg)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/rally.py", line 895, in with_actor_system
    runnable(cfg)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/racecontrol.py", line 373, in run
    raise e
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/racecontrol.py", line 370, in run
    pipeline(cfg)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/racecontrol.py", line 71, in __call__
    self.target(cfg)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/racecontrol.py", line 302, in from_distribution
    return race(cfg, distribution=True)
  File "/Users/my-mac/Library/Python/3.8/lib/python/site-packages/esrally/racecontrol.py", line 267, in race
    raise exceptions.RallyError(result.message, result.cause)
esrally.exceptions.RallyError: pid file not available after 60 seconds!

some non-english parts are not big deal just something about git branch

I run rally locally and use jdk17 I've never modified config file

I deleted a folder in .rally/benchmarks/races/raceId before but I think this error happened due to something else

also my rally.init

[meta]
config.version = 17

[system]
env.name = local

[node]
root.dir = /Users/mk-mac-386/.rally/benchmarks
src.root.dir = /Users/mk-mac-386/.rally/benchmarks/src

[source]
remote.repo.url = https://github.com/elastic/elasticsearch.git
elasticsearch.src.subdir = elasticsearch

[benchmarks]
local.dataset.cache = /Users/mk-mac-386/.rally/benchmarks/data

[reporting]
datastore.type = in-memory
datastore.host =
datastore.port =
datastore.secure = False
datastore.user =
datastore.password =


[tracks]
default.url = https://github.com/elastic/rally-tracks

[teams]
default.url = https://github.com/elastic/rally-teams

[defaults]
preserve_benchmark_candidate = false

[distributions]
release.cache = true

Hello! Thank you for your interest in Rally.

Can you please delete rally.log and build.log, try again and upload both files in full?

Problem solved. I shut down race by force before and the node used in that race still remained in my local server

I figured this out by running elasticsearch-8.4.0/bin/elasticsearch -d

org.elasticsearch.transport.BindTransportException: Failed to bind to 127.0.0.1:39300
...
Caused by: java.net.BindException: Address already in use

I killed port 39300, ran again rally and everything was fine