Difference between revisions of "Debugging"
From Univention Wiki
Wiesenthal (talk | contribs) |
Wiesenthal (talk | contribs) |
||
Line 1: | Line 1: | ||
[[Category:App Center Developer Guide]] | [[Category:App Center Developer Guide]] | ||
+ | |||
+ | For [[Docker Apps]], debugging takes one more step. | ||
+ | |||
+ | ;''Important'': Remember that for Docker Apps, many files will be available only in the container. If you want to examine your log files, they will not be found where they used to be. Instead you always need to log into the container. | ||
+ | |||
+ | = Debugging the installation process = | ||
If something goes wrong really badly (like the installation of packages fails), the App Center tries to revert the installation. In case of the installation of [[Docker Apps]], it will remove the the container. | If something goes wrong really badly (like the installation of packages fails), the App Center tries to revert the installation. In case of the installation of [[Docker Apps]], it will remove the the container. | ||
Line 8: | Line 14: | ||
</pre> | </pre> | ||
− | This will leave you with a running, yet somewhat "unconfigured" container. | + | This will leave you with a running, yet somewhat "unconfigured" container. |
+ | |||
+ | = Getting into the container = | ||
+ | |||
+ | For debugging installations problems, '''but also for supporting customers''', you will need to use the container. To get closer to your App, you can do | ||
<pre> | <pre> | ||
Line 20: | Line 30: | ||
docker exec "$CONTAINER" ... | docker exec "$CONTAINER" ... | ||
</pre> | </pre> | ||
+ | |||
+ | From there, you can interact with your App as always. | ||
+ | |||
+ | = Log files = | ||
Maybe it is sufficient to look into the log files to know what went wrong. Important log files are: | Maybe it is sufficient to look into the log files to know what went wrong. Important log files are: |
Revision as of 16:05, 12 October 2016
For Docker Apps, debugging takes one more step.
- Important
- Remember that for Docker Apps, many files will be available only in the container. If you want to examine your log files, they will not be found where they used to be. Instead you always need to log into the container.
Debugging the installation process
If something goes wrong really badly (like the installation of packages fails), the App Center tries to revert the installation. In case of the installation of Docker Apps, it will remove the the container.
This means you cannot look into it to see what exactly happened. For testing purposes you may use the undocumented options --do-not-revert:
univention-app install myapp --do-not-revert
This will leave you with a running, yet somewhat "unconfigured" container.
Getting into the container
For debugging installations problems, but also for supporting customers, you will need to use the container. To get closer to your App, you can do
univention-app shell myapp
This will open /bin/bash in the container. If your container does not support this, you can still use the "hard way":
CONTAINER="$(ucr get appcenter/apps/myapp/container)" docker exec "$CONTAINER" ...
From there, you can interact with your App as always.
Log files
Maybe it is sufficient to look into the log files to know what went wrong. Important log files are:
- /var/log/univention/appcenter.log
- /var/log/univention/management-console-module-appcenter.log (if you installed the App via the UMC module - which is actually a good idea as users will install it that way, too).
- /var/log/docker.log