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

Unable to login on a remote server #1992

Open
dule-git opened this issue Jan 13, 2023 · 2 comments
Open

Unable to login on a remote server #1992

dule-git opened this issue Jan 13, 2023 · 2 comments

Comments

@dule-git
Copy link

dule-git commented Jan 13, 2023

Description

Hello, I have been following a tutorial that sets up my own microservice in the cloud with go micro and kubernetes.

The tutorial has a kubernetes cluster as a prerequisite, so I followed another tutorial by the same author to create a kubernetes cluster.

To sum up the tutorials so you may get the big picture:
I first used Hetzner Cloud to by some machines on a remote location so I can deploy my Rancher server there. Rancher is a UI tool for creating and managing a kubernetes cluster.

Therefore, I:

  • Bought a machine on Hetzner Cloud
  • Deployed my Rancher server there
  • Went to a public IP to log into Rancher
  • Made a kubernetes cluster with one master and one worker node.
    Everything was successful there, I could download kube's .config and manipulate the cluster from the command line.

The next tutorial was on how you deploy go micro framework and your own helloworld microservice in the kubernetes cluster.
The tutorial walks you through deploying go micro's services first, and then shows you the deployment for your own microservice.

I managed to do everything and all of my services are up and running. There is just one problem, I can't log into the micro server with username: admin and password: micro.

Symptoms

What I can do:

  • I can list kubernetes pods with kubectl get pods -n micro
  • I can log into a particular pod (I logged into api like in tutorial) with kubectl exec -it -n micro {{pod}} -- bash
  • There I see the micro exec.
    From there, the tutorial just said log in and execute ./micro services and it lists all the services, but I am unable to log in. When I try with the default "admin, micro" combination it says Invalid token provided.
    I checked the jwt tokens in MICRO_AUTH_PRIVATE_KEY and MICRO_AUTH_PUBLIC_KEY and they match in every service.

I am able to create another user after which I get access denied to namespace error when trying to list the services. I am unable to create rules with that user.

Please help, this has been haunting me for days. 🙏🏽

@dule-git
Copy link
Author

@asim Can you please look if it looks familiar?

@asim
Copy link
Member

asim commented Jan 18, 2023

I'm sorry I'm not currently supporting the project. It looks as though you're using a very old tutorial written by someone else so it's hard for me to comment on that. By default the user and password is always admin/micro. If that login fails it could imply any number of issues. Local config, wrong Auth setup, errors with the auth service. You can try check Auth service logs to see if there's anything there. When creating a new account you need to be careful what namespace you are setting. I believe it's micro by default or no namespace. You also need to make sure to set the scope of admin. Otherwise nothing will work.

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

2 participants