Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

I can't seem to be able to do a chaos login successfully #12

Open
nnarendravijay opened this issue Sep 7, 2018 · 4 comments
Open

I can't seem to be able to do a chaos login successfully #12

nnarendravijay opened this issue Sep 7, 2018 · 4 comments
Labels
bug Something isn't working

Comments

@nnarendravijay
Copy link

By following the standard procedure to log in to the hub :

Chaos Hub Url [https://chaoshub.com]: http://localhost:8080
Chaos Hub Token:
Traceback (most recent call last):
File "/Users/fjl054/.venvs/chaostk/bin/chaos", line 11, in
sys.exit(cli())
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 722, in call
return self.main(*args, **kwargs)
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/click/decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/chaoshub/cli.py", line 32, in login
set_chaos_hub_settings(hub_url, token, settings)
File "/Users/fjl054/.venvs/chaostk/lib/python3.7/site-packages/chaoshub/settings.py", line 13, in set_chaos_hub_settings
if 'auths' not in settings:
TypeError: argument of type 'NoneType' is not iterable

Python Version 3.7.0

@Lawouach Lawouach added the bug Something isn't working label Sep 7, 2018
@Lawouach
Copy link
Contributor

Lawouach commented Sep 7, 2018

I think this should move to https://github.com/chaostoolkit/chaostoolkit-chaoshub which is the Chaos Toolkit extension client for the chaoshub (hence the one breaking here).

@Lawouach
Copy link
Contributor

Lawouach commented Oct 5, 2018

Right,

So untile we fix this, the first time you should manually add the credentials to ~/.chaostoolkit/settings.yaml:

Just add a top-level entry as follows:

auths:
  127.0.0.1:8080:
    type: bearer
    value: <TOKEN>

The key is the domain where the hub responds to (here on 127.0.0.1:8080) and the token is the token you generated on the hub.

Once the first entry exists, future call to chaos login should work nicely.

@akhileshsarfare
Copy link

@Lawouach : I am facing the same issue. How do I locate SETTINGS.YAML file?
Tried FIND command on Linux (EC2 instance), did not find.

Note: I am running ChaosToolkit from within a virtual environment (Python).

@akhileshsarfare
Copy link

Right,

So untile we fix this, the first time you should manually add the credentials to ~/.chaostoolkit/settings.yaml:

Just add a top-level entry as follows:

auths:
  127.0.0.1:8080:
    type: bearer
    value: <TOKEN>

The key is the domain where the hub responds to (here on 127.0.0.1:8080) and the token is the token you generated on the hub.

Once the first entry exists, future call to chaos login should work nicely.

Hi, I created settings.yaml file as shown above. Still the output is same. I provided IP ADDRESS OF THE CONTAINER which is running ChaosHub.

curl <ip_of_the_container:port> does return ChaosHub homepage. CHAOS LOGIN command still fails.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants