Rally can't connect to the remote cluster when install x-pack and is enabled


(andy_zhou) #1

[es@8 ~]$ esrally --pipeline=benchmark-only --target-hosts=11.11.165.61:9200

[ERROR] Cannot race. TransportError(401, 'security_exception', 'missing authentication token for REST request [/]')

the log file
2017-05-08 07:43:40,948 rally.track INFO Using index auto-management setting from track which is set to [True].
2017-05-08 07:43:40,949 rally.metrics INFO Creating ES metrics store
2017-05-08 07:43:40,949 rally.metrics INFO Creating connection to metrics store at f14cp-es-001:9200
2017-05-08 07:43:41,41 rally.metrics INFO Opening metrics store for invocation=[20170508T074340Z], track=[geonames], challenge=[append-n
o-conflicts], car=[external]
2017-05-08 07:43:41,463 rally.metrics INFO Creating ES race store
2017-05-08 07:43:41,463 rally.metrics INFO Creating connection to metrics store at f14cp-es-001:9200
2017-05-08 07:43:41,464 rally.actor INFO Joining already running actor system with system base [multiprocTCPBase].
2017-05-08 07:43:41,465 rally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:19
00', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Versi
on': (3, 6, 1, 'final', 0), 'Thespian Generation': (3, 6), 'Thespian Version': '1494229420399'}] match requirements [{'coordinator': Tru
e}].
2017-05-08 07:43:41,465 rally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:19
00', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Versi
on': (3, 6, 1, 'final', 0), 'Thespian Generation': (3, 6), 'Thespian Version': '1494229420399'}] match requirements [{'coordinator': Tru
e}].
2017-05-08 07:43:41,476 rally.racecontrol INFO Asking mechanic to start the engine.
2017-05-08 07:43:41,478 rally.mechanic INFO Received signal from race control to start engine.
2017-05-08 07:43:41,478 rally.mechanic INFO Target node(s) will not be provisioned by Rally.
2017-05-08 07:43:41,480 rally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:19
00', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Versi
on': (3, 6, 1, 'final', 0), 'Thespian Generation': (3, 6), 'Thespian Version': '1494229420399'}] match requirements [{'coordinator': Tru
e}].
2017-05-08 07:43:41,480 rally.actor INFO Capabilities [{'coordinator': True, 'ip': '127.0.0.1', 'Convention Address.IPv4': '127.0.0.1:19
00', 'Thespian ActorSystem Name': 'multiprocTCPBase', 'Thespian ActorSystem Version': 2, 'Thespian Watch Supported': True, 'Python Versi
on': (3, 6, 1, 'final', 0), 'Thespian Generation': (3, 6), 'Thespian Version': '1494229420399'}] match requirements [{'coordinator': Tru
e}].
2017-05-08 07:43:41,493 rally.mechanic INFO Starting engine
2017-05-08 07:43:41,496 rally.metrics INFO Opening metrics store for invocation=[20170508T074340Z], track=[None], challenge=[None], car=
[None]
2017-05-08 07:43:41,529 rally.mechanic INFO Starting engine.
2017-05-08 07:43:41,530 rally.client INFO Creating ES client connected to [{'host': '11.11.165.61', 'port': '9200'}] with options [{'tim
eout': 60000, 'request_timeout': 60000}]
2017-05-08 07:43:41,551 rally.mechanic ERROR Cannot process message [<esrally.mechanic.mechanic.StartEngine object at 0x7feb974d73c8>]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/esrally/mechanic/mechanic.py", line 244, in receiveMessage
cluster = self.mechanic.start_engine()
File "/usr/local/lib/python3.6/site-packages/esrally/mechanic/mechanic.py", line 347, in start_engine
self.cluster = self.launcher.start(self.provisioner.car, self.provisioner.binary_path, self.provisioner.data_paths)
File "/usr/local/lib/python3.6/site-packages/esrally/mechanic/launcher.py", line 161, in start
distribution_version = es.info()["version"]["number"]
File "/usr/local/lib/python3.6/site-packages/elasticsearch/client/utils.py", line 71, in _wrapped
return func(*args, params=params, **kwargs)
File "/usr/local/lib/python3.6/site-packages/elasticsearch/client/init.py", line 222, in info
return self.transport.perform_request('GET', '/', params=params)
File "/usr/local/lib/python3.6/site-packages/elasticsearch/transport.py", line 318, in perform_request
status, headers, data = connection.perform_request(method, url, params, body, ignore=ignore, timeout=timeout)
File "/usr/local/lib/python3.6/site-packages/elasticsearch/connection/http_urllib3.py", line 127, in perform_request
self._raise_error(response.status, raw_data)
File "/usr/local/lib/python3.6/site-packages/elasticsearch/connection/base.py", line 122, in _raise_error
raise HTTP_EXCEPTIONS.get(status_code, TransportError)(status_code, error_message, additional_info)
elasticsearch.exceptions.AuthenticationException: TransportError(401, 'security_exception', 'missing authentication token for REST reque
st [/]')
2017-05-08 07:43:41,610 rally.racecontrol INFO Starting engine has failed. Reason [TransportError(401, 'security_exception', 'missing au
thentication token for REST request [/]')].
2017-05-08 07:43:41,610 rally.main INFO Attempting to shutdown internal actor system.
2017-05-08 07:43:41,728 root INFO ---- Actor System shutdown
2017-05-08 07:43:41,729 rally.main INFO Shutdown completed.
2017-05-08 07:43:41,729 root ERROR Cannot run subcommand [race].
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 429, in dispatch_sub_command
race(cfg)
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 375, in race
with_actor_system(lambda c: racecontrol.run(c), cfg)
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 395, in with_actor_system
runnable(cfg)
File "/usr/local/lib/python3.6/site-packages/esrally/rally.py", line 375, in
with_actor_system(lambda c: racecontrol.run(c), cfg)
File "/usr/local/lib/python3.6/site-packages/esrally/racecontrol.py", line 323, in run
raise e
File "/usr/local/lib/python3.6/site-packages/esrally/racecontrol.py", line 320, in run
pipeline(cfg)
File "/usr/local/lib/python3.6/site-packages/esrally/racecontrol.py", line 42, in call
self.target(cfg)
File "/usr/local/lib/python3.6/site-packages/esrally/racecontrol.py", line 269, in benchmark_only
return race(Benchmark(cfg, external=True))
File "/usr/local/lib/python3.6/site-packages/esrally/racecontrol.py", line 218, in race
benchmark.setup()
File "/usr/local/lib/python3.6/site-packages/esrally/racecontrol.py", line 107, in setup
raise exceptions.RallyError(result.message)
esrally.exceptions.RallyError: TransportError(401, 'security_exception', 'missing authentication token for REST request [/]')


(Daniel Mitterdorfer) #2

Hi @zqc0512,

please see the docs on the command line flag --client-options that show how pass the authentication info.

Daniel


(system) #3

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