argoproj / argo-cd

Declarative Continuous Deployment for Kubernetes
https://argo-cd.readthedocs.io
Apache License 2.0
17.39k stars 5.29k forks source link

Git: getaddrinfo() thread failed to start #13915

Open guguducken opened 1 year ago

guguducken commented 1 year ago

Checklist:

Describe the bug

root@HOST-192-168-1-200:/home/vagrant# argocd app create mo-tester --repo http://<USER_NAME>:<PASSWORD>@gitea-http.gitea.svc.cluster.local:3000/configs.git --path mo-
tester --dest-server https://kubernetes.default.svc --dest-namespace default
FATA[0000] rpc error: code = InvalidArgument desc = application spec for mo-tester is invalid: InvalidSpecError: Unable to generate manifests in mo-tester: rpc error: code = Internal desc = Failed to fetch default: `git fetch origin --tags --force --prune` failed exit status 128: fatal: unable to access 'http://gitea-http.gitea.svc.cluster.local:3000/configs.git/': getaddrinfo() thread failed to start

To Reproduce

  1. setup a gitea in kubernetes
  2. setup argocd in kubernetes
  3. argocd create an app which repo is in gitea

Expected behavior successful create app

Screenshots

Version

argocd: v2.7.1+5e54351
  BuildDate: 2023-05-02T16:54:25Z
  GitCommit: 5e543518dbdb5384fa61c938ce3e045b4c5be325
  GitTreeState: clean
  GoVersion: go1.19.8
  Compiler: gc
  Platform: linux/amd64
argocd-server: v2.7.2+cbee7e6.dirty
  BuildDate: 2023-05-12T13:43:26Z
  GitCommit: cbee7e6011407ed2d1066c482db74e97e0cc6bdb
  GitTreeState: dirty
  GoVersion: go1.19.6
  Compiler: gc
  Platform: linux/amd64
  Kustomize Version: v5.0.1 2023-03-14T01:32:48Z
  Helm Version: v3.11.2+g912ebc1
  Kubectl Version: v0.24.2
  Jsonnet Version: v0.19.1

Logs

Paste any relevant application logs here.
morey-tech commented 1 year ago

@guguducken, does it work if you first add the repo with the credentials and then create the app without the creds in the URL? For example:

argocd repo add http://gitea-http.gitea.svc.cluster.local:3000/configs.git --username <USER_NAME> --password <PASSWORD>
argocd app create mo-tester --repo http://gitea-http.gitea.svc.cluster.local:3000/configs.git --path mo-tester --dest-server https://kubernetes.default.svc --dest-namespace default
elad320011 commented 1 year ago

@morey-tech I have the same issue. it isn't working without the creds in the URL. Repo add works perfectly, but app create fails with the error getaddrinfo(). I created a busybox container in the same namespace using the same network setting, and resolve works fine. Using helm installation for ARGOCD version 2.7.2

elad320011 commented 1 year ago

This error seems to occur on older systems. I am using Ubuntu 18.04 with Docker 19.0.3, this probably is the reason for the error. Downgraded to Argo version v2.2.1, works fine

wwbweibo commented 1 year ago

I got the same issue, running with argocd version v2.9.0+4a50a31, and install with this latest file https://github.com/argoproj/argo-cd/blob/master/manifests/install.yaml. My cluster in running on
Ubuntu 20.04 LTS, kubernetes v1.20.6, containerd v1.4.3.

elad320011 commented 9 months ago

This error seems to occur on older systems. I am using Ubuntu 18.04 with Docker 19.0.3, this probably is the reason for the error. Downgraded to Argo version v2.2.1, works fine

UPDATE: I upgraded the Argocd to version 2.7.4. The problem was solved after changing seccompProfile: type: Unconfined Thanks everyone!