-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[SOLVED] chectl server: commands return "Error Unauthorized" after update #19642
Comments
@Mbd06b can you please provide the full command, output and log of the command that is failing? The previous and working version of chectl was 7.28.0? |
@Mbd06b |
Could you check:
|
It might be related to #15331 |
Here's a sample from ~/.cache/chetcl/error.log .the messages are all following similar pattern... chenamespace doesn't seem to do anything... |
I dig in the code and I didn't see anything suspicious. Could you try the previous version if it still works (ignore chectl update)? cd ~/.local/share/chectl/client/7.28.0/bin
./run server:status |
the only client in that directory is the most up-to-date chectl version. Are there instructions on how to downgrade chectl, or how to remove entirely to perform a clean install of chectl? |
My best guess at this point is that there is some kind of disagreement between kubectl and chectl. I assume chectl uses kubectl somehow to do it's work, but every time it attempts to do something kubernetes is rejecting chectl's requests. 'KubeHelper.wrapK8sClientError()' |
To remove chectl completely:
To install from the scratch:
|
This is the key: Why is this failing? |
@Mbd06b git clone https://github.com/che-incubator/chectl.git
cd chectl
yarn
cd bin
./debug Use VS Code and |
@tolusha I've been working on setting up a remote debug. I've not done a remote debug before so it will take me a little time to set it up and try it out. In a remote debug situation, do you have a copy of the source on your localmachine while connecting to the remote debug over the internet? Or do you have to run the debug locally on the same machine where you are trying to use chectl, connecting to the port on localhost? |
ok, I'm able to run the ./debug on the remote server, just needed to specify to node inspect port argument in the chectl/bin/debug command. [Update] even better, update argument --inspect-brk=9030 (see: https://nodejs.org/en/docs/guides/debugging-getting-started/ ) This article helped enormously on how to attach a node debugger to VS code. Using the SSH tunnel seems like more of a requirement if you want to do any "really remote" debugging. https://maikthulhu.github.io/2019-05-17-remote-debugging-node-vscode/ |
So far this is the error that I can see from stepping through debug. |
Everything looks find. I see a breakpoint mark on 1626 line.
|
Ok, I figured it out, and it's not chectl's fault (however chectl errors had no clues to the feedback) What was happening was that my kube config credentials were not being read properly, this was preventing not only chectl from working, but helm was throwing errors too. This config is found in ~/.kube/config I haven't been able to figure out what exactly triggered my problem (maybe a microk8s update), hopefully that's enough clues for anyone to Google for them if you're experiencing a similar issue, google my problem and surf similar issues in the helm forums as chectl and helm interact similarly with the kubernetes cluster |
@Mbd06b |
I've been using chectl successfully for a while.
chectl updated itself from 7.28.0 to 7.29.0 when I was going to perform a chectl server:update.
chectl version
chectl/7.29.0 linux-x64 node-v12.22.1
almost every chectl che commands that I use that interact with che returns:
"Error: Unauthorized"
without any other details.
any ideas?
I use microk8s on ubuntu 18 LTS.
kubectl version
Client Version: version.Info{Major:"1", Minor:"21+", GitVersion:"v1.21.0-3+121713cef81e03", GitCommit:"121713cef81e0316fb97af2111e1d3aeac3fd14a", GitTreeState:"clean", BuildDate:"2021-04-11T13:30:54Z", GoVersion:"go1.16.3", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"21+", GitVersion:"v1.21.0-3+121713cef81e03", GitCommit:"121713cef81e0316fb97af2111e1d3aeac3fd14a", GitTreeState:"clean", BuildDate:"2021-04-11T13:26:38Z", GoVersion:"go1.16.3", Compiler:"gc", Platform:"linux/amd64"}
The text was updated successfully, but these errors were encountered: