Getting config error: You must provide API token to use cloud provisioning when trying to execute the code in cloud mode in taurus

412 views
Skip to first unread message

abinayajag...@gmail.com

unread,
Apr 11, 2018, 12:20:00 PM4/11/18
to codename-taurus
Hello everyone

I need my code to be executed in cloud provisioning and i want my report in blazemeter. I generated API key and updated in bzt.rc file which is in my directory where all my scripts are present.

while running the code in taurus the following error is being displayed:
CONFIG ERROR: You must provide an API token to use cloud provisioning

In log file the following, I found the below logs
[2018-04-11 21:47:31,903 DEBUG root] Importing module: bzt.modules.aggregator
[2018-04-11 21:47:31,993 DEBUG root] Loading class: 'ConsolidatingAggregator' from <module 'bzt.modules.aggregator' from 'C:\\Program Files\\Python35\\lib\\site-packages\\bzt\\modules\\aggregator.py'>
[2018-04-11 21:47:31,993 DEBUG Engine.consolidator] Buffer scaling setup: percentile 95.0 from [0.0, 50.0, 90.0, 95.0, 99.0, 99.9, 100.0] selected
[2018-04-11 21:47:31,993 DEBUG Engine] Module config: monitoring defaultdict(None, {'class': 'bzt.modules.monitoring.Monitoring'})
[2018-04-11 21:47:31,993 DEBUG root] Importing module: bzt.modules.monitoring
[2018-04-11 21:47:32,009 DEBUG root] Loading class: 'Monitoring' from <module 'bzt.modules.monitoring' from 'C:\\Program Files\\Python35\\lib\\site-packages\\bzt\\modules\\monitoring.py'>
[2018-04-11 21:47:32,009 DEBUG Engine.monitoring] Should not run because of non-matching prov: cloud != local
[2018-04-11 21:47:32,009 DEBUG Engine] Module config: cloud defaultdict(None, {'default-location': 'us-central1-a', 'class': 'bzt.modules.blazemeter.CloudProvisioning'})
[2018-04-11 21:47:32,009 DEBUG root] Importing module: bzt.modules.blazemeter
[2018-04-11 21:47:32,328 DEBUG easyprocess] version=0.2.3
[2018-04-11 21:47:32,344 DEBUG pyvirtualdisplay] version=0.2.1
[2018-04-11 21:47:32,344 DEBUG root] Loading class: 'CloudProvisioning' from <module 'bzt.modules.blazemeter' from 'C:\\Program Files\\Python35\\lib\\site-packages\\bzt\\modules\\blazemeter.py'>
[2018-04-11 21:47:32,344 DEBUG Engine] Module config: blazemeter defaultdict(None, {'class': 'bzt.modules.blazemeter.BlazeMeterUploader'})
[2018-04-11 21:47:32,344 DEBUG root] Importing module: bzt.modules.blazemeter
[2018-04-11 21:47:32,344 DEBUG root] Loading class: 'BlazeMeterUploader' from <module 'bzt.modules.blazemeter' from 'C:\\Program Files\\Python35\\lib\\site-packages\\bzt\\modules\\blazemeter.py'>
[2018-04-11 21:47:32,344 ERROR root] Config Error: You must provide API token to use cloud provisioning
[2018-04-11 21:47:32,360 DEBUG root] TaurusConfigError: You must provide API token to use cloud provisioning
  File "C:\Program Files\Python35\lib\site-packages\bzt\cli.py", line 224, in perform
    self.engine.prepare()
  File "C:\Program Files\Python35\lib\site-packages\bzt\engine.py", line 160, in prepare
    self.__prepare_provisioning()
  File "C:\Program Files\Python35\lib\site-packages\bzt\engine.py", line 492, in __prepare_provisioning
    self.provisioning.prepare()
  File "C:\Program Files\Python35\lib\site-packages\bzt\modules\blazemeter.py", line 1574, in prepare
    self._configure_client()
  File "C:\Program Files\Python35\lib\site-packages\bzt\modules\blazemeter.py", line 1655, in _configure_client
    raise TaurusConfigError("You must provide API token to use cloud provisioning")

Can someone please help me with this...

Dimitri Pribysh

unread,
Apr 11, 2018, 12:28:57 PM4/11/18
to abinayajag...@gmail.com, codename-taurus

Hello,

Can you show a segment of your .bzt-rc file in which you're setting the token?


  Dimitri
--
You received this message because you are subscribed to the Google Groups "codename-taurus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taur...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codename-taurus/43bb98de-c140-4dc5-8a1e-e3660bd2f738%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dimitri Pribysh

unread,
Apr 11, 2018, 12:38:38 PM4/11/18
to Abinaya jaganathan, codename-taurus

Strange.

Take a look into the effective.yml file from artifacts. Does it have a token set in modules.blazemeter.token?


  Dimitri
On 11/04/18 19:32, Abinaya jaganathan wrote:
---

# BlazeMeter reporting settings

modules:
  blazemeter:
    token: ff5ba63510d52d4a42475905:7f4679d43fc07b459786bac7273848d4fd2608d9074bc852e31a3dc09be8bec3d7411cac  # API id and API secret joined with ':'
#    test: Taurus Cloud Test  # name for test to store reports
#    project: My Taurus Project  # name for project to store test, can be numeric project ID
#    public-report: false  # set to true to create a public link to the report
#
#    browser-open: start  # auto-open the report in browser,

To unsubscribe from this group and stop receiving emails from it, send an email to codename-taurus+unsubscribe@googlegroups.com.

Dimitri Pribysh

unread,
Apr 12, 2018, 9:41:13 AM4/12/18
to Abinaya jaganathan, codename-taurus

Well, that was a bad idea to ask for your private token on a public forum. Sorry about that. Don't forget to regenerate your BlazeMeter token.

Any updates regarding `effective.yml`?


On 11/04/18 19:32, Abinaya jaganathan wrote:
---

# BlazeMeter reporting settings

modules:
  blazemeter:
    token: ff5ba63510d52d4a42475905:7f4679d43fc07b459786bac7273848d4fd2608d9074bc852e31a3dc09be8bec3d7411cac  # API id and API secret joined with ':'
#    test: Taurus Cloud Test  # name for test to store reports
#    project: My Taurus Project  # name for project to store test, can be numeric project ID
#    public-report: false  # set to true to create a public link to the report
#
#    browser-open: start  # auto-open the report in browser,
On Wed, Apr 11, 2018 at 9:58 PM, Dimitri Pribysh <pri...@blazemeter.com> wrote:
To unsubscribe from this group and stop receiving emails from it, send an email to codename-taurus+unsubscribe@googlegroups.com.

anita.k...@gmail.com

unread,
Sep 13, 2018, 7:34:11 AM9/13/18
to codename-taurus
Hello Dimitri,

I have the same problem as described above. In the effective.yml file the token key is missing from modules.blazemeter. Any idea why it is not picked up from the bzt-rc file? Can it have anything to do with the script not being in the same folder as the .zt dir?

Anita

Op woensdag 11 april 2018 18:28:57 UTC+2 schreef Dimitri Pribysh:

Andrey Pokhilko

unread,
Sep 13, 2018, 7:49:39 AM9/13/18
to codenam...@googlegroups.com

It means that token is not specified correctly. For example, required structure of "module" and "blazemeter" is not uncommented or not properly indented.

Andrey Pokhilko
13.09.2018 14:34, anita.k...@gmail.com пишет:
CAUTION: This email originated from outside of CA. Do not click links or open attachments unless you recognize the sender and know the content is safe.

Wenjin Chua

unread,
Nov 10, 2021, 11:50:06 PM11/10/21
to codename-taurus
i put the api key directly in the yml file and it works
i think there was some change in the base code that does not get the api info from .bzt-rc

---
execution:
  - scenario:
      think-time: 0.75
      requests:
        - http://blazedemo.com/
    concurrency: 10
    ramp-up: 40s
    hold-for: 2m
    locations:
      us-east-1: 1
      
modules:
  blazemeter:
    token: 22222222:1111111

Reply all
Reply to author
Forward
0 new messages