Argo-cd: FATA[0000] rpc error: code = Unavailable desc = transport is closing with every command

Created on 19 Jun 2020  Â·  4Comments  Â·  Source: argoproj/argo-cd

If you are trying to resolve an environment-specific issue or have a one-off question about the edge case that does not require a feature then please consider asking a
question in argocd slack channel.

Checklist:

  • [ X ] I've searched in the docs and FAQ for my answer: http://bit.ly/argocd-faq.
  • [ X ] I've included steps to reproduce the bug.
  • [ X ] I've pasted the output of argocd version.

Describe the bug

A clear and concise description of what the bug is.

When i run the command ./argocd --insecure account listor any command like that exeptc: ./argocd --insecure --grpc-web app sync $APP_NAME --force which run perfectly fine I got this error:
FATA[0000] rpc error: code = Unavailable desc = transport is closing which is not very clear to me it miss a lot of information to debug (even when I try to change log-level to debug)
To Reproduce
Run ./argocd --insecure account list

A list of the steps required to reproduce the issue. Best of all, give us the URL to a repository that exhibits this issue.

Expected behavior
I except command run like the documentation says.
I except the list of users.

A clear and concise description of what you expected to happen.

Screenshots

If applicable, add screenshots to help explain your problem.

Version

➜ ./argocd --insecure version
argocd: v1.6.0+c10ae24
  BuildDate: 2020-06-16T22:41:56Z
  GitCommit: c10ae246ab02f1356147118a1979fedcd1ceb704
  GitTreeState: clean
  GoVersion: go1.14.1
  Compiler: gc
  Platform: darwin/amd64
FATA[0000] rpc error: code = Unavailable desc = transport is closing 

Logs

FATA[0000] rpc error: code = Unavailable desc = transport is closing 
bug buin-triage

Most helpful comment

Hi @bloudman, that is actually a FAQ: https://argoproj.github.io/argo-cd/faq/#why-am-i-getting-rpc-error-code-unavailable-desc-transport-is-closing-when-using-the-cli

The connection between CLI and the ArgoCD server needs to support HTTP/2 on the complete route, or you'll have to specify the --grpc-web parameter on the CLI.

For convenience, you can set ARGOCD_OPTS environment variable, i.e. ARGOCD_OPTS=--grpc-web, so you won't have to specify on the command line all the time.

All 4 comments

Hi @bloudman, that is actually a FAQ: https://argoproj.github.io/argo-cd/faq/#why-am-i-getting-rpc-error-code-unavailable-desc-transport-is-closing-when-using-the-cli

The connection between CLI and the ArgoCD server needs to support HTTP/2 on the complete route, or you'll have to specify the --grpc-web parameter on the CLI.

For convenience, you can set ARGOCD_OPTS environment variable, i.e. ARGOCD_OPTS=--grpc-web, so you won't have to specify on the command line all the time.

Confirmed!
You have to use --grpc-web even if you didn't configure ingress with gRPC forward.

> argocd login <ARGOCD_INGRESS_HOST> --grpc-web
# Username: adminn
# Password:

Somehow it does not work for adding an app:

$> argocd --grpc-web app create example-guestbook --repo https://server.com/DEV_deployments.gitployments.g it --path "helm-guestbook" --dest-namespace ops-dev --dest-server https://kubernetes.default.svcrden/DEV_deployments.              
FATA[0110] rpc error: code = Unavailable desc = transport is closing 

However, other commands are working:

$> argocd --grpc-web login localhost:8087
WARNING: server certificate had error: x509: certificate signed by unknown authority. Proceed insecurely (y/n)? y 
Username: admin 
Password:  
'admin' logged in successfully 
Context 'localhost:8087' updated 
$> argocd --grpc-web cluster list 
SERVER                          NAME        VERSION  STATUS  MESSAGE 
https://kubernetes.default.svc  in-cluster

What is missing here?

Solved it .

Netpolicies were required for the argocd namespace ... this request is working now.

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
  name: argocd-ingress
  namespace: argocd
spec:
  podSelector: {}
  ingress:
  - from:
    - namespaceSelector:
        matchLabels:
          name: ops-argocd
  policyTypes:
  - Ingress
Was this page helpful?
0 / 5 - 0 ratings

Related issues

hulu1522 picture hulu1522  Â·  3Comments

everesio picture everesio  Â·  3Comments

turbotankist picture turbotankist  Â·  3Comments

alexec picture alexec  Â·  3Comments

jutley picture jutley  Â·  3Comments