Mesheryctl system login not stopping (after signed in successfully)

Hey there,
I’m facing an issue while configuring Meshery to access Minikube using the command mesheryctl system config minikube -t ~/Downloads/auth.json

Error: “Configuring Meshery to access Minikube…
Error getting context: Authentication token not found. Login with mesheryctl system login or supply a valid user token using the --token (or -t) flag.”

While running mesheryctl system login, I can’t see any changes on my terminal.

aminos@pop-os:~$ mesheryctl system login
✔ Meshery
Initiating login...
^C
aminos@pop-os:~$ ^C
aminos@pop-os:~$ mesheryctl system config minikube -t ~/Downloads/auth.json
Configuring Meshery to access Minikube...
Error getting context: Authentication token not found. Login with `mesheryctl system login` or supply a valid user token using the --token (or -t) flag.

Hmm. It seems that you canceled the initial mesheryctl system login command. This will have opened a web browser and allowed you to authenticate. After which the web browser window will close having downloaded a copy of your token. Will you confirm that you went through a login sequence in your browser? Confirm that your ~./meshery/config.yaml points to the location of of your freshly downloaded token file.

Yeah Lee, I cancelled that because it takes a lot of time to do so, I expect it to be working “while authenticating the user in visual studio code”, I saw that it sent a token in URL while hitting mesheryctl system login command, here’s the meshery’s config.yaml, it’s pointing to auth.json ig!

aminos@pop-os:~/.meshery$ cat config.yaml
contexts:
    custom:
        channel: stable
        components:
            - meshery-consul
        endpoint: http://localhost:9081
        platform: kubernetes
        provider: Meshery
        token: default
        version: latest
    k8s:
        endpoint: http://localhost:9081
        token: default
        platform: docker
        components:
            - meshery-app-mesh
            - meshery-istio
            - meshery-linkerd
            - meshery-consul
            - meshery-nsm
            - meshery-kuma
            - meshery-osm
            - meshery-traefik-mesh
            - meshery-nginx-sm
            - meshery-cilium
        channel: stable
        version: latest
        provider: Meshery
    local:
        channel: stable
        components:
            - meshery-app-mesh
            - meshery-istio
            - meshery-linkerd
            - meshery-consul
            - meshery-nsm
            - meshery-kuma
            - meshery-osm
            - meshery-traefik-mesh
            - meshery-nginx-sm
            - meshery-cilium
        endpoint: http://localhost:9081
        platform: kubernetes
        provider: Meshery
        token: default
        version: latest
current-context: k8s
tokens:
    - location: auth.json
      name: default

but, currently it’s something strange happening, while running the same comand

aminos@pop-os:~$ mesheryctl system login
failed to check Meshery Server status:  required dependency, docker-compose, is not present or docker is not available. Please run `mesheryctl system check --preflight` to verify system readiness: exit status 1

while checking the prerequisite, it’s showing correctly configured.

aminos@pop-os:~$ mesheryctl system check --preflight

Docker 
--------------
✓ Docker is running
✓ docker-compose is available

Kubernetes API 
--------------
✓ can initialize Kubernetes client
✓ can query the Kubernetes API

Kubernetes Version 
--------------
✓ running the minimum Kubernetes version
✓ running the minimum kubectl version

--------------
--------------
✓✓ Meshery prerequisites met

I just want to ask if there is any specific version of docker or docker-compose required for running mesheryctl?

Some routes are protected, and need user verification in order to execute the operation. You will have to provide the auth token.

You can get auth token in two ways:

  1. using mesheryctl after logging in
  2. or downloading token from meshery-ui

You will only get token once you’re successfully logged in.

1 Like

@aminos were the steps and suggestions provided above by maintainer @Abhi helpful?

1 Like

@Azanul.Haque will you investigate and speak to the Docker prerequisite and the potential discrepancy?

1 Like

Looking into it

@aminos What does your auth.json look like?

1 Like

Thanks everyone for the help, the issue is with auth.json, it was empty, seems like it can’t able to set up the token automatically.

I’ve to download it from “meshery-ui” as mentioned by @Abhi, & replace it with the auth.json file in the .meshery folder, finally, the result is as follows:

aminos@pop-os:~$ mesheryctl system login
✔ Meshery
Initiating login...
successfully authenticated