You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tedge-agent fails to start and shows an unhelpful log message which does not help the user to find out "which file does not exist".
Error: No such file or directory (os error 2)
Below shows how the tedge-agent service just exits and go into a restart loop.
Oct 04 16:04:30 rpi5-d83add9f145a systemd[1]: Started tedge-agent.service - tedge-agent is a thin-edge.io component to support operations..
Oct 04 16:04:30 rpi5-d83add9f145a tedge-agent[1923]: Error: No such file or directory (os error 2)
Oct 04 16:04:30 rpi5-d83add9f145a systemd[1]: tedge-agent.service: Main process exited, code=exited, status=1/FAILURE
Oct 04 16:04:30 rpi5-d83add9f145a systemd[1]: tedge-agent.service: Failed with result 'exit-code'.
Starting tedge-agent manually and setting the log level to DEBUG shows the which file does not exist.
RUST_LOG=debug tedge-agent
2024-10-04T15:05:58.018373645Z DEBUG tedge_config::tedge_config_cli::tedge_config_location: Loading configuration from "/etc/tedge/tedge.toml"
2024-10-04T15:05:58.018459551Z DEBUG mqtt_channel::config: Using CA certificate: /etc/step-ca/certs/root_ca.crt
Error: No such file or directory (os error 2)
To Reproduce
Stop the tedge-agent service
systemctl stop tedge-agent
Set the mqtt.client.auth.ca_file to a path that does not exist
tedge config set mqtt.client.auth.ca_file /etc/does/not/exist/root_ca.crt
Start the tedge-agent service
systemctl start tedge-agent
Expected behavior
It is ok that the tedge-agent fails on startup, however the error message should contain the path to the file that does not exist to allow the user to fix the configuration error.
Screenshots
Environment (please complete the following information):
reubenmiller
changed the title
tedge-agent error does not show the which file does not exist
tedge-agent error does not show which file does not exist
Oct 7, 2024
The c8y mapper fails than to start, failing to read the device private key (owned by mosquitto), but also failing to tell which file cannot be accessed.
$ target/debug/tedge-mapper c8y
2024-11-05T09:56:27.356954935Z INFO Runtime: Started
2024-11-05T09:56:27.357288837Z INFO Runtime: Running Signal-Handler-0
2024-11-05T09:56:27.357404648Z INFO Runtime: Running HealthMonitorActor-1
Error: Permission denied (os error 13)
Describe the bug
tedge-agent fails to start and shows an unhelpful log message which does not help the user to find out "which file does not exist".
Below shows how the tedge-agent service just exits and go into a restart loop.
Starting
tedge-agent
manually and setting the log level to DEBUG shows the which file does not exist.RUST_LOG=debug tedge-agent 2024-10-04T15:05:58.018373645Z DEBUG tedge_config::tedge_config_cli::tedge_config_location: Loading configuration from "/etc/tedge/tedge.toml" 2024-10-04T15:05:58.018459551Z DEBUG mqtt_channel::config: Using CA certificate: /etc/step-ca/certs/root_ca.crt Error: No such file or directory (os error 2)
To Reproduce
Stop the tedge-agent service
Set the
mqtt.client.auth.ca_file
to a path that does not existtedge config set mqtt.client.auth.ca_file /etc/does/not/exist/root_ca.crt
Start the tedge-agent service
Expected behavior
It is ok that the tedge-agent fails on startup, however the error message should contain the path to the file that does not exist to allow the user to fix the configuration error.
Screenshots
Environment (please complete the following information):
Debian GNU/Linux 12 (bookworm)
Raspberry Pi 5 Model B Rev 1.0
Linux rpi5-d83add9f145a 6.6.31+rpt-rpi-2712 #1 SMP PREEMPT Debian 1:6.6.31-1+rpt1 (2024-05-29) aarch64 GNU/Linux
tedge 1.3.1
Additional context
The text was updated successfully, but these errors were encountered: