Pivotal Knowledge Base

Follow

Autoscaling Errand Not Installing

Environment

 Product  Version
 Pivotal Cloud Foundry® (PCF) Elastic  Runtime 

 1.8.x

Symptom

The following symptom appears when trying to installing Pivotal Cloud Foundry (PCF). The install fails when pushing the Autoscaling errand:

Uploading autoscale...
Uploading app files from: /var/vcap/data/packages/autoscaling-service/xa354cfc28968264b1936d180c711mad30847ef9.1-27ba7e34758f0c1f2eb851e4c3961788521234ds 
Uploading 135.2M, 7786 files

2.4M uploaded...
5M uploaded...
10.8M uploaded...
14.4M uploaded...
16.1M uploaded...
17.8M uploaded...
25.5M uploaded...
26.2M uploaded...
29.8M uploaded...
34.1M uploaded...
36.5M uploaded...
37.7M uploaded...
50M uploaded...
77.6M uploaded...
93.3M uploaded...
94.3M uploaded...
96M uploaded...
98.1M uploaded...
103.3M uploaded...
104.5M uploaded...
104.5M uploaded...
104.5M uploaded...Deleting app autoscale in org system / space autoscaling as admin...
OK
Renaming app autoscale-venerable to autoscale in org system / space autoscaling as admin...
OK
error: Error processing app files: Error uploading application.
Error performing request: Put https://api.example.com/v2/apps/a3dd25c0-1111-4e7e-bed2-884e98d91a08/bits?async=true: write tcp 10.10.10.65:46592->10.11.11.31:443: write: connection reset by peer  

Cause

The cause of this issue is typically network or environment related. As you can see from the message above, the connection is being reset by the peer. This may be caused by a Network, Firewall or Proxy issue.

Resolution

The ideal solution is to resolve any network or environment issues. Common causes are slow uploads and timeouts. In the event that the cause of the issue is not apparent or rectifiable in the short term, you can run the Autoscaling errand manually.

When running the autoscaling errand normally, a VM is created and removed once the autoscaling errand has finished running. In this case, we will prevent this VM from getting deleted, and copy the errand files to a local machine that has access via CF to the PCF environment. Then manually push the autoscaling app. 

Manually pushing an errand:

You can manually push the autoscaling errand to your environment as follows: 

  • bosh run errand autoscaling --keep-alive(Using --keep-alive to prevent the VM from getting deleted after the errand has finished running).
  • bosh ssh autoscaling/0 (Connect to the autoscaling VM).
  • sudo -i (Change to root).
  • PATH=/var/vcap/packages/cf_cli/bin:/var/vcap/packages/jq/bin:/usr/sbin:/usr/bin:/sbin:/bin

  • cf api https://api.<YOUR-SYSTME-DOMAIN> —skip-ssl-validation

  • Login into cf as admin
  • cf target -s system -o system
  • cf create-space autoscaling
  • cf target -o system -s autoscaling
  • cf push autoscale -f /var/vcap/jobs/deploy-autoscaling/manifest.yml (Manually push the app).

Once the app has been successfully pushed, you can then run the errand as normal:

  • bosh run errand autoscaling

Running the errand again without the --keep-alive will delete the autoscaling/0 VM. As the files will be cached locally the errand should run successfully.

 

 

 

Comments

Powered by Zendesk