Command line access
You can access your application logs using the cf CLI:
cf logs APPNAME
Used alone, cf logs will tail the combined stream of logs from each Cloud Foundry
service involved in your application deploy. Running with the --recent flag will
show only most recent logs for your app:
cf logs APPNAME --recent
Example log
2015-03-16T17:37:47.82-0400 [DEA/1] OUT Starting app instance (index 0) with guid GUID
2015-03-16T17:37:50.85-0400 [DEA/1] ERR Instance (index 0) failed to start accepting connections
2015-03-16T17:37:53.54-0400 [API/0] OUT App instance exited with guid GUID0 payload: {"cc_partition"=>"default", "droplet"=>"GUID0", "version"=>"GUID1", "instance"=>"GUID2", "index"=>0, "reason"=>"CRASHED", "exit_status"=>127, "exit_description"=>"failed to accept connections within health check timeout", "crash_timestamp"=>1426541870}
Documentation
For other helpful cf CLI troubleshooting commands, including cf events APP-NAME,
see this list of useful commands for investigating application health.
Troubleshooting
If you receive Error dialing trafficcontroller server:
- This can be caused by having an old version of the
cfCLI. Trycf -vand see if it's older than the latest version. If it is, install the latest version and try again. - This can also be caused by outbound connections to port 443 being blocked on
your network. If your organization requires your web browser to use a proxy for
outbound access to https:// sites, you can set up the
cfCLI to use that proxy as well. If it's simply blocked, you can talk to your network administrators about opening that port or try a different network.