Problems with the Torizon IDE

yes …:

No specific initial task defined for this template
 *  Terminal will be reused by tasks, press any key to close it. 

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


⚠️ VALIDATING ENVIRONMENT

OS:         Linux
OS Version: 6.8.0-90-generic
OS Arch:    x86_64
Under WSL:  false
VS Code:
1.107.1
994fd12f8d3a5aa16f17d42c041e5809167e845a
x64

TOR Extension:  toradex.apollox-vscode@3.2.6

✅ Environment is valid!

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

 *  Executing task: bash -c [[ ! -z "10.100.1.79" ]] && true || false 

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

 *  Executing task: bash -c [[ "arm64" == "arm64" ]] && true || false 

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

 *  Executing task: sshpass -p 1 scp -P 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI/docker-compose.yml torizon@10.100.1.79:~/ 

Warning: Permanently added '10.100.1.79' (ED25519) to the list of known hosts.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI/.conf/remove-dangling-images.xsh 10.100.1.79:2375 

Waiting for prune lock on host 10.100.1.79:2375
Pruning dangling images on 10.100.1.79:2375
Total reclaimed space: 0B
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: docker compose -p torizon stop networktracingapi networktracingapi-debug && docker compose -p torizon rm -f networktracingapi networktracingapi-debug && sleep 1 

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

 *  Executing task: xonsh /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI/.conf/torizon-packages.xsh arm64 

Applying torizonPackages.json: 
Applying to Dockerfile.debug ...
✅ Dockerfile.debug
Applying to Dockerfile ...
✅ Dockerfile
torizonPackages.json applied
 *  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 GPU=-imx8 networktracingapi 

WARN[0000] The "LOCAL_REGISTRY" 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 1.1s (11/11) FINISHED                                                                                                                                                                                                                             docker:default
 => [networktracingapi internal] load build definition from Dockerfile                                                                                                                                                                                                   0.0s
 => => transferring dockerfile: 2.77kB                                                                                                                                                                                                                                   0.0s
 => [networktracingapi internal] load metadata for docker.io/torizon/aspdotnet8:4                                                                                                                                                                                        1.1s
 => [networktracingapi auth] torizon/aspdotnet8:pull token for registry-1.docker.io                                                                                                                                                                                      0.0s
 => [networktracingapi internal] load .dockerignore                                                                                                                                                                                                                      0.0s
 => => transferring context: 56B                                                                                                                                                                                                                                         0.0s
 => [networktracingapi deploy 1/4] FROM docker.io/torizon/aspdotnet8:4@sha256:ba4fccf595657ae3b8f0e08f564d7dd60baf9da0968d42fa9f0737ca3e20d524                                                                                                                           0.0s
 => [networktracingapi internal] load build context                                                                                                                                                                                                                      0.0s
 => => transferring context: 7.34kB                                                                                                                                                                                                                                      0.0s
 => CACHED [networktracingapi deploy 2/4] RUN apt-get -y update && apt-get install -y --no-install-recommends     tcpdump:arm64  && apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*                                                                   0.0s
 => CACHED [networktracingapi deploy 3/4] COPY ./bin/Release/net8.0/linux-arm64/publish /home/torizon/app                                                                                                                                                                0.0s
 => CACHED [networktracingapi deploy 4/4] WORKDIR /home/torizon/app                                                                                                                                                                                                      0.0s
 => [networktracingapi] exporting to image                                                                                                                                                                                                                               0.0s
 => => exporting layers                                                                                                                                                                                                                                                  0.0s
 => => writing image sha256:b1b0b6989a3f3edb95157a126710424fd7b41716fba5a6a3a77cd0195ce00bc5                                                                                                                                                                             0.0s
 => => naming to docker.io/<ourcompany>/networktracingapi:0.0.14                                                                                                                                                                                                   0.0s
 => [networktracingapi] resolving provenance for metadata file                                                                                                                                                                                                           0.0s
[+] Building 1/1
 ✔ networktracingapi  Built                                                                                                                                                                                                                                              0.0s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: DOCKER_HOST= docker compose push networktracingapi 

WARN[0000] The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string. 
[+] Pushing 16/16
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 5f70bf18a086 Layer already exists                                                                                                                                                                                0.7s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: ffb33698e36c Layer already exists                                                                                                                                                                                0.7s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 5eb56b501909 Layer already exists                                                                                                                                                                                0.7s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 61b99d9da8dc Layer already exists                                                                                                                                                                                0.7s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 173990295215 Layer already exists                                                                                                                                                                                0.7s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 6c4842fc8138 Layer already exists                                                                                                                                                                                1.1s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 069f2aceffc2 Layer already exists                                                                                                                                                                                1.1s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: e44f9e856fee Layer already exists                                                                                                                                                                                1.1s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: d3cdb57eca31 Layer already exists                                                                                                                                                                                1.1s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 47e4337358a3 Layer already exists                                                                                                                                                                                1.1s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: a89e0e5ff6ca Layer already exists                                                                                                                                                                                1.5s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 2cdd244f6306 Layer already exists                                                                                                                                                                                1.5s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 145a1a68cd48 Layer already exists                                                                                                                                                                                1.5s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 5e735bd5801f Layer already exists                                                                                                                                                                                1.5s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: 3a9528cc455e Layer already exists                                                                                                                                                                                1.5s 
 ✔ Pushing <ourcompany>/networktracingapi:0.0.14: a213e6585473 Layer already exists                                                                                                                                                                                1.8s 
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: /home/carlton/.local/bin/xonsh /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI/.conf/spin-up-down-registry.xsh down 1 torizon 10.100.1.79 /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI 

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

 *  Executing task: /home/carlton/.local/bin/xonsh /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI/.conf/spin-up-down-registry.xsh up 1 torizon 10.100.1.79 /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI 

Container Runtime: docker
Run Arguments: --rm -d --network host torizonextras/ide-port-tunnel:0.0.0 sshpass -p 1 ssh -vv -N -R 5002:localhost:5002 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o PubkeyAuthentication=no torizon@10.100.1.79
Container Name: torizon-ide-port-tunnel
Container torizon-ide-port-tunnel already created
Checking if container torizon-ide-port-tunnel is running...
Container torizon-ide-port-tunnel is already running.
 *  Terminal will be reused by tasks, press any key to close it. 

 *  Executing task: xonsh /home/carlton/Toradex/_GitLab/test-controller/toradex-hardware/apis/networktracing/NetworkTracingAPI/.conf/service-check.xsh registry 1 22 torizon 10.100.1.79 'curl --silent --max-time 5 http://localhost:5002/v2/_catalog' 

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

 *  Executing task: sleep 1 && DOCKER_HOST=10.100.1.79:2375 docker pull localhost:5002/networktracingapi:0.0.14 

Error response from daemon: manifest for localhost:5002/networktracingapi:0.0.14 not found: manifest unknown: manifest unknown

 *  The terminal process "/usr/bin/bash '-c', 'sleep 1 && DOCKER_HOST=10.100.1.79:2375 docker pull localhost:5002/networktracingapi:0.0.14'" terminated with exit code: 1. 
 *  Terminal will be reused by tasks, press any key to close it. 

the docker-compose:

services:
  networktracingapi-debug:
    build:
      context: .
      dockerfile: Dockerfile.debug
    image: ${LOCAL_REGISTRY}:5002/networktracingapi-debug:${TAG}
    ports:
      - ${DEBUG_SSH_PORT}:${DEBUG_SSH_PORT}
      - 5035:5035
    profiles:
      - debug
    network_mode: host
    logging:
      driver: journald
    environment:
      - ENABLE_PERSISTENT_STORE=true
      - MAX_PCAP_STORAGE_MB=50
      - MAX_PCAP_CHUNK_SIZE_MB=1 
      - MAX_PCAP_SESSION_SIZE_MB=2
    cap_add:
      - NET_ADMIN
      - NET_RAW
    privileged: true
    volumes:
      - type: tmpfs
        target: /home/torizon/app/pcaps
        tmpfs:
          size: 268435456   # 256 MB    

      
  networktracingapi:
    build:
      context: .
      dockerfile: Dockerfile
    image: ${DOCKER_LOGIN}/networktracingapi:${TAG}
    # image: ${LOCAL_REGISTRY}:5002/networktracingapi:${TAG}
    profiles:
      - release
    environment:
      - ENABLE_PERSISTENT_STORE=false
      - MAX_PCAP_STORAGE_MB=50
      - MAX_PCAP_CHUNK_SIZE_MB=1 
      - MAX_PCAP_SESSION_SIZE_MB=2
    cap_add:
      - NET_ADMIN
      - NET_RAW
    privileged: true
    volumes:
      - type: tmpfs
        target: /home/torizon/app/pcaps
        tmpfs:
          size: 268435456   # 256 MB    
    ports:
      - 5035:5035
    # command: tail -f /dev/null  # keep it alive


Hello @gerko,

Which task did you ran that generated the above logs?

Could you also send the logs present on the “output” tab for the IDE extension below?
Please make sure that Torizon IDE is selected on the drop down on the right side.

Best Regards,
Bruno

here it is:

[01-09 11:51:39.195] ERROR :: pull-from-target-release failed with exit code 1

I cleared the ‘output’ window before running run-container-release…

Thanks @gerko,

Can you re-open the VSCode Window and send the logs from this output tab?
This way we can check the IDE Initialization logs to see if anything unexpected is happening.

Best Regards,
Bruno

[01-09 12:08:12.539] Activating Torizon IDE ...
[01-09 12:08:12.540] Torizon IDE version :: 3.2.6
[01-09 12:08:13.504] Latest Torizon IDE published :: 3.2.173
[01-09 12:08:13.504] Telemetry is enabled
[01-09 12:08:13.504] Extension collects completely anonymous telemetry data about templates usage. Participation in this anonymous program is optional, and you may opt-out if you'd not like to share any information. Check: https://developer.toradex.com/torizon/application-development/ide-extension/reference-documentation/data-collection/#how-to-opt-in-or-out
[01-09 12:08:13.505] Telemetry allows us to accurately gauge templates usage. This data will help us to focus better on the most used templates, adding new features and putting effort in the right place.
[01-09 12:08:13.505] Resolving host IP address ...
[01-09 12:08:13.554] Host IP address OK
[01-09 12:08:13.555] Bash as default shell OK
[01-09 12:08:13.579] Docker installed OK
[01-09 12:08:14.051] Docker running OK
[01-09 12:08:14.151] Docker compose OK
[01-09 12:08:14.161] PowerShell OK
[01-09 12:08:14.199] git OK
[01-09 12:08:14.352] dig OK
[01-09 12:08:14.395] avahi-resolve OK
[01-09 12:08:14.434] nmap OK
[01-09 12:08:14.479] iputils-ping OK
[01-09 12:08:14.500] file OK
[01-09 12:08:14.542] sshpass OK
[01-09 12:08:14.721] iproute2 OK
[01-09 12:08:14.910] rsync OK
[01-09 12:08:15.217] python3 OK
[01-09 12:08:15.315] pipx OK
[01-09 12:08:15.315] Cloning project templates
[01-09 12:08:15.316] Templates repo: https://github.com/torizon/vscode-torizon-templates.git
[01-09 12:08:15.316] Templates tag/hash: v3.2.6
[01-09 12:08:15.333] Project templates clone of branch  OK
[01-09 12:08:15.733] Project templates fetched OK
[01-09 12:08:15.794] Checkout templates repo to tag v3.2.6 OK
[01-09 12:08:25.275] xonsh installation OK
[01-09 12:08:25.276] WARNING :: Project name not found in workspace metadata for single container workspace, or it matches the workspace name.
[01-09 12:08:25.277] Checking connected devices ...
[01-09 12:08:25.278] Scanning Torizon devices ...
[01-09 12:08:25.289] Debian bookworm packages list load OK
[01-09 12:08:25.290] Debug id_rsa OK
[01-09 12:08:25.335] Checking host ip sanity ...
[01-09 12:08:25.676] Torizon IDE extension activated
[01-09 12:08:26.680] Host ip is OK
[01-09 12:08:26.688] Device 10.100.1.79 set as Docker Host

Just observed:

It’s being pushed to Docker Hub after the build.

Is that correct?

Hello @gerko,

Thanks for sending additional logs.

Just running run-container-torizon-release-arm64 should not push the container to DockerHub.
Only to the local registry.

The task create-production-image is the one which should push the containers to the configured Docker Registry (by default DockerHub).

Best Regards,

Hi @bruno.tx

Something must be configured incorrectly somewhere. And this only happens in my current project. However, I don’t know why and I don’t know how to fix it.

Are any environment variables important here?

my env:

> env | grep -i docker
DOCKER_PASSWORD=<secret>
DOCKER_LOGIN=<secret>
DOCKER_REGISTRY=registry-1.docker.io
DOCKER_HOST=tcp://10.100.1.79:2375
DOCKER_TAG=0.0.18

and the “run-container-torizon-release-arm64” task section


        {
            "label": "run-container-torizon-release-arm64",
            "detail": "This task will build the application based in the production Dockerfile, push it to the local registry (localhost:5002), pull it on the board and run it on the board, showing the result in the VSCode terminal",
            "command": "DOCKER_HOST=${config:torizon_ip}:2375",
            "type": "shell",
            "args": [
                "DOCKER_LOGIN=localhost:5002",
                "TAG=${config:docker_tag}",
                "GPU=${config:torizon_gpu}",
                "DEBUG_SSH_PORT=${config:torizon_debug_ssh_port}",
                "DEBUG_PORT1=${config:torizon_debug_port1}",
                "DEBUG_PORT2=${config:torizon_debug_port2}",
                "DEBUG_PORT3=${config:torizon_debug_port3}",
                "docker",
                "compose",
                "-p",
                "torizon",
                "up",
                "networktracingapi"
            ],
            "dependsOrder": "sequence",
            "dependsOn": [
                "template-specific-initial-task",
                "validate-settings",
                "validate-arch-arm64",
                "copy-docker-compose",
                "pre-cleanup",
                "build-container-torizon-release-arm64",
                "push-container-torizon-release",
                "pull-container-torizon-release",
                "template-specific-final-task",
                "wait-a-bit"
            ],
            "problemMatcher": "$tsc",
            "icon": {
                "id": "run",
                "color": "terminal.ansiYellow"
            },
            "presentation": {
                "echo": true,
                "reveal": "always",
                "focus": true,
                "panel": "shared",
                "group": "build-execution"
            }
        }

I assume that the image is supposed to be pushed to the module at this point??

Executing task: DOCKER_HOST= docker compose push networktracingapi 

WARN[0000] The "LOCAL_REGISTRY" variable is not set. Defaulting to a blank string. 
[+] Pushing 16/16
 ✔ Pushing #####/networktracingapi:0.0.18: 5f70bf18a086 Layer already exists                                                                                                                           0.7s 
... etc ...     

It seems that the line “DOCKER_LOGIN=localhost:5002” has no effect.

Best Regards
Gerald