Visual Studio Code docker extenstion updated to containers. now no debugging

Ok, I thought I was doing pretty good, had a nice avalonia testing or playground type application started. Had to take a bit of a break from it to finalize another piece of hardware.

Came back started Visual Code and started going through all the extension updates. saw the one for docker changing to containers and cringed a bit.

so now none of the projects I had working will debug or start on my devices.

I found a few a couple other post about this so I have tried the following:

because I have rebooted a few times:

docker run --rm -it --privileged torizon/binfmt

verified my registry is running with:

docker ps | grep registry

Logged back into docker:

docker login

restarted the container registry:

docker run -d -p 5002:5000 --restart=always --name registry registry:2

and reloaded the studio code window.

Now I am still learning and figuring all of this out. so I am probably missing something easy. but no matter the project or if I try the simple C++ console project from scratch. I will end up with an error similar to this this:

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



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

I am not sure where to go from here. In fact a similar thing happened to me over a year ago. a big update hit while i was not working the project but after updating my whole system didn’t like me. had to start over from scratch on that one.

Thx

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 sharing such a detailed overview of your situation and the troubleshooting steps you’ve already taken. The error message you are encountering:

Get "http://192.168.63.2:5002/v2/": net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

indicates a connectivity or configuration issue between Docker on your development machine and your local registry. Let’s go through a step-by-step checklist to help restore container registry access.


1. Check Local Registry Binding and Port

You mentioned starting your registry with:

docker run -d -p 5002:5000 --restart=always --name registry registry:2

However, this maps port 5000 inside the container to 5002 on the host. Make sure your configuration and access commands are consistent. Standard practice is to use the same port both inside and outside, like so:

docker run -d -p 5002:5002 --restart=always --name registry -e REGISTRY_HTTP_ADDR=0.0.0.0:5002 registry:2

This ensures the registry listens on all interfaces using port 5002 (reference).


2. Mark Registry as Insecure (if using HTTP)

If your registry is HTTP (not HTTPS), Docker won’t connect unless you explicitly mark it as an insecure registry. Add or update your /etc/docker/daemon.json file to include:

{
  "insecure-registries" : ["192.168.63.2:5002"]
}

(reference)

After editing this file, restart Docker:

sudo systemctl restart docker

3. Test Registry Connectivity

On your development machine, try:

curl http://192.168.63.2:5002/v2/

A successful response will be {}. If there’s no response or you see an error, the registry isn’t reachable (reference).

If you’re running on Windows with WSL2, also ensure your firewall allows inbound connections on port 5002.


4. Validate Docker Configuration and Network

  • Double-check your project’s docker-compose or related files to ensure they are referencing the correct registry and image tags.
  • Make sure there are no leftover containers or misconfigurations from old sessions which may conflict.

5. Update Registry Address in Project/VS Code

Make sure any project settings or environment variables referencing the registry (e.g., LOCAL_REGISTRY) match the correct IP and port.


6. Other Troubleshooting Steps

  • Try stopping and removing the registry, then starting it with the correct command.

    docker stop registry && docker rm registry
    docker run -d -p 5002:5002 --restart=always --name registry -e REGISTRY_HTTP_ADDR=0.0.0.0:5002 registry:2
    
  • Consider clearing Docker’s cache of old images or containers if updates have occurred.


If after following these steps you’re still having issues, let me know specific results, especially from the curl test and checking your daemon.json. That will help narrow down if it’s truly a connectivity problem, or possibly a deeper Docker/VS Code integration issue.

Additional Resources:

Best regards,
Toradex AI Assistant.

Greetings @Lon,

Yeah this update to the extension from Microsoft is known to us. Our team is working on updating our extension to be compatible with this change in the next release of our extension.

For the time-being you can try to follow this other post to manually downgrade the other extension back to a compatible version: Update fails many times from Torizon clouad - #23 by henrique.tx

Best Regards,
Jeremias

Unfortunately, I tried a few of the steps from the AI and a couple other posts. now I seem to have completely borked the torizon extension.

But curl and my registry seem to be running still.

81ccc0b8e87e   registry:2   "/entrypoint.sh /etc…"   4 hours ago   Up 52 minutes   5000/tcp, 0.0.0.0:5002->5002/tcp, [::]:5002->5002/tcp   registry
🐧 powis @Engineering1/home: curl http://192.168.63.2:5002/v2/
{}🐧 powis @Engineering1/home:

Unfortunately, I tried a few of the steps from the AI and a couple other posts. now I seem to have completely borked the torizon extension.

Well unless you took note of what you exactly did and know how to undo what you did, I’m not sure how much we can assist with a “borked” setup.

Your original issue should be solved by my initial suggestion. But if you’ve put the extension into a weird state then that’s a whole different matter now.

Best Regards,
Jeremias

So I am guessing I need to remove it from VS code and reinstall. I will give it a try. The image and results that I showed were from following the link you had sent me.

ok Docker is now at version 1.29.6
Torizon IDE extention is at 3.0.4

I do not get the apollox.Networkdevice refresh errors anymore. but I am getting:

OS:         Linux
OS Version: 5.15.167.4-microsoft-standard-WSL2
OS Arch:    x86_64
Under WSL:  Torizon
VS Code:
1.101.2
2901c5ac6db8a986a5666c3af51ff804d05af0d4
x64

TOR Extension:  toradex.apollox-vscode@3.0.4

❌ Docker container registry is not using port 5002!
Maybe there is some conflict with another container using the same name/port
5000/tcp, 0.0.0.0:5002->5002/tcp, [::]:5002->5002/tcp
Error cause: Not configured

I apologize if I got a little testy. But my experience so far has been a bit frustrating. I had a working system. took a couple weeks to work on another piece of the hardware for this project do an update. and I am now 3 days trying to fix the update. I know it is just a learning curve on my part. but still frustrating.

so If I run curl on the device i am getting what I think we would expect:

torizon@apalis-imx8-14760601:~$ curl http://10.10.10.61:5002/v2/
{}torizon@apalis-imx8-14760601:~$ 

iptables gives me this:

 sudo iptables -L -v -n
[sudo] password for powis:
Chain INPUT (policy ACCEPT 281K packets, 293M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain FORWARD (policy DROP 0 packets, 0 bytes)
 pkts bytes target     prot opt in     out     source               destination
   36  2684 DOCKER-USER  0    --  *      *       0.0.0.0/0            0.0.0.0/0
   36  2684 DOCKER-FORWARD  0    --  *      *       0.0.0.0/0            0.0.0.0/0

Chain OUTPUT (policy ACCEPT 477K packets, 293M bytes)
 pkts bytes target     prot opt in     out     source               destination

Chain DOCKER (1 references)
 pkts bytes target     prot opt in     out     source               destination
    4   208 ACCEPT     6    --  !docker0 docker0  0.0.0.0/0            172.18.0.2           tcp dpt:5002
    0     0 DROP       0    --  !docker0 docker0  0.0.0.0/0            0.0.0.0/0

Chain DOCKER-BRIDGE (1 references)
 pkts bytes target     prot opt in     out     source               destination
    4   208 DOCKER     0    --  *      docker0  0.0.0.0/0            0.0.0.0/0

Chain DOCKER-CT (1 references)
 pkts bytes target     prot opt in     out     source               destination
   16   972 ACCEPT     0    --  *      docker0  0.0.0.0/0            0.0.0.0/0            ctstate RELATED,ESTABLISHED

Chain DOCKER-FORWARD (1 references)
 pkts bytes target     prot opt in     out     source               destination
   36  2684 DOCKER-CT  0    --  *      *       0.0.0.0/0            0.0.0.0/0
   20  1712 DOCKER-ISOLATION-STAGE-1  0    --  *      *       0.0.0.0/0            0.0.0.0/0
   20  1712 DOCKER-BRIDGE  0    --  *      *       0.0.0.0/0            0.0.0.0/0
   16  1504 ACCEPT     0    --  docker0 *       0.0.0.0/0            0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-1 (1 references)
 pkts bytes target     prot opt in     out     source               destination
   16  1504 DOCKER-ISOLATION-STAGE-2  0    --  docker0 !docker0  0.0.0.0/0            0.0.0.0/0

Chain DOCKER-ISOLATION-STAGE-2 (1 references)
 pkts bytes target     prot opt in     out     source               destination
    0     0 DROP       0    --  *      docker0  0.0.0.0/0            0.0.0.0/0

Chain DOCKER-USER (1 references)
 pkts bytes target     prot opt in     out     source               destination
   36  2684 RETURN     0    --  *      *       0.0.0.0/0            0.0.0.0/0

a new c++ console app created. everything in settings.json. looks right:

 "torizon_debug_ssh_port": "2222",
    "torizon_debug_port1": "",
    "torizon_debug_port2": "",
    "torizon_debug_port3": "",
    "torizon_psswd": ****,
    "torizon_login": ****,
    "torizon_ip": "10.10.10.87",
    "torizon_ssh_port": "22",
    "host_ip": "10.10.10.61",
    "torizon_workspace": "${workspaceFolder}",
    "torizon_gpu": "-imx8",
    "torizon_arch": "aarch64",
    "wait_sync": "1",
    "torizon_run_as": "torizon",
    "torizon_app_root": "/home/torizon/app",
    "docker_tag": "v0.0.0",
    "tcb.version": "3.13.0",
    "torizon.gpuPrefixRC": true,
    "terminal.integrated.defaultProfile.linux": "bash",
    "containers.environment": {
        "DOCKER_HOST": "tcp://10.10.10.87:2375",
        "DEBUG_SSH_PORT": "2222",
        "DEBUG_PORT1": "",
        "DEBUG_PORT2": "",
        "DEBUG_PORT3": ""
    },
    "docker.environment": {
        "DOCKER_HOST": "tcp://10.10.10.87:2375",
        "DEBUG_SSH_PORT": "2222",
        "DEBUG_PORT1": "",
        "DEBUG_PORT2": "",
        "DEBUG_PORT3": ""
    }
} 

I have tried with and with out a fire wall running. not sure where from here

The latest error message you got is complaining that the registry container does not have a 5002->5000/tcp port binding. This is what the extension expects since that is what it runs the registry container with. In your case it looks like you have a 5002->5002/tcp binding instead for some reason on your registry container.

Perhaps try removing the registry container and then let the extension recreate it with the expected configuration.

Best Regards,
Jeremias

Hi @Lon

Can we close this ticket? Did you manage to slve this?

Best regards,

Please close it. I ended up doing a fresh install to get things to work. I am still on version 3.0.4. Not sure if it is safe to try updated the the torizon IDE extension and the new docker setup or not.

It’s still recommended to downgrade the containers/docker extension as per the link I shared before: Update fails many times from Torizon clouad - #23 by henrique.tx

Compatibility with the new version of the containers extension is fixed in the pre-release version of our extension. But you may prefer to stay on the stable release of our extension until a proper full release is ready.

Best Regards,
Jeremias

@jeremias.tx I followed the instructions provided in the link to downgrade the docker extension, but now I see this error:

Greetings @koverly,

I suppose Microsoft changed the ability to downgrade that extension. That said I checked and I think the latest version of the Torizon extension should now be compatible with the new Docker & Container tools extension from Microsoft.

Let’s step back and make sure your issue is even related first. What issue were you originally having that made you think it was related to the Docker extension?

Best Regards,
Jeremias