jx: Jenkins Build fails with the error - failed to read the Helm version: failed to run 'helm version --short' command in directory '.', output: 'Client: v2.10.0+g9ad53a a

Summary

Jenkins build fails with the message

+ jx step helm release
No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080
Using helmBinary helm with feature flag: none
error: failed to build dependencies for chart from directory '.': failed to read the Helm version: failed to run 'helm version --short' command in directory '.', output: 'Client: v2.10.0+g9ad53aa
Error: forwarding ports: error upgrading connection: the server could not find the requested resource': exit status 1

Steps to reproduce the behavior

  • Create a Kubernetes cluster in GKE jx create cluster gke --skip-login --default-admin-password=mySecretPassWord123 -n myclustername

  • Create a Spring boot service- jx create spring -d web -d actuator

Jx version

The output of jx version is:

NAME               VERSION
jx                 1.3.439
jenkins x      platform 0.0.2771
Kubernetes  cluster v1.9.7-gke.6
kubectl         v1.10.7
helm client   v2.11.0+g2e55dbe
helm server  v2.11.0+g2e55dbe
git                git version 2.11.0

Kubernetes cluster

Using a Kubernetes cluster with GKE which was created via the command jx create cluster gke --skip-login --default-admin-password=password -n myclustername

Operating system / Environment

Google cloud shell

Repository created by jx

https://github.com/etSingh/data_processor

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 21

Commits related to this issue

Most upvoted comments

The upgrade to 2.11 works for me when I manually run the step.

  1. download helm 2.11
  2. helm init --upgrade
  3. cd charts/jxtest
  4. CHART_REPOSITORY=http://chartmuseum.jx.example.com jx step helm release

The problem is that the helm binary in the nodejs container on my jenkins is still 2.10, even though my cluster has the 2.11 tiller. How do I upgrade my container’s helm client?

I had the same error. For some reason, I didn’t have the global env TILLER_NAMESPACE configured. I setted it to kube-system and now everything works fine.

same with version 2.11

❯ jx version
Using helmBinary helm with feature flag: none
NAME               VERSION
jx                 1.3.445
jenkins x platform 0.0.2771
Kubernetes cluster v1.10.7-gke.6
kubectl            v1.12.1
helm client        v2.11.0+g2e55dbe
helm server        v2.11.0+g2e55dbe
git                git version 2.14.1

if any body have solution for this error

WARNING: No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080 Adding missing Helm repo: storage.googleapis.com https://storage.googleapis.com/chartmuseum.jenkins-x.io Successfully added Helm repository storage.googleapis.com. Adding missing Helm repo: jenkins-x-chartmuseum http://jenkins-x-chartmuseum:8080 Successfully added Helm repository jenkins-x-chartmuseum. WARNING: No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080 Uploading chart file python-app-1-0.0.4.tgz to http://jenkins-x-chartmuseum:8080/api/charts Received 401 response: {“error”:“unauthorized”} error: Failed to post chart to http://jenkins-x-chartmuseum:8080/api/charts due to response 401: {“error”:“unauthorized”}

Pipeline failed on stage ‘from-build-pack’ : container ‘step-promote-helm-release’. The execution of the pipeline has stopped.

I got Error: Couldn't load repositories file (/home/jenkins/.helm/repository/repositories.yaml

+ jx step helm release
No $CHART_REPOSITORY defined so using the default value of: http://jenkins-x-chartmuseum:8080

error: failed to build dependencies for chart from directory '.': failed to add chart repositories: failed to retrieve the install charts: failed to list repositories: failed to run 'helm repo list' command in directory '.', output: 'Error: Couldn't load repositories file (/home/jenkins/.helm/repository/repositories.yaml).
You might need to run `helm init` (or `helm init --client-only` if tiller is already installed)'

jx version

jx                 1.3.1048
jenkins x platform 0.0.3657
Kubernetes cluster v1.13.3
kubectl            v1.13.3
helm client        v2.13.1+g618447c
helm server        v2.13.1+g618447c
git                git version 1.8.3.1
Operating System   CentOS Linux release 7.2.1511 (Core)

jenkins configured global env TILLER_NAMESPACE but it doesn’t work. so we need to configure it manually. is it a bug?

@luca010 : thanks for the hint. I solved the same error in our environment the same way!