Application Troubleshooting
Basic troubleshooting guide for application recovery assistance
Logging
Shipa aggregates stdout and stderr from every individual application process, making it easier to troubleshoot potential problems.
On its default installation, Shipa has all logs available using the app log command. This command can be used, as shown below:
$ shipa app log -a <appname>
2014-12-11 16:36:17 -0200 [shipa][api]: ---> Removed route from unit 1d913e0910
2014-12-11 16:36:17 -0200 [shipa][api]: ---- Removing 1 old unit ----
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Starting gunicorn 18.0
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Listening at: http://0.0.0.0:8100 (51)
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Using worker: sync
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Booting worker with pid: 60
2014-12-11 16:36:28 -0200 [shipa][api]: ---> Removed old unit 1/1
By default, Shipa shows the last ten log lines. To see more lines, use the -l/--lines parameter.
shipa app log -a <appname> --lines 200
Logs can be filter by unit and by source. To filter by unit, use the -u/–unit parameter.
$ shipa app log -a <appname> --unit 12f834b2c61c
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Starting gunicorn 18.0
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Listening at: http://0.0.0.0:8100 (51)
2014-12-11 16:36:22 -0200 [app][11f863b2c14b]: Using worker: sync
Application Unit ID
To find the unit id of an application, run the shipa app-info -a command.
Shipa also supports real-time logging, where the app log command has a -f/--follow option that prevents the log from stopping and wait for the new log data.
This option allows observing the real-time behavior of the application, which is quite helpful when debugging issues:
shipa app log -a <appname> --follow
Application Restart
A simple restart solves some application issues. For example, the application may need to be restarted after a schema change to the database.
Restarting can be done by running the command below:
shipa app restart -a appname
Application Units
To find the status of the application units, run the app info command as shown below:
shipa app info -a appname
Shell Into Application
To open a remote shell to one of the application units, run the app shell command.
shipa app shell -a appname
To open the shell session to a specific unit ID, use the example below.
shipa app shell -a appname <container-id>
Unlocking Applications
Sometimes an Application might be stuck due to a Shipa Event or locked by Shipa for other reasons.
shipa app unlock -a AppName
If locked by a specific Event outside of the scope of the Application, can cancel the Shipa Event. Can look up the Event ID in the UI under Events -> ID.
shipa event cancel [eventID] "Cancelation Reason Message"
Updated 10 months ago