python apps fail to start with "she-bang" error
search cancel

python apps fail to start with "she-bang" error

book

Article ID: 410914

calendar_today

Updated On:

Products

VMware Tanzu Application Service VMware Tanzu Platform - Cloud Foundry

Issue/Introduction

A new failure behavior was noticed in one environment for python apps:

   **ERROR** Unable to rewrite she-bangs: open /tmp/contents364703663/deps/0/bin/python: text file busy
   Failed to compile droplet: Failed to run all supply scripts: exit status 14
Error staging application: BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED

Environment

Tanzu Platform Cloud Foundry 10.x

Python buildpack

Cause

The DynaTrace OneAgent created a process which competed with the app itself for access to the python binary.

Resolution

Permanent Fix has already been released in python buildpack v1.8.95. Update your buildpack version to this version or later to resolve this issue

 

Workaround for older buildpack version:-

There is a python-related feature in DynaTrace which had to be disabled in order to avoid the conflict between the app and the DynaTrace agent, so that it does not create contention during application startup.

Under "Settings / Monitored Technologies / Python," disable the "Monitor Python" toggle switch. 

Additional Information