0

I am trying to build a CI/CD pipeline on GKE. But the promotion from staging to production is failing due to connection refused error.

To resolve the issue, I referred the solution suggested at https://github.com/jenkins-x/jx/issues/469 by updating the version of exposecontroller. Still, it is not resolved.

I could see the error like this:

+ jx step helm build

{"level":"warning","msg":"No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080\n","time":"2019-04-17T01:17:40Z"}

{"level":"info","msg":"Adding missing Helm repo: chartmuseum.jenkins-x.io http://chartmuseum.jenkins-x.io\n","time":"2019-04-17T01:17:42Z"}

{"level":"info","msg":"Successfully added Helm repository chartmuseum.jenkins-x.io.\n","time":"2019-04-17T01:17:43Z"}

{"level":"info","msg":"Adding missing Helm repo: jenkins-x-chartmuseum:8080 http://jenkins-x-chartmuseum:8080\n","time":"2019-04-17T01:17:43Z"}

{"level":"info","msg":"Successfully added Helm repository jenkins-x-chartmuseum:8080.\n","time":"2019-04-17T01:17:43Z"}

error: failed to build the dependencies of chart '.': failed to run 'helm dependency build' command in directory '.', output: 'Hang tight while we grab the latest from your chart repositories...

...Unable to get an update from the "local" chart repository (http://127.0.0.1:8879/charts):

    Get http://127.0.0.1:8879/charts/index.yaml: dial tcp 127.0.0.1:8879: connect: connection refused

Is there anything I am missing? How can I fix this issue? Thanks in advance!

Swapnil
  • 801
  • 3
  • 19
  • 42

1 Answers1

0

whats the output of the pipeline running on the production git repository?

if you want to try promote locally from your laptop you need to ensure that your helm has the remote repository for your chart museum so it can find the charts you've released (the dependencies helm is talking about) that are listed in env/requirements.yaml in the production git repository.

try jx open to see the URL of your chart museum then run

helm repo add myservices $ChartMuseumURL
James Strachan
  • 9,168
  • 34
  • 31
  • I checked he output of jx open and it says Unable to connect to the server: error executing access token command "/google/google-cloud-sdk/bin/gcloud config config-helper --format=json": err=exit status 1 output= stderr=ERROR: gcloud crashed (BadStatusLine): '' – Swapnil Apr 17 '19 at 06:31
  • looks like you can't connect to kubernetes? does `kubectl get pod` work? – James Strachan Apr 18 '19 at 07:11
  • Yeah, this command is working. I am getting the output. Do you want to know the output of this command? – Swapnil Apr 18 '19 at 07:20
  • could you post the output of a terminal running these two commands one after the other please? `kubectl get node && jx open` – James Strachan Apr 19 '19 at 09:21
  • `$ kubectl get node NAME STATUS ROLES AGE VERSION gke-spikeboulder-default-pool-2f974c29-3fl5 Ready 29m v1.11.7-gke.12 gke-spikeboulder-default-pool-2f974c29-bd7n Ready 29m v1.11.7-gke.12 gke-spikeboulder-default-pool-2f974c29-wl1x Ready 29m v1.11.7-gke.12` – Swapnil Apr 20 '19 at 08:03
  • `jx open Name URL jenkins http://jenkins.jx.35.192.107.89.nip.io jenkins-x-chartmuseum http://chartmuseum.jx.35.192.107.89.nip.io jenkins-x-docker-registry http://docker-registry.jx.35.192.107.89.nip.io jenkins-x-monocular-api http://monocular.jx.35.192.107.89.nip.io jenkins-x-monocular-ui http://monocular.jx.35.192.107.89.nip.io nexus http://nexus.jx.35.192.107.89.nip.io` – Swapnil Apr 20 '19 at 08:08
  • Please find the command output. As putting these clusters on for longer will incur billing, I have to make a number of nodes to 0 without deleting the cluster. Please notify me once you verify them. As of now, all these links are working. – Swapnil Apr 20 '19 at 08:11
  • those URLs look to be working fine - you Ingress is all setup and working – James Strachan Apr 20 '19 at 11:22
  • I don’t understand why the command didn’t work - then it worked. I guess your cluster became inaccessible? – James Strachan Apr 21 '19 at 13:49
  • To avoid billing, right now I set the number of nodes to 0 . But the cluster is available. If you want to check the URL, I can start the nodes again. – Swapnil Apr 21 '19 at 13:57
  • maybe you got the 503 because there were no nodes running? sounds like its all working now though – James Strachan Apr 23 '19 at 06:20