How to Enable Debug Mode for the Traffic Controller
search cancel

How to Enable Debug Mode for the Traffic Controller

book

Article ID: 297589

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

This article discusses how to enable the debug mode for the Traffic Controller.

 


Environment


Resolution

  • 'bosh ssh' to the traffic controller Virtual Machines (VMs).
  • Edit /var/vcap/jobs/loggregator_trafficcontroller/bin/loggregator_trafficcontroller_ctl.
  • Change the following line:
chpst -u vcap:vcap /var/vcap/packages/loggregator_trafficcontroller/trafficcontroller \ 
--config /var/vcap/jobs/loggregator_trafficcontroller/config/loggregator_trafficcontroller.json & 

to

chpst -u vcap:vcap /var/vcap/packages/loggregator_trafficcontroller/trafficcontroller --debug \ 
--config /var/vcap/jobs/loggregator_trafficcontroller/config/loggregator_trafficcontroller.json &
  • Run sudo monit restart loggregator_trafficcontroller. Run watch monit summary and wait for the process to restart.
  • You should see log debug entries that look like this.
{"timestamp":1463691855.062584877,"process_id":32436,"source":"loggregator trafficcontroller","log_level":"debug","message":"Received create/update event: 1","data":null,"file":"/var/vcap/data/compile/loggregator_trafficcontroller/loggregator/src/github.com/cloudfoundry/dropsonde/logging/logging.go","line":13,"method":"github.com/cloudfoundry/dropsonde/logging.Debugf"}

where the "log_level" is "debug".


Impact

Enabling debug mode will impact the system performance and can also fill up the ephemeral disk. So, we strongly recommend using this only for development and troubleshooting purpose.