App Usage service requests are failing with a 500 error
search cancel

App Usage service requests are failing with a 500 error

book

Article ID: 298073

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

If all of the following conditions are true then you are impacted:
  1. You have run Tanzu Application Service for VMs 2.8.0 to 2.8.15 and recently upgraded to 2.8.16 or 2.8.17.
  2. App Usage service is failing and returning HTTP status 500, server error.
  3. When looking through the app usage service app's logs, you see entries like:
  2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT I, [2020-09-09T05:52:45.406391 #113]  INFO -- : Completed 500 Internal Server Error in 151ms (ActiveRecord: 52.4ms)
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT F, [2020-09-09T05:52:45.407011 #113] FATAL -- :   
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT F, [2020-09-09T05:52:45.407174 #113] FATAL -- : NoMethodError (undefined method `app_guid' for #<MonthlyAppConfigUsage:0x000055f9a8b76090>):
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT F, [2020-09-09T05:52:45.407257 #113] FATAL -- :   
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT F, [2020-09-09T05:52:45.407316 #113] FATAL -- : app/models/monthly_app_config_usage_rollerover.rb:38:in `fill_in_usages_for_subsequent_months'
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT app/models/old_app_running_usage_rollerover.rb:18:in `block in create_rollover_for_usages'
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT app/models/old_app_running_usage_rollerover.rb:15:in `create_rollover_for_usages'
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT app/models/old_app_running_usage_rollerover.rb:9:in `ensure_previous_month_usages_are_created_for_all_orgs'
   2020-09-09T05:52:45.40+0000 [APP/PROC/WEB/0] OUT app/controllers/system_report_controller.rb:10:in `app_usages'


Environment

Product Version: 2.8

Resolution

This issue occurs because TAS 2.8.16 and 2.8.17 were shipped with an older release of Application Usage service. The older release requires a different version of the database schema. Because the schema doesn't match, fields are missing and you end up with server errors.

The resolution is to upgrade to TAS 2.8.18+. These versions are fixed and have the correct version of Application Usage service included. If you have yet to upgrade, VMware Support strongly recommends skipping version 2.8.16 and 2.8.17 to avoid hitting this issue.

If you are on an impacted version and cannot upgrade, you may stay on the impacted release however Application Usage service will not function correctly, which means you will not be able to pull usage reports or record usage data until you upgrade to a fixed version.