我們注冊的 Gitlab-runner(在 Kubernetes 上)作業正常,升級 Gitlab 版本后,它不能再克隆專案了!有人對這個問題有任何想法嗎?
這是問題的日志:
Running with gitlab-runner 14.9.0 (d1f69508)
on gitlab-runner-dev K5KVWdx-
Preparing the "kubernetes" executor
30:00
Using Kubernetes namespace: cicd
Using Kubernetes executor with image <docker-registry>:kuber_development ...
Using attach strategy to execute scripts...
Preparing environment
30:07
Waiting for pod cicd/runner-k5kvwdx--project-1227-concurrent-02kqgq to be running, status is Pending
Waiting for pod cicd/runner-k5kvwdx--project-1227-concurrent-02kqgq to be running, status is Pending
ContainersNotReady: "containers with unready status: [build helper]"
ContainersNotReady: "containers with unready status: [build helper]"
Running on runner-k5kvwdx--project-1227-concurrent-02kqgq via gitlab-runner-85776bd9c6-rkdvl...
Getting source from Git repository
32:13
Fetching changes with git depth set to 50...
Initialized empty Git repository in /builds/bigdata/search/query-processing-module/.git/
Created fresh repository.
fatal: unable to access '<git-repository>': Failed to connect to <gitlab-url> port 443 after 130010 ms: Operation timed out
Cleaning up project directory and file based variables
30:01
ERROR: Job failed: command terminated with exit code 1
uj5u.com熱心網友回復:
這是我將如何除錯此問題:
- 確保不存在限制 pod 出口的NetworkPolicies 。
- 如果你有最新的 Kubernetes 版本,你可以在 Pod 中運行一個臨時除錯容器來檢查網路情況。檔案
kubectl debug -it ephemeral-demo --image=busybox:1.28 --target=ephemeral-demo
- 如果不是,您可以嘗試在容器中獲取一個 shell 并從那里檢查情況,或者您可以嘗試在同一節點上啟動一個 pod 并嘗試從那里連接。
一旦您在某個容器內有一個外殼不起作用,請嘗試回答以下問題:
- 你能連接到其他服務器嗎?
- 你能決議主機名嗎?
- IP 是私有 IP 并與一些內部 Kubernetes IP 重疊嗎?
- 能ping通IP嗎?如果是
- 你可以卷曲IP嗎?如果不
- 如果你在目標機器上打開另一個埠,你能連接到這個埠嗎?=> 如果是的話,可能是某處的防火墻問題
- 你可以卷曲IP嗎?如果不
- 如果沒有(無法 ping)=> 可以是防火墻相關的或 IP 路由相關的。
我不能確定出了什么問題,但請嘗試上述步驟,希望您能深入了解問題所在。
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/520324.html
標籤:KubernetesGitLabgitlab-ci-runner
