cf create-buildpack fails (after 15 minutes)
search cancel

cf create-buildpack fails (after 15 minutes)

book

Article ID: 378397

calendar_today

Updated On:

Products

VMware Tanzu Application Platform

Issue/Introduction

'cf create-buildpack' actually uploads the buildpack file, which can be quite big, to the TAS deployment.

With slow networks or running the command in a computer which is far from the TAS deployment VM's, it can take a long time and fail with following error. 

$ cf create-buildpack java-buildpack java-buildpack.zip 25
Creating buildpack java-buildpack as admin...
OK

Uploading buildpack java-buildpack as admin...
 188.16 MiB / 1.05 GiB [====================>------------------------------------------------------------------------------------------------]  17.48% 15m1s
Unexpected Response
Response Code: 502
Code: 0, Title: , Detail: 502 Bad Gateway: Registered endpoint failed to handle the request.


TIP: A buildpack with name 'java-buildpack' and nil stack has been created. Use 'cf delete-buildpack' to delete it or 'cf update-buildpack' to try again.
FAILED

 

Notice how it failed after 15 minutes and 1 seconds (15m1s).

Cause

Creating the buildpack fails because uploading time exceeds the "Back end request timeout for the Gorouter" (request_timeout_in_seconds) which defaults to 900 seconds (15 minutes).

This can happen over a slow network or because it's being done from a local computer which is far from the TAS deployment VM's.

Resolution

There are 2 possible solutions. Recommended one would be to place the builpack file in a jumpbox closer to TAS deployment VM's and run the 'cf create-buildpack' command from there. If that is not possible, then change TAS -> Networking -> Back end request timeout for the Gorouter to a higher value.