|Pivotal Cloud Foundry® (PCF) Elastic Runtime||
The following symptom appears when trying to installing Pivotal Cloud Foundry (PCF). The install fails when pushing the Autoscaling errand:
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.
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).
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.