Error “Runner invalid request: Invalid field: routes” when reaching route mapping size limit
search cancel

Error “Runner invalid request: Invalid field: routes” when reaching route mapping size limit

book

Article ID: 298062

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

There is a limit on the size of a routing information that belongs to the app. As described in the following resource:
https://github.com/cloudfoundry/bbs/blob/master/doc/defining-lrps.md#routes-optional

"Routes is a map where the keys identify route providers and the values hold information for the providers to consume. The information in the map must be valid JSON but is not processed by Diego. The total length of the routing information must not exceed 131072 bytes (128kb)."

On some occasions, when trying to map multiple routes to one app, the size limit is reached and it can cause an error such as the following:
{
"description": "Runner invalid request: Invalid field: routes",
"error_code": "CF-RunnerInvalidRequest",
"code": 170014
}

FAILED
Server error, status code: 500, error code: 170014, message: Runner invalid request: Invalid field: routes

cf map-route, cf unmap-route and cf delete-route will error with the message above.

Environment

Product Version: 2.8

Resolution

There is no fix on how to remove the route information at the moment. However it is possible to delete the route mappings for the app completely from the CCDB. The steps to do so are listed below:

1. Get the app guid:
cf app APP_NAME --guid

2. Go to Ops Manager and issue the following commands:
bosh -d <cf-deployment> ssh mysql/0

sudo -I
cd /var/vcap/jobs/pxc-mysql/config
cat  mylogin.cnf --> this contains the login credentials
/var/vcap/packages/pxc/bin# ./mysql -h127.0.0.1 -uroot -p20woJe4WDQv2ail4Acph3OsDwOiekt

3. Once you are in the database:
show databases;
use ccdb;

show tables;
select * from route_mappings;
select * from route_mappings where app_guid='YOUR_APP_GUID';
delete from route_mappings where app_guid='YOUR_APP_GUID';
select * from route_mappings where app_guid='YOUR_APP_GUID';


4. Now back in cf CLI, run the following command:
 cf restart <APP_NAME>
 cf app APP_NAME --> confirm the routing information is deleted.


Warning: This command will delete all of the routes that are mapped to the application.