Hello
I am trying to debug a Torizon CMake project, and run the application as “root”. So I’ve set "torizon_run_as": "root" in settings.json (as described in Workspace - Settings | Toradex Developer Center ). When trying to run and debug, I get the following error (log):
Executing task in folder MyProject: xonsh /home/kb/Workspaces/Torizon/Project/MyProject/.conf/service-check.xsh ssh - 2230 torizon 192.168.1.116 'echo ssh-ok'
Exception occurred: Command '['sshpass', '-p', '-', 'ssh', '-p', '2230', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'PubkeyAuthentication=no', 'torizon@192.168.1.116', 'echo ssh-ok']' returned non-zero exit status 5.
Attempt 1/15: waiting for ssh...
Exception occurred: Command '['sshpass', '-p', '-', 'ssh', '-p', '2230', '-o', 'UserKnownHostsFile=/dev/null', '-o', 'StrictHostKeyChecking=no', '-o', 'PubkeyAuthentication=no', 'torizon@192.168.1.116', 'echo ssh-ok']' returned non-zero exit status 5.
Attempt 2/15: waiting for ssh...
(more attempts follow)
With "torizon_run_as": "torizon" , everything works as expected.
What I’ve found out: service-check.xsh runs twice during “Run and Debug”, the first time on port 22, tt passes. The second time on port 2230 it fails, as can be seen in the log above.
If I skip service-check.xsh (by just inserting sys.exit(0)in all cases) everything works, my app runs as root and I can debug, no problems or issues occurred so far. This is my workaround for the moment.
So I have a workaround, but a real solution would be nice.
Thank you.
# tdx-info
Software summary
------------------------------------------------------------
Bootloader: U-Boot
Kernel version: 6.6.119-7.5.0-00057-g86497e203ba0 #1-Torizon SMP PREEMPT Mon Jun 30 14:11:55 UTC 2025
Kernel command line: root=LABEL=otaroot rootfstype=ext4 quiet logo.nologo vt.global_cursor_default=0 plymouth.ignore-serial-consoles splash fbcon=map:3 ostree=/ostree/boot.0/torizon/7be71a655bcf1a49919dc0d9709c05455c04734df5e2ed01203d13c8b16f76fa/0
Distro name: NAME="Torizon OS Upstream"
Distro version: VERSION_ID=7.5.0-build.30
Distro variant: VARIANT="Docker"
Hostname: apalis-imx6-08535054
------------------------------------------------------------
Hardware info
------------------------------------------------------------
HW model: Toradex Apalis iMX6Q/D Module on Apalis Evaluation Board
Toradex version: 0027 V1.1B
Serial number: 08535054
Processor arch: armv7l
------------------------------------------------------------