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

Bearer token error argo + microk8s #3562

Closed
2 tasks done
segabond opened this issue Jul 23, 2020 · 9 comments · Fixed by #3579
Closed
2 tasks done

Bearer token error argo + microk8s #3562

segabond opened this issue Jul 23, 2020 · 9 comments · Fixed by #3579
Assignees
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)

Comments

@segabond
Copy link

segabond commented Jul 23, 2020

Checklist:

  • I've included the version.
  • I've included reproduction steps.
  • [] I've included the workflow YAML.
  • [] I've included the logs.

What happened:
I tried to use argo CLI with argo in microk8s instance and got this error when running

$microk8s.kubectl config view --raw > ~/.kube/config
$argo submit -n argo --watch https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml

Got this error
FATA[0000] rpc error: code = Unauthenticated desc = failure to parse token: expected bearer token to be a JWT and therefore have 3 dot-delimited parts

MicroK8S indeed does not use a Bearer token in its configuration

What you expected to happen:
it was expected to create an example workflow.

How to reproduce it (as minimally and precisely as possible):

Anything else we need to know?:

Environment:

  • Argo version:
$ argo version

argo: v2.10.0-rc1
BuildDate: 2020-07-17T19:39:25Z
GitCommit: 616c79d
GitTreeState: clean
GitTag: v2.10.0-rc1
GoVersion: go1.13.4
Compiler: gc
Platform: linux/amd64
FATA[0000] rpc error: code = Unauthenticated desc = failure to parse token: expected bearer token to be a JWT and therefore have 3 dot-delimited parts

  • Kubernetes version :
$ kubectl version -o yaml

clientVersion:
buildDate: "2020-07-16T14:19:25Z"
compiler: gc
gitCommit: dff82dc0de47299ab66c83c626e08b245ab19037
gitTreeState: clean
gitVersion: v1.18.6
goVersion: go1.13.13
major: "1"
minor: "18"
platform: linux/amd64
serverVersion:
buildDate: "2020-06-23T21:17:52Z"
compiler: gc
gitCommit: 6f17be3f1fd54a88681869d1cf8bedd5a2174504
gitTreeState: clean
gitVersion: v1.18.4-1+6f17be3f1fd54a
goVersion: go1.14.4
major: "1"
minor: 18+
platform: linux/amd64
Other debugging information (if applicable):


Message from the maintainers:

If you are impacted by this bug please add a 👍 reaction to this issue! We often sort issues this way to know what to prioritize.

@sarabala1979
Copy link
Member

sarabala1979 commented Jul 23, 2020

Default Argo CLI will not use any token. It is just wrapper on kubectl. It looks like kubeconfig issue.
Can you try kubectl commands?

kubectl apply -f https://raw.githubusercontent.com/argoproj/argo/master/examples/hello-world.yaml
kubectl get wf

@LazyBrush
Copy link

Hi there,

For me this issue was not using the correct server address.

Default localhost:2746 not same as 127.0.0.1:2746.
I had nothing listening on 9999, here as an example.

vscode@01e1b3e45c9b:~$ argo list -n argo
FATA[0000] rpc error: code = Unauthenticated desc = failure to parse token: expected bearer token to be a JWT and therefore have 3 dot-delimited parts

vscode@01e1b3e45c9b:~$ argo list -n argo -s 127.0.0.1:9999
FATA[0000] rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing dial tcp 127.0.0.1:9999: connect: connection refused"

vscode@01e1b3e45c9b:~$ argo list -n argo -s 127.0.0.1:2746
NAME STATUS AGE DURATION PRIORITY
delightful-tiger-mpk6p Succeeded 2h 12s 0
delightful-tiger Succeeded 2h 32s 0`

cheers!

@segabond
Copy link
Author

@sarabala1979 kubectl works fine, it would complain on name missing, but after adding the name to the workflow it normally created a container
parallels@parallels-Parallels-Virtual-Platform:~$ kubectl apply -f hello-world.yaml
workflow.argoproj.io/abc created

Also latest release argo v2.9.3 works fine, you obviously have a regression in RC 2.10.x

@segabond
Copy link
Author

Here you are - 2 versions side by side - confirmed

parallels@parallels-Parallels-Virtual-Platform:~$ ./argo-linux-amd64-2.10 -n argo list
FATA[0000] rpc error: code = Unauthenticated desc = failure to parse token: expected bearer token to be a JWT and therefore have 3 dot-delimited parts
parallels@parallels-Parallels-Virtual-Platform:~$ ./argo-linux-amd64-2.9.3 -n argo list
NAME                STATUS      AGE   DURATION   PRIORITY
hello-world-c58hb   Succeeded   16m   18s        0

@alexec
Copy link
Contributor

alexec commented Jul 23, 2020

Are you using ARGO_TOKEN environment variable?

@segabond
Copy link
Author

I am not using ARGO_TOKEN environment variable.

@alexec
Copy link
Contributor

alexec commented Jul 23, 2020

But you are using ARGO_SERVER env var?

@alexec alexec self-assigned this Jul 23, 2020
@alexec alexec added the type/regression Regression from previous behavior (a specific type of bug) label Jul 23, 2020
@segabond
Copy link
Author

No I am not using any special environment variables. I've run into the issue by following the hello world example so assume very basic setup.

@alexec
Copy link
Contributor

alexec commented Jul 23, 2020

OK. I see bug. We should ignore weird and bad server tokens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug type/regression Regression from previous behavior (a specific type of bug)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants