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

cannot log into controller: JIMM does not support login from old clients (not supported) #1463

Open
pik4ez-canonical opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels

Comments

@pik4ez-canonical
Copy link

Jimmctl responds with an error when trying to authenticate to the existing controller (jimm-k8s):

$ juju login -u <email> -c jimm-k8s
ERROR cannot log into controller "jimm-k8s": JIMM does not support login from old clients (not supported)

If there is an active session (just authenticated), it is still possible to operate jimm-k8s controller after having this error.

$ juju models
Controller: jimm-k8s

Model  Cloud/Region  Type  Status  Access  Last connection
...

But it looks like when the token expired, executing mentioned juju login command leads to inability to work with the controller. In case of stale session:

$ juju login -u <email> -c jimm-k8s
ERROR cannot log into controller "jimm-k8s": JIMM does not support login from old clients (not supported)

$ juju models
ERROR account details for controller jimm-k8s not found
$ juju status
ERROR current model for controller jimm-k8s not found

As a work around:

$ juju unregister jimm-k8s
$ juju login <jimm-dns-name> -c jimm-k8s

Juju client: 3.5.4-genericlinux-amd64.
JIMM charm: 3/edge.

Juju login command debug output:

$ juju login -u <email> -c jimm-k8s --debug
15:47:36 INFO  juju.cmd supercommand.go:56 running juju [3.5.4 31b4b0914740b84ad8166993635ac797a44276de gc go1.23.1]
15:47:36 DEBUG juju.cmd supercommand.go:57   args: []string{"/snap/juju/28520/bin/juju", "login", "-u", "<email>", "-c", "jimm-k8s", "--debug"}
15:47:36 INFO  juju.juju api.go:86 connecting to API addresses: [test-jimm.localhost:443]
15:47:36 DEBUG juju.api apiclient.go:1036 successfully dialed "wss://test-jimm.localhost:443/api"
15:47:36 INFO  juju.api apiclient.go:571 connection established to "wss://test-jimm.localhost:443/api"
ERROR cannot log into controller "jimm-k8s": JIMM does not support login from old clients (not supported)
15:47:36 DEBUG cmd supercommand.go:549 error stack: 
JIMM does not support login from old clients (not supported)
github.com/juju/juju/rpc.(*Conn).Call:178: 
github.com/juju/juju/api.(*legacyLoginProvider).Login:166: 
github.com/juju/juju/api.loginWithContext:252: 
github.com/juju/juju/api.Open:189: 
github.com/juju/juju/juju.NewAPIConnection:91: 
github.com/juju/juju/cmd/juju/user.(*loginCommand).login:559: 
github.com/juju/juju/cmd/juju/user.(*loginCommand).run:244: cannot log into controller "jimm-k8s"
@ale8k ale8k added the triaged label Dec 16, 2024
@SimoneDutto
Copy link
Contributor

hi @pik4ez-canonical, thank you for the report.
I've looked into it, and it's an issue in the juju login command. It doesn't try the OAuth flow when the domain is not specified. So for now, always use the controller domain juju login <controller-domain> -c <controller>.
We have discussed the issue with the Juju team, and I'll update this issue if we find a solution.

Also, don't use the -u flag, because your email will be extracted from the oauth flow, so there is no need to specify it.
Let me know if you need anything else.

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

No branches or pull requests

3 participants