How to debug an aborted deployment
FeaturedNote: This guide uses the Cloud Foundry CLI version 5. The instructions below are not compatible with any cf version > 5. Click here to get a description of the differences between CLI v5 and CLI v6.
To get a quick overview about the app related logs do
cf logs
The status of the last few api calls can be seen in "~/.cf/logs/api.aws.ie.a9s.eu.log".
If there was a runtime error in the cf gem, then you might have a look at "~/.cf/crash".
List the running service instances:
cf services
To get a closer look at the service instance do:
cf service <servicename>
Display the list of known targets:
cf targets
Display your current target, organization and space:
cf target
Display the list of applications that are currently deployed on the current space , along with instances, health, and associated service instances:
cf apps
Display the standard output log entries for an application:
cf logs <appname>
Note: Be sure you specify the name of the application (first column in the output of cf apps
) rather than its deployment URL.
Display the logs for all of your app instances:
cf logs <appname> --all
Display the logs for a selected application instance:
cf logs <appname> --instance <instance number>
Display the recent crashes of a particular application:
cf crashes <appname>
Display any fatal errors that occurred for an application:
cf crashlogs <appname>
Display resource information (such as core usage, memory, disk space and uptime) of each instance of a deployed application:
cf stats <appname>
List the environment variables for an application:
cf env <appname>
Add an environment variable to an application:
cf set-env <appname> <variable=value>
Delete an environment variable you previously added to an application:
cf unset-env <appname> <variable>
-
You can also check for all logs if you have more than one instance by appending --all ( i.e, vmc logs myapp --all ) or just a crashed instance via --instance 4 ( i.e, vmc logs myapp --instance 4 )
0 -
Thanks for your advice. We added it to the article.
0
Please sign in to leave a comment.
Comments
2 comments