Mesheryctl system login problem

Meshery deployed on Kubernetes. 
Meshery is starting... 
Opening Meshery UI in browser at [http://localhost:31793](http://localhost:31793/)

when I run mesheryctl system start, the port assigned(31793) is unreachable so I need to do mesheryctl system dashboard --port-forward .
However, then if I run mesheryctl system login it is still connecting to the port 31793 instead of 9081

authentication failed: Unable to reach Meshery server at http://localhost:31793. Verify your environment’s readiness for a Meshery deployment by running mesheryctl system check.

Any help would be appreciated!

@weilirs did you run mesheryctl system check can you please
share the logs ?

@Yash_Sharma this is the log, I think it is checking the port assigned but not the port forwarded(9081)

➜ meshery git:(master) mesheryctl system check

Kubernetes API

✓ can initialize Kubernetes client
✓ can query the Kubernetes API

Kubernetes Version

✓ running the minimum Kubernetes version
✓ running the minimum kubectl version

Meshery Version

!! failed to check Meshery Server version. try starting Meshery with mesheryctl system start
!! CLI is not up-to-date (stable-v0.8.26)

Meshery Components

Error: !! Authentication token not found. Please supply a valid user token. Login with mesheryctl system login

Hi @weilirs ,
The issue occurs because Minikube does not support LoadBalancer services by default, while Meshery UI and Meshery Broker rely on LoadBalancer networking.

To resolve this, you can follow these steps:
Step 1. Delete the Meshery namespace to remove any previous configurations
kubectl delete namespace meshery
Step 2. Use Minikube tunnel to expose services.
minikube tunnel
Step 3. Setting up Meshery with the correct networking setup
mesheryctl system start

For more detail, check out this official document: Troubleshooting Meshery Installations | Meshery

I hope this helps! Let me know if you need further assistance.

Thank you! I can login using mesheryctl following you instructions!
May I ask one more question? When I tried to stop Meshery using mesheryctl system stop I got this error. Do you know how to handle this? thanks!

meshery git:(master) ✗ mesheryctl system stop 
Meshery deployments will be deleted from your cluster. Are you sure you want to continue [y/n]? y
Stopping Meshery resources...
Error: failed to stop Meshery
See https://docs.meshery.io/reference/mesheryctl/system for usage details
: cannot delete CR meshery-broker: the server could not find the requested resource

Hey @weilirs, I used the force stop command for this, but there might be another approach. @Riya @codeknight03, any suggestions?