502 Bad Gateway

I’m new to harness and following “harness-cd-community/helm at main · harness/harness-cd-community · GitHub” to learn.

after command:
kubectl port-forward --namespace harness --address localhost svc/proxy 7143:80 9879:9879
I tried signup

the screen has “Failed to fetch: 502 Bad Gateway”.

tried to trouble shoot:
kubectl logs -n harness -f proxy-55757d588-nktht

2022/08/26 14:29:32 [error] 31#31: *69 connect() failed (111: Connection refused) while connecting to upstream, client:, server: , request: “POST /ng/api/signup/community HTTP/1.1”, upstream: “

could you help me to resolve it?

Hi Qi,
Thanks for asking, just check you have signed up already here [/signup](/signup) post running the command kubectl wait --namespace harness --timeout 900s --selector app=proxy --for condition=Ready pods as it directly redirects to the sign-in page instead of sign-up page and without having signed-up the error of Failed to fetch: 502 Bad Gateway appears.

Also looking at this

2022/08/26 14:29:32 [error] 31#31: *69 connect() failed (111: Connection refused) while connecting to upstream, client:, server: , request: “POST /ng/api/signup/community HTTP/1.1”, upstream: “

I would suggest there’s might also be an issue with the conf file, rewrite your config to use ip, not dns. For instance, instead of localhost , or remove the ipv6 alias from /etc/hosts.

1 Like

which conf file? I’m on windows 10.

config files sorry for the mis-spell

Check for all the values mentioned as localhost and replace them with

could you give the full path?

Since, you are using helm could you please check for the yaml files under this harness-cd-community/helm/harness at main · harness/harness-cd-community · GitHub

also since you are on windows please make sure the firewall is not blocking your ports.

seems some images pull failed so some pods not running:
kubectl get pods -n harness

ng-manager-cdbf5d96b-mg8q4 0/1 Init:0/1 0 32m

kubectl get deployments -n harness

ng-manager 0/1 1 0 37m ng-manager harness/ng-manager-signed:75281

Could you findout why the image “harness/ng-manager-signed:75281” available is 0?


For me the output was

@Debanitrkl ➜ /workspaces/harness-cd-community/helm (main ✗) $ kubectl get pods -n harness
NAME                               READY   STATUS    RESTARTS        AGE
delegate-proxy-69744d998b-dwctp    1/1     Running   0               15m
log-service-79cfbf468f-772jd       1/1     Running   0               15m
manager-64bb65cf55-jf64h           1/1     Running   0               15m
mongodb-replicaset-chart-0         1/1     Running   0               15m
ng-auth-ui-85f6578bfb-wgt94        1/1     Running   0               15m
ng-manager-cdbf5d96b-xgt7h         1/1     Running   1 (5m56s ago)   15m
ng-ui-5d78846bd4-2v5bb             1/1     Running   0               15m
pipeline-service-845ff745-rvhwj    1/1     Running   0               15m
platform-service-8777996bd-d2gq6   1/1     Running   0               15m
proxy-55757d588-mw69v              1/1     Running   0               15m
redis-69884c4485-tc2xl             1/1     Running   0               15m
scm-b9d997d8b-zf5vf                1/1     Running   0               15m

same with deployments

@Debanitrkl ➜ /workspaces/harness-cd-community/helm (main ✗) $ kubectl get deployments -n harness
delegate-proxy     1/1     1            1           17m
log-service        1/1     1            1           17m
manager            1/1     1            1           17m
ng-auth-ui         1/1     1            1           17m
ng-manager         1/1     1            1           17m
ng-ui              1/1     1            1           17m
pipeline-service   1/1     1            1           17m
platform-service   1/1     1            1           17m
proxy              1/1     1            1           17m
redis              1/1     1            1           17m
scm                1/1     1            1           17m

everything works fine though it takes a bit for for the pods to be up and running, for instance more than 15 mins

1 Like

Thanks for your example.
I retried and after waited 30 minutes, the deployments list is the same.
C:\myEntry01\04_workspaces\21_github_download\06_harnessCD_communityEdition\harness-cd-community\helm>kubectl get deployments --namespace harness
delegate-proxy 0/1 1 0 58m
log-service 1/1 1 1 58m
manager 0/1 1 0 58m
ng-auth-ui 1/1 1 1 58m
ng-manager 0/1 1 0 58m
ng-ui 1/1 1 1 58m
pipeline-service 0/1 1 0 58m
platform-service 0/1 1 0 58m
proxy 1/1 1 1 58m
redis 1/1 1 1 58m
scm 1/1 1 1 58m

5 available is 0 still.
others are 1.
not changing with time.

for your linux, all is 1 after kubectl wait , right?

don’t know if other windows 10 system is the same or not?

Yes in Linux it works fine aftee kubectl wait, for windows I’m not able to recreate this I don’t have access to windows system, stil going through common errors like this in Windows system to get a nack of the problem you are facing.

Thanks for verifying that Linux works fine following the guide. But this issue has not been resolved for my windows 10 laptop. hope someone with similar system could help to resolve this.

My windows 10 first was installed docker last year to follow a book which Enabled the WSL 2 feature for docker. last month, I downloaded minikube from https://github.com/kubernetes/minikube/releases/latest/download/minikube-windows-amd64.exe. It’s working to deploy a simple microservice. but following helm got issue…

From what I understand, the common issues regarding windows and WSL arises from network port not available, could you please check all the pre defined ports for helm installation are not getting used by any other process and is available.

Thanks for your suggestion. which are the pre defined ports for helm installation on Linux (which affect the helm installation)? because on windows, the issue is that after ‘helm install …’ command, some images ‘Available’ status is 0.

Thank you for your verification from Linux. these ports may change each restart of your kubernetes, or fixed? but anyway, we need a windows platform practitioner/expert of this to help resolve the issue. when following the guide running “helm install …”, will all the images’ Available state = 1? if not, how to resolve it. it’s not all available=0, but the 5 – if some ports not accessible, all should be blocked, or sometime this, sometime that. by the way, I just successfully followed another guide, which deployed nginx to my kubernetes cluster (same windows environment) through harness delegate without the issue.

1 Like

Glad that you were able to find a way out of it, feel free to keep posting about more queries on this forum. Also once I have my windows machine set-up will surely look into this.
Thank you