cf audit-stack fails to retrieve app data for larger foundations with unknown error and unexpected end of JSON input
search cancel

cf audit-stack fails to retrieve app data for larger foundations with unknown error and unexpected end of JSON input

book

Article ID: 389844

calendar_today

Updated On:

Products

VMware Tanzu Application Service

Issue/Introduction

We are using audit-stack plugin to migrate the applications from an FS3 stack to an FS4 stack.  However, when we attempt to retrieve the app data for larger foundations, we encounter the following error:

# cf audit-stack

2025/01/09 17:13:40 a problem occurred: Unknown request

The error could be tied to the size of the foundation or the number of apps being retrieved, as the larger the foundation, the more app data needs to be processed, potentially causing the response to cut off or become malformed.

 

Additionally, when we try to list the apps with trace logging enabled (cf audit-stack -v), we get the following error:

# cf audit-stack -v

Check for an empty string json

a problem occurred: error unmarshaling spaces json: unexpected end of JSON input

 

The error messages suggest an issue with how the JSON response is being parsed or generated, particularly with a missing or incomplete response (i.e., "unexpected end of JSON input").

Environment

TAS / DAP

Cause

There are multiple bugs with stack auditor v0.1.4 that cause the unknown request error and unexpected end of JSON input error.

 

1.  Bug that cause the "unknown request" error:  This occurs when attempting to retrieve app data for a large foundation. The plugin fails to complete the request due to the volume of data, resulting in a general "Unknown request" error.

2.  Bug that cause the "unexpected end of JSON input"  error:  This happens when the verbose log option is enabled (-v), and the plugin fails to parse the app data JSON response properly.

 

Reference  https://github.com/cloudfoundry/stack-auditor/releases/tag/v0.1.4

Resolution

The solution is to use the latest stack auditor v0.1.5 that has all the above bugs fixed. 

 

Reference  https://github.com/cloudfoundry/stack-auditor/releases/tag/v0.1.5