Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing tank on RHEL 6.6 caused ERROR: Import by filename is not supported. #145

Closed
RocketRaccoon opened this issue Mar 3, 2015 · 7 comments
Assignees

Comments

@RocketRaccoon
Copy link

Hi,
I have tried to install tank on RHEL 6.6 following these instructions 1 and 2.
When launching yandex-tank got following exception:

# yandex-tank
18:28:52 INFO: No config passed via cmdline, using ./load.ini
18:28:52 INFO: Loading configs...
18:28:52 INFO: Loading plugins...
18:28:52 INFO: Exception: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/yandextank/core/consoleworker.py", line 224, in configure
    self.core.load_plugins()
  File "/usr/lib/python2.6/site-packages/yandextank/core/tankcore.py", line 242, in load_plugins
    plugin = il.import_module(plugin_path)
  File "/usr/lib/python2.6/site-packages/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: Import by filename is not supported.
18:28:52 ERROR: Import by filename is not supported.
18:28:52 ERROR: Exception: Import by filename is not supported.

I'm not good either in linux nor python so will be grateful for the help

My load.ini

[tank]
plugin_web=Tank/Plugins/WebOnline.py
plugin_console=Tank/Plugins/ConsoleOnline.py
plugin_ShellExec=Tank/Plugins/ShellExec.py
plugin_phantom=Tank/Plugins/Phantom.py
plugin_aggreg=Tank/Plugins/Aggregator.py

[phantom]
address=google.ru
port=80
rps_schedule=const(2, 2m)
headers = [Host: google.ru] [Connection: close] [Bloody: yes]
uris=/

[web]
port = 80
interval = 5
manualstop = 1

Without [tank] section it works with no errors.

@doctornkz
Copy link

Just try this method:

[tank]
plugin_ShellExec=yandextank.plugins.ShellExec
plugin_phantom=yandextank.plugins.Phantom
plugin_aggreg=yandextank.plugins.Aggregator
plugin_console=yandextank.plugins.ConsoleOnline

You use "direct" way to install Yandex.Tank - from git. So you have to use python-style adding.

@RocketRaccoon
Copy link
Author

Cool. That worked.
How do I should add Web Online plugin?
It seems that it is not exist in plugins folder, was it renamed or moved?

@doctornkz
Copy link

As I know there is dedicated plugin for web online - nline https://github.com/yandex-load/yatank-online . Feel free to try and get support!

@RocketRaccoon
Copy link
Author

Ok, I have installed yatank-online (at least i think so). Added plugin_web=yatank_OnlineReport to my [tank] section. Should I add [web] section or it have to be configurated in another way? Now my ini file looks like:

[tank]
plugin_ShellExec=yandextank.plugins.ShellExec
plugin_phantom=yandextank.plugins.Phantom
plugin_aggreg=yandextank.plugins.Aggregator
plugin_console=yandextank.plugins.ConsoleOnline
plugin_web=yatank_OnlineReport

[phantom]
address=google.ru:80
rps_schedule=const(2, 2m)
headers = [Host: google.ru] [Connection: close] [Bloody: yes]

[web]
port = 8001
interval = 5
manualstop = 1

I'm expected to see online reporting on adress [server_name]:8001. Am I right?

@doctornkz
Copy link

I assigned question to direvius@ He is mainteiner Online plugin

@yarax
Copy link

yarax commented Mar 9, 2015

I have the same problem, but pointed tank section and installing via PyPI don't help:

19:43:15 INFO: No config passed via cmdline, using ./load.ini
19:43:15 INFO: Loading configs...
19:43:15 INFO: Loading plugins...
19:43:15 INFO: Exception: Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/consoleworker.py", line 224, in configure
    self.core.load_plugins()
  File "/usr/local/lib/python2.7/dist-packages/yandextank/core/tankcore.py", line 242, in load_plugins
    plugin = il.import_module(plugin_path)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: Import by filename is not supported.

19:43:15 ERROR: Import by filename is not supported.

My load.ini:

[tank]
plugin_ShellExec=yandextank.plugins.ShellExec
plugin_phantom=yandextank.plugins.Phantom
plugin_aggreg=yandextank.plugins.Aggregator
plugin_console=yandextank.plugins.ConsoleOnline

[phantom]
address=google.ru:80
rps_schedule=const(2, 2m)
headers = [Host: google.ru] [Connection: close] [Bloody: yes]

[web]
port = 8001
interval = 5
manualstop = 1

@maklaut
Copy link
Contributor

maklaut commented Aug 4, 2015

@yarax look for default yandex-tank ini, try these locations https://github.com/yandex-load/yandex-tank-api#tank-configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants