Jenkinsx - Production promote failing due to connection refused error - jenkins-x

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!

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

Related

Nexus helm proxy repo

Have a quick question on helm setup... I created a repo (helm-proxy) on Nexus and tried to add the repo via helm client but got this error " Error: looks like "http://xxxxx:8081/repository/helm-proxy/" is not a valid chart repository or cannot be reached: failed to fetch http://3.231.230.88:8081/repository/helm-proxy/index.yaml : 404 Not Found...
I dont find any issues in adding the helm hosted repo as the index.html got created along with the repo creation but helm-proxy rep there is no index.html... Any help on this ?
Make sure that the value of the Location of the remote repository being proxied (URL-value) in your proxy configuration is correct.
correct means it works with URL-value/index.yaml
It has nothing to do with helm-hosted as helm-hosted generates its own index.yaml on creating it.

Terraform Custom Provider: How to avoid TF state file updates in case remote URL is unavailable?

I am writing a custom terraform provider and have followed all the documented steps in the following URL: https://learn.hashicorp.com/terraform/development/writing-custom-terraform-providers
I am able to get it running with all the CRUD operations with an SDK used for remote service where I am triggering API calls.
However, one issue I am facing is that in case remote URL is unavailable, running a terraform apply overwrites the TF state file even though I am returning an error from the plugin. This error is also reflected in the terraform apply output.
Edit:
Looks like I found steps to replicate this with an existing repository: https://github.com/Mastercard/terraform-provider-restapi/
Observations from this:
If I use the latest release binary from https://github.com/Mastercard/terraform-provider-restapi/releases, it works as expected.
If I clone the repository and build the binary myself using this command go build -o terraform-provider-restapi_v1.10.0-linux-amd64, I start getting the errors as mentioned in the question.
go version: go version go1.10.3 linux/amd64
What am I doing wrong here? How do we build provider binaries?
Any help on how to correct this?

Tag latest not found in repository docker.io/library/<package>

when build a dockerfile.
FROM ruby:latest
MAINTAINER ...
I receive some info:
Pulling repository docker.io/library/ruby
bfe1e909440a: Download complete
33a372e3ad95: Download complete
1230b07f5c40: Download complete
0ebd84a329dd: Download complete
...
Pulling repository docker.io/library/ruby
Tag latest not found in repository docker.io/library/ruby
I try with run in console 'docker pull ruby' , it through the same error.
Is it a problem of docker server?
You Probably have some kind of connection issue. I get that when I'm using free (unreliable) proxy servers.
You can also try to restart your aws instance and check again.

fabric8 -The last operation resulted in the following error: Unauthorized

I am working with kubernetes on google cloud,
I have created a fabric8 cluster: http://fabric8.io/guide/getStarted/gke.html
when the cluster is up and running i pull remote repositories and it works but when i try create a new app and i get the following msg:
The last operation resulted in the following error:
Unauthorized
log:2016-08-21T16:39:07.505206481Z Both
io.fabric8.forge.rest.git.RepositoriesResource#projectRepositoryResource
and
io.fabric8.forge.rest.git.RepositoriesResource#projectRepositoryResource
are equal candidates for handling the current request which can lead
to unpredictable results
can any body help me understand what this error means?
Any chance of seeing the full log of the fabric8-forge pod?
kubectl logs fabric8-forge-xxxx
Were you creating a project using the wizard using the gogs git server or did you try to import a project from an external git repository?

Teamcity - Intermittent TransportException to bitbucket

We're using Teamcity 8.0.1 (build 27435). Having this exact same problem. Trying to connect to a bitbucket repo and getting the following exception intermittently:
Failed to collect changes, error: List remote refs failed:
org.eclipse.jgit.errors.TransportException:
https://username#bitbucket.org/myproject/project.git: -1 null
Behind a proxy server and I have added -Dhttps.proxyHost=XXX -Dhttps.proxyPort=1234 to the TEAMCITY_SERVER_OPTS environment variable. That didn't work. There was mention of trying to upgrade to Java7 on another forum but that also didn't help.
Unfortunately, we're not able to use SSH to bitbucket because of the company network rules.
Anyone solved this problem or have suggestions? Thanks for the help!
Im not sure if there a bug in Teamcity/Jgit, but HTTPS for Bitbucket is not working properly. The solution here was to use SSH, but thats not an option for me.
My solution for now is to clone the repo locally (git clone --mirror) and update it periodically in bash (git remote update). Then just point TeamCity to that local .git folder.

Resources