Debug your Service
When a service running on an AosEdge Unit isn't functioning correctly, debugging requires combining visibility from the AosCloud Management UI and in-depth inspection using Command Line Interface (CLI) tools directly on the Unit.
This guide outlines a systematic approach to identifying and resolving common service issues.
Approaches
Mainly there are two appoaches to obtain information to debug your Service issue, depending on the device condition, purpose, and your skill level.
AosCloud UI
AosCloud UI provides various high level monitoring data for Services and Units. So this would be your first option to check the basic status and conditions of your Service's issue.
Also, Unit logs and Service logs can be retrieved via AosCloud UI. So if the issue is happening on a remote device where you cannot have direct access, this would enable you to still obtain logs from such remote devices.
Lastly, if you are not used to direct access to devices, this would be your option.
Direct SSH access
If you have the target device at your hand, directly accessing the device with SSH will enable you to get more detail information and also realtime information at your hand.
Summary
Below is a high level summary of the two approaches.
| AosCloud UI | Direct SSH access | |
|---|---|---|
| Device Availability | Remote | Close to you |
| Required Skill | Easy | Harder |
| Detailness | Limited | Wider options (realtime, etc.) |
AosCloud UI
Service status
When you find some issue with your Service, you should first check the high level Service status.
- Install status - Install status of Subjects and Services can be found in the Subjects & Services tab of the Unit Details page of the target device.
Unit status
-
Connectivity - It is sometimes useful to check the Unit connectivity, especially if the Unit is in remote environment.
-
Unit detail information - Depending on the issue of the Service, utilize other Unit detail information. Overview of available information can be found in the Monitor a Unit page.
Service log
Service log can be retrieved through the AosCloud UI. Follow the procedure in Monitor your Service page.
Unit log
Unit log can be retrieved throught the AosCloud UI. Follow the procedure in Monitor your Unit page.
You can get above logs through AosCloud UI by specifying date and time range. However, some issues may require logs including Unit startup sequence, or some realtime analysis. In such cases, if direct device access is available, utilize logging via direct SSH access to your target device.
Direct SSH access
If you have a device at your hand (or some method to directly access), you can directly access the device with SSH using CLI to retrieve detail logs and informations.
SSH access to your Unit
Find your device's IP address or hostname within your network.
In the CLI, use ssh command to remote access the device.
ssh username@remote_host
- username - AosEdge default is "root"
- remote_host - IP address or hostname of target device
- password - AosEdge defautl is "Password1"
In case of AosVM, detail procedure involving VirtualBox can be found at Tutorial > SSH access to provisioned unit.
Unit log
Once logged in to the device, follow the procedure in Tutorial > Getting logs and service instances status to get the Unit log.
Service log
Once logged in to the device, follow the procedure in Tutorial > Getting logs and service instances status to get the Service log.