cloudfoundry / cf-deployment

The canonical open source deployment manifest for Cloud Foundry
Apache License 2.0
295 stars 305 forks source link

pushing application error for failed to download buildpack. #591

Closed qibobo closed 6 years ago

qibobo commented 6 years ago

The error below happened always for recent days when I tried to push application to my bosh-lite.

Downloading app package... Downloaded app package (666B) [DownloadCache] WARN Unable to download https://java-buildpack.cloudfoundry.org/jvmkill/trusty/x86_64/index.yml into cache /tmp: Failed to open TCP connection to java-buildpack.cloudfoundry.org:443 (getaddrinfo: Name or service not known) [Buildpack] ERROR Detect failed with exception #<RuntimeError: Jvmkill Agent error: Unable to find cached file for https://java-buildpack.cloudfoundry.org/jvmkill/trusty/x86_64/index.yml> Jvmkill Agent error: Unable to find cached file for https://java-buildpack.cloudfoundry.org/jvmkill/trusty/x86_64/index.yml -----> Nodejs Buildpack version 1.6.28 -----> Installing binaries engines.node (package.json): 6.x engines.npm (package.json): unspecified (use default) -----> Installing node 6.14.3 Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-6.14.3-linux-x64-ae2a82a5.tgz] ERROR Unable to install node: Get https://buildpacks.cloudfoundry.org/dependencies/node/node-6.14.3-linux-x64-ae2a82a5.tgz: dial tcp: lookup buildpacks.cloudfoundry.org on 169.254.0.2:53: read udp 10.255.181.73:55815->169.254.0.2:53: i/o timeout Failed to compile droplet: Failed to run all supply scripts: exit status 14 Exit status 223 Cell faa8a4b7-705c-48b0-82d7-5fa945ecd0d6 stopping instance 57c836e5-e3f6-4b75-b8d3-7d6b40af608c Cell faa8a4b7-705c-48b0-82d7-5fa945ecd0d6 destroying container for instance 57c836e5-e3f6-4b75-b8d3-7d6b40af608c Cell faa8a4b7-705c-48b0-82d7-5fa945ecd0d6 successfully destroyed container for instance 57c836e5-e3f6-4b75-b8d3-7d6b40af608c

cf-gitbot commented 6 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/159728282

The labels on this github issue will be updated when the story is started.

spikymonkey commented 6 years ago

I came across this problem too after updating a cf-deployment on a bosh-lite. It was because I'd forgotten to apply bosh-dns in my runtime config - a requirement that's been added recently. Can confirm things are working for me again now I've added that. Hope that helps!

staylor14 commented 6 years ago

Hi @qibobo! @spikymonkey is correct (thanks @spikymonkey!).

CF-Deployment now requires Bosh DNS. We use semantic versioning to herald breaking changes. Major releases can be expected to require operator intervention in order to upgrade. We do our best to make clear what actions are necessary in our release notes. Sometimes, there is emoji.

169.254.0.2 is the link-local IP address of the Bosh DNS server that will be running as a job on each of your instances once the runtime config has been applied to the Director, and you have re-deployed your foundation.

Feel free to re-open this issue if you have further trouble with it.

--Steve

qibobo commented 6 years ago

@spikymonkey @staylor14

I add the runtime config for bosh dns as below. This time the error became :

ERROR Unable to install node: Get https://buildpacks.cloudfoundry.org/dependencies/node/node-6.14.3-linux-x64-cflinuxfs2-0911c3ae.tgz: dial tcp: lookup buildpacks.cloudfoundry.org on 169.254.0.2:53: server misbehaving

The commands I created my bosh-lite are:

bosh2 create-env bosh.yml \
  --state ./state.json \
  -o virtualbox/cpi.yml \
  -o virtualbox/outbound-network.yml \
  -o bosh-lite.yml \
  -o bosh-lite-runc.yml \
  -o uaa.yml \
  -o credhub.yml \
  -o jumpbox-user.yml \
  --vars-store ./creds.yml \
  -v director_name=bosh-lite \
  -v internal_ip=192.168.50.6 \
  -v internal_gw=192.168.50.1 \
  -v internal_cidr=192.168.50.0/24 \
  -v outbound_network_name=NatNetwork \
  -v admin_password=admin 

bosh2 update-runtime-config runtime-configs/dns.yml --vars-store ~/bosh-dns-certs.yml

bosh2 -n -e vbox upload-stemcell https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-trusty-go_agent

bosh2 -n -e vbox update-cloud-config iaas-support/bosh-lite/cloud-config.yml \
&& bosh2 -n -e vbox -d cf deploy  cf-deployment.yml \
 -o operations/bosh-lite.yml \
 -o operations/use-compiled-releases.yml \
 -l ~/bosh-dns-certs.yml \
 --vars-store deployment-vars.yml \
 -v system_domain=bosh-lite.com \
 -v cf_admin_password=admin \
 -v uaa_admin_client_secret=admin-secret