TorizonCore - example C project

Hello,

I am struggling to run and deploy the project from the link: Application Development - C / C++ Example | Toradex Developer Center

The container deployment job seems to go through a debug session first (correct me if I’m wrong), which fails with:

1: (59) Starting: "ssh" -T -q -p 2230 -o StrictHostKeyChecking=no -o "UserKnownHostsFile /dev/null" torizon@192.168.100.7 "/usr/bin/gdb --interpreter=mi"

torizon@verdin-imx8mm-15400884:~$ ls -larts /usr/bin/ | grep gdb      
torizon@verdin-imx8mm-15400884:~$ gdb --version
-sh: gdb: command not found

On my TorizonCore 6.8.2+build.30 (kirkstone), the first thing that I noticed is that GDB is missing:

torizon@verdin-imx8mm-15400884:~$ ls -larts /usr/bin/ | grep gdb      
torizon@verdin-imx8mm-15400884:~$ gdb --version
-sh: gdb: command not found

Then, even if I find or compile the GDB by myself, another point of concern is the docker registry. More specifically, in this video https://www.youtube.com/watch?v=YykIftUiMGU&ab_channel=Matheus-MicroHobby, it seem like that a local docker registry is in use. And in my case, there is no registry running by default:

torizon@verdin-imx8mm-15400884:~$ netstat -an             
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State      
tcp        0      0 0.0.0.0:111             0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:5355            0.0.0.0:*               LISTEN     
tcp        0      0 0.0.0.0:8840            0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:33043         0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.53:53           0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.54:53           0.0.0.0:*               LISTEN     
tcp6       0      0 :::111                  :::*                    LISTEN     
tcp6       0      0 :::22                   :::*                    LISTEN     
tcp6       0      0 :::5355                 :::*                    LISTEN     
tcp6       0      0 :::8840                 :::*                    LISTEN     
tcp6       0      0 :::2375                 :::*                    LISTEN     
tcp6       0      0 192.168.100.7:22        192.168.100.6:48238     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:58186     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:50694     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:58192     ESTABLISHED
tcp6       0      0 192.168.100.7:2375      192.168.100.6:37466     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:48232     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:48252     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:48256     ESTABLISHED
tcp6       0    768 192.168.100.7:22        192.168.100.6:55024     ESTABLISHED
tcp6       0      0 192.168.100.7:22        192.168.100.6:36038     ESTABLISHED
udp        0      0 0.0.0.0:5353            0.0.0.0:*                          
udp        0      0 0.0.0.0:5355            0.0.0.0:*                          
udp        0      0 0.0.0.0:57751           0.0.0.0:*                          
udp        0      0 127.0.0.54:53           0.0.0.0:*                          
udp        0      0 127.0.0.53:53           0.0.0.0:*                          
udp        0      0 192.168.100.7:68        192.168.100.1:67        ESTABLISHED
udp        0      0 0.0.0.0:111             0.0.0.0:*                          
udp6       0      0 :::5353                 :::*                               
udp6       0      0 :::5355                 :::*                               
udp6       0      0 :::52247                :::*                               
udp6       0      0 :::111                  :::*                               
raw6       0      0 :::58                   :::*  

May you please advise if there is something wrong with my Torizon version? And/or is there an updated tutorial for a pure-C project (with container deployment)?

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


Hello! Thank you for your detailed questions.

Let’s address your points step by step for TorizonCore 6.8.2+build.30.


1. Missing GDB on the Target

As you found, GDB is not included by default in TorizonCore images. Debugging from the IDE requires GDB on the board. You can install it with:

opkg update
opkg install gdb

(Reference: Core Dumps and Debugging)

  • After installation, verify with gdb --version.

If you prefer a custom-built GDB or face opkg issues, you may also run GDB within a debugging container. However, using the provided package is the simplest way.


2. Local Docker Registry

The Torizon IDE extension (Visual Studio Code) can use a local Docker registry when deploying containers to your device. If you see no docker registry process (usually on port 5000 or 5002), ensure that:

  • The IDE extension is configured to “manage” a local registry or is set to use DockerHub.
  • The LOCAL_REGISTRY variable is set correctly if using local registry. (Registry discussion).

Typically, if you start deployment from the Torizon IDE extension (not command line), it should start the local registry for you. Check the VS Code Output panel for related messages about the registry.


3. Project Setup & Tutorials

The official C/C++ example tutorial is here:

For a simple C project with container deployment, the steps are:

  1. Ensure VS Code with Torizon IDE extension is installed.
  2. Create a new C/C++ Torizon project using the extension (use the Command Palette: “Torizon: Create C Project”).
  3. Connect your board via its IP.
  4. Install GDB on the device as above.
  5. The extension will generate a docker-compose.yml similar to this (compose reference):
    services:
      my_c_app:
        build:
          context: .
          dockerfile: Dockerfile
        volumes:
          - /var/run/dbus:/var/run/dbus
          - /dev:/dev
    
  6. Deploy/Debug the application from within VS Code. The extension should guide you, handle the registry, and deploy the container via SSH.

4. Is Your Torizon Version Correct?

TorizonCore 6.8.2 is recent and suitable for these workflows. Just ensure your IDE extension is updated, and your board is reachable by network.


5. Common Troubleshooting

  • If GDB is not found: Make sure it’s installed as mentioned.
  • If deployment fails with registry errors: Restart VS Code, ensure Docker is running, and verify network connectivity between your PC and the board. Check container deployment guide.
  • For clean states, reboot both host and board or even reflash the OS if needed.

If you get specific errors related to registry or deployment after following the above, please provide those messages for further advice.

Best regards,
Toradex AI Assistant.

In addition to the above, the opkg is not present as well.

The image has been built by torizoncore-builder, the YAML file is:

$ cat tcbuild.yaml | grep -v '#'
input:
  easy-installer:
     toradex-feed:
       version: "6.8.2"
       release: quarterly
       machine: verdin-imx8mm
       distro: torizon
       variant: torizon-core-docker
       build-number: "30"


output:
  easy-installer:
    local: output_directory

The module is: Verdin IMX8MM DL 1GB (V1.1 B)

Greetings @vmetodiev,

It’s not clear at all what the error/issue is. The logs you shared show:

1: (59) Starting: "ssh" -T -q -p 2230 -o StrictHostKeyChecking=no -o "UserKnownHostsFile /dev/null" torizon@192.168.100.7 "/usr/bin/gdb --interpreter=mi"

But there’s no clear error message or anything. Please share the full logs as much as possible of the entire deployment process.

On my TorizonCore 6.8.2+build.30 (kirkstone), the first thing that I noticed is that GDB is missing:

GDB is not supposed to be on the Torizon OS it’s supposed to be in the container that is built as part of the deployment.

And in my case, there is no registry running by default:

The local registry is ran on your PC that is running the VSCode extension, it does not get run on the actual Toardex device.

In addition to the above, the opkg is not present as well.

Similarly this is also in the container that is built by the extension. Not on the actual OS.

It’s not clear what the issue here is. Assuming you have our VSCode extension setup properly, the process should be as follows:

This process should work fine for the basic template projects available.

Best Regards,
Jeremias

Hello @jeremias.tx,

Thanks for the quick response. Inside the log

 *  Executing task: xonsh .conf/validate-deps-running.xsh 


⚠️ VALIDATING ENVIRONMENT

OS:         Linux
OS Version: 6.8.0-57-generic
OS Arch:    x86_64
Under WSL:  false
VS Code:
1.98.2
ddc367ed5c8936efe395cffeec279b04ffd7db78
x64

TOR Extension:  toradex.apollox-vscode@3.0.4

✅ Environment is valid!

//
// Too long for the forum thread, omitted .... 
//

 => exporting to image                                                                                                                                            0.1s
 => => exporting layers                                                                                                                                           0.1s
 => => writing image sha256:1d2fdd66f08033fd3e8774e1941eab9fe8a656f8b6e74645be13fbfd3606d498                                                                      0.0s
 => => naming to docker.io/library/cross-toolchain-arm64-helloc                                                                                                   0.0s
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: make ARCH=arm64 makedir 

 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker run --rm -v /home/vmetodiev/Projects/helloc:/home/torizon/app cross-toolchain-arm64-helloc make ARCH=arm64 CC=aarch64-linux-gnu-g++ debug 

aarch64-linux-gnu-g++ -Iincludes/ -c -g -o build-arm64/debug/main.o src/main.c
aarch64-linux-gnu-g++ -Iincludes/ -g build-arm64/debug/main.o -o build-arm64/debug/helloc 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose build --pull --build-arg SSHUSERNAME=torizon --build-arg APP_ROOT=/home/torizon/app --build-arg IMAGE_ARCH=arm64 --build-arg DEBUG_SSH_PORT=2230 --build-arg GPU=-imx8 helloc-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
Compose can now delegate builds to bake for better performance.
 To do so, set COMPOSE_BAKE=true.
[+] Building 62.3s (10/10) FINISHED                                                                                                                     docker:default
 => [helloc-debug internal] load build definition from Dockerfile.debug                                                                                           0.0s
 => => transferring dockerfile: 2.43kB                                                                                                                            0.0s
 => [helloc-debug internal] load metadata for docker.io/torizon/debian:4                                                                                          1.9s
 => [helloc-debug internal] load .dockerignore                                                                                                                    0.0s
 => => transferring context: 56B                                                                                                                                  0.0s
 => [helloc-debug 1/5] FROM docker.io/torizon/debian:4@sha256:cca23c84946621ee72aae4593da5f3e004bf211c28e577810b1068bde5ed414c                                    5.4s
 => => resolve docker.io/torizon/debian:4@sha256:cca23c84946621ee72aae4593da5f3e004bf211c28e577810b1068bde5ed414c                                                 0.0s
 => => sha256:67dc94d653f7a702fe7f74b91d418929fd6d87446dcd6f3fc87b25d5af9238ca 2.56kB / 2.56kB                                                                    0.0s
 => => sha256:f80f932812a9756d7f86b9a563acec4e9a0bc981d4551dfc48a35df6092bb838 272B / 272B                                                                        0.6s
 => => sha256:cca23c84946621ee72aae4593da5f3e004bf211c28e577810b1068bde5ed414c 2.38kB / 2.38kB                                                                    0.0s
 => => sha256:ba1fcaa1f9140d629c0481ac837ace2606ea8f57b4a5e351f43325da0417a262 6.48kB / 6.48kB                                                                    0.0s
 => => sha256:943331d8a9a9863299c02e5de6cce58602a5bc3dc564315aa886fe706376f27f 28.07MB / 28.07MB                                                                  4.2s
 => => sha256:e6508dcec2594eec84ef7c4da274a59f27df81538a65b1a526bb1f75090e4978 6.33MB / 6.33MB                                                                    1.2s
 => => sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1 32B / 32B                                                                          0.7s
 => => sha256:ca728c58b7b0336451bafefcc1cb1bcd56827df5f53bf2fafbd78ff2eec6fe42 256B / 256B                                                                        1.0s
 => => sha256:84a91b7d8cd931fc18fc30e74be273ea033ccd5150d25b884a2402b27ec672cc 638B / 638B                                                                        1.2s
 => => sha256:1bf8bee7841ad07eefef6b06160387321a12c83f86843210e74448981d6939a6 3.44kB / 3.44kB                                                                    1.5s
 => => sha256:f5c4b1439aa6fb08d608323deef09fb1d5e5fa7094e76a8b22036039c2eabf69 1.98kB / 1.98kB                                                                    1.7s
 => => sha256:9688b07d58b6da22ed75f79bd7bbc445188d58922869cfafe2e146d3ea49903d 406B / 406B                                                                        1.8s
 => => sha256:58c7a12eb3820c455c0ff33da76a90d807ba7bb15aa89676a8f9feb28075eea6 15.03MB / 15.03MB                                                                  4.7s
 => => sha256:db25b9c32e363e3f07a28080e98ed494f92333a118767f41cc1d53ec4d95c002 1.21MB / 1.21MB                                                                    2.6s
 => => sha256:57e6b4336268bd1738d21f56ee13516b6968d711bde0753bff56cb4bc566d020 173B / 173B                                                                        2.9s
 => => extracting sha256:943331d8a9a9863299c02e5de6cce58602a5bc3dc564315aa886fe706376f27f                                                                         0.5s
 => => extracting sha256:e6508dcec2594eec84ef7c4da274a59f27df81538a65b1a526bb1f75090e4978                                                                         0.1s
 => => extracting sha256:f80f932812a9756d7f86b9a563acec4e9a0bc981d4551dfc48a35df6092bb838                                                                         0.0s
 => => extracting sha256:4f4fb700ef54461cfa02571ae0db9a0dc1e0cdb5577484a6d75e68dc38e8acc1                                                                         0.0s
 => => extracting sha256:ca728c58b7b0336451bafefcc1cb1bcd56827df5f53bf2fafbd78ff2eec6fe42                                                                         0.0s
 => => extracting sha256:84a91b7d8cd931fc18fc30e74be273ea033ccd5150d25b884a2402b27ec672cc                                                                         0.0s
 => => extracting sha256:1bf8bee7841ad07eefef6b06160387321a12c83f86843210e74448981d6939a6                                                                         0.0s
 => => extracting sha256:f5c4b1439aa6fb08d608323deef09fb1d5e5fa7094e76a8b22036039c2eabf69                                                                         0.0s
 => => extracting sha256:9688b07d58b6da22ed75f79bd7bbc445188d58922869cfafe2e146d3ea49903d                                                                         0.0s
 => => extracting sha256:58c7a12eb3820c455c0ff33da76a90d807ba7bb15aa89676a8f9feb28075eea6                                                                         0.1s
 => => extracting sha256:db25b9c32e363e3f07a28080e98ed494f92333a118767f41cc1d53ec4d95c002                                                                         0.0s
 => => extracting sha256:57e6b4336268bd1738d21f56ee13516b6968d711bde0753bff56cb4bc566d020                                                                         0.0s
 => [helloc-debug 2/5] RUN apt-get -q -y update &&     apt-get -q -y install     openssl     openssh-server     rsync     file     curl     gdb &&     apt-get   37.9s
 => [helloc-debug 3/5] RUN apt-get -q -y update &&     apt-get -q -y install     &&     apt-get clean && apt-get autoremove &&     rm -rf /var/lib/apt/lists/*   10.8s
 => [helloc-debug 4/5] RUN mkdir /var/run/sshd &&     sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g'         -i /etc/pam.d/sshd  0.4s
 => [helloc-debug 5/5] RUN rm -r /etc/ssh/ssh*key &&     dpkg-reconfigure openssh-server                                                                          5.4s
 => [helloc-debug] exporting to image                                                                                                                             0.3s
 => => exporting layers                                                                                                                                           0.3s
 => => writing image sha256:e03b9aee29ba8aab8d3e6e35ad2b35ff856b466e042ef6e58ce617399accc7b4                                                                      0.0s
 => => naming to localhost:5002/helloc-debug:arm64                                                                                                                0.0s
 => [helloc-debug] resolving provenance for metadata file                                                                                                         0.0s
[+] Building 1/1
 ✔ helloc-debug  Built                                                                                                                                            0.0s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose push helloc-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
[+] Pushing 4/16
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 9/16host:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 12/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 12/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 12/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 13/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 14/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 15/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 15/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 15/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 15/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 15/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 15/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 16/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
[+] Pushing 16/16ost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: e5e519fe8cba Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 29d21206053d Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 2862f3d001f4 Pushed                                                                                                 0.0s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 7ade0e303278 Pushed                                                                                                 2.6s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: ef5ab135b4e1 Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 0d44ca85e203 Pushed                                                                                                 0.2s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: cbfca7efdd64 Pushed                                                                                                 0.5s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: c5852bef3e08 Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 6cd757f87b26 Pushed                                                                                                 0.1s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 84f02289282b Pushed                                                                                                 0.2s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: db9633f880e7 Pushed                                                                                                 0.2s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: ab925bd8dc65 Pushed                                                                                                 0.2s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 5f70bf18a086 Pushed                                                                                                 0.2s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: ac6442dc9f87 Pushed                                                                                                 0.2s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 169ce75e923c Pushed                                                                                                 0.6s 
 ✔ Pushing localhost:5002/helloc-debug:arm64: 66a307619b8c Pushed                                                                                                 1.9s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST=192.168.100.7:2375 LOCAL_REGISTRY=192.168.111.1 TAG=arm64 GPU=-imx8 DEBUG_SSH_PORT=2230 DEBUG_PORT1= DEBUG_PORT2= DEBUG_PORT3= docker compose pull helloc-debug 

WARN[0000] The "DOCKER_LOGIN" variable is not set. Defaulting to a blank string. 
[+] Pulling 1/1
 ! helloc-debug Warning Get "http://192.168.111.1:5002/v2/": net/http: request canceled while waiting for connection (Client.Timeout exc...                      30.0s 
WARNING: Some service image(s) must be built from source by running:
    docker compose build helloc-debug
1 error occurred:
        * Error response from daemon: Get "http://192.168.111.1:5002/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)



 *  The terminal process "/usr/bin/bash '-c', 'DOCKER_HOST=192.168.100.7:2375 LOCAL_REGISTRY=192.168.111.1 TAG=arm64 GPU=-imx8 DEBUG_SSH_PORT=2230 DEBUG_PORT1= DEBUG_PORT2= DEBUG_PORT3= docker compose pull helloc-debug'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

the most interesting part is this:

Error response from daemon: Get "http://192.168.111.1:5002/v2/"

It is looking for the registry in another subnet, which is intentionally “isolated” from the 192.168.100.0/24.

The registry in binding successfully on all interfaces:

vmetodiev@vmetodiev:~$ sudo lsof -i :5002
COMMAND     PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
docker-pr 12557 root    4u  IPv4  78449      0t0  TCP *:5002 (LISTEN)
docker-pr 12563 root    4u  IPv6  78454      0t0  TCP *:5002 (LISTEN)
vmetodiev@vmetodiev:~$ docker compose version
Docker Compose version v2.35.1
vmetodiev@vmetodiev:~$ 

And my interfaces look like:

3: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 08:bf:b8:34:fa:4f brd ff:ff:ff:ff:ff:ff
    altname enp8s0
    inet 192.168.100.6/24 brd 192.168.100.255 scope global dynamic noprefixroute eno1
       valid_lft 223703sec preferred_lft 223703sec
    inet6 fe80::f75f:d807:f657:989d/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
vmetodiev@vmetodiev:~$ ip addr show enp6s0

2: enp6s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 04:8d:38:69:de:e9 brd ff:ff:ff:ff:ff:ff
    inet 192.168.111.1/30 brd 192.168.111.3 scope global noprefixroute enp6s0
       valid_lft forever preferred_lft forever

The enp6s0 is the interface of my second NIC, used for a /30 network between my PC and a RaspberryPI, so it is irrelevant to the Torizon setup.

So, the question now transforms to: How to force the environment to query the proper IP?

Well, I managed to solve it via:

  1. On the host, inside the project directory, the settings.json file:
"host_ip": "192.168.100.6",
  1. On the Verdin device, replacing the old IP with the proper one:
torizon@verdin-imx8mm-15400884:~$ cat /etc/docker/daemon.json
{
   "insecure-registries" : ["192.168.100.6:5002"]
}

As a result, I was able to run my C hello-world example.

Still, I guess there is some issue on a multi-NIC host scenario. Expected behaviour is that the host “discovery” should be done on a per-subnet basis. If not in the same subnet, then the Torizon automation should at least check the reachability in terms of routing and HTTP connectivity.

If you guys agree with me, you can treat this as a feature request.

Still, I guess there is some issue on a multi-NIC host scenario. Expected behaviour is that the host “discovery” should be done on a per-subnet basis. If not in the same subnet, then the Torizon automation should at least check the reachability in terms of routing and HTTP connectivity.

Yes this is a known limitation of the extension in a multi-NIC environment. Our team is already aware of this.

That said, glad to see you were able to run and deploy the project. Are there any further questions on this topic?

Best Regards,
Jeremias

Cool. Thank you, @jeremias.tx

Everything is clear now. You can close the thread.