Dev host 2 IP address, one subnet connects to my device, but can't debug

I am using VSCode. I can debug my program on a device that is on my local network. I have another device that is on a different subnet, I can ping and ssh into it with no issues. However, when I try to debug my C++ program, if fails trying to pull the compiled container down to the device:
Executing task: sshpass -p xxxxxx ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no torizon@192.168.3.1 LOCAL_REGISTRY=192.168.3.2 TAG=arm64 docker-compose pull gimbal3bcontainer-debug

Warning: Permanently added ‘192.168.3.1’ (ED25519) to the list of known hosts.
time=“2022-04-28T18:59:01Z” level=warning msg=“The “DOCKER_LOGIN” variable is not set. Defaulting to a blank string.”
gimbal3bcontainer-debug Pulling
gimbal3bcontainer-debug Warning
WARNING: Some service image(s) must be built from source by running:
docker compose build gimbal3bcontainer-debug
1 error occurred:
* Error response from daemon: Get “https://192.168.3.2:5002/v2/”: http: server gave HTTP response to HTTPS client

I have added 192.168.3.0:5002 to my “insecure-registries” on my local desktop, but it still doesn’t work. Since I have 2 cases, I have 2 statements, one for my main network and one for this other subnet that my other device is on.

Why can’t I debug my .3 subnet device?

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


Container Registry Configuration Issue

The error you’re encountering is related to Docker’s insecure registry configuration on your target device (192.168.3.1). The issue is that your development PC’s registry (192.168.3.2:5002) needs to be configured as an insecure registry on the target device, not just on your development machine.

Solution: Configure Insecure Registry on Target Device

When the Torizon IDE Extension connects to a device, it automatically configures the target device in Engineering Mode (1). Part of this configuration includes setting up your development PC’s IP as an insecure container registry (1).

The configuration should be added to /etc/docker/daemon.json on your target device as follows (1):

{  
	"insecure-registries" : ["<your development PC's IP>"]  
}  

(1)

Verify Current Configuration

On your target device (192.168.3.1), check the current Docker daemon configuration by running (2):

cat /etc/docker/daemon.json

(2)

You should see something like (2):

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

(2)

Troubleshooting Steps

  1. Check if the target device has the correct insecure registry configuration - The IP address should match your development PC’s IP (192.168.3.2) (2)

  2. Restart Docker daemon - If you manually modify the configuration, restart the Docker service on the target device

  3. Re-establish connection - Try disconnecting and reconnecting the target device in VS Code to ensure the Engineering Mode configuration is properly applied (1)

The key point is that Docker’s insecure registry configuration must be set on the device that’s pulling the images (your target device), not just on the device hosting the registry (your development PC).

Best regards, Toradex AI Assistant.


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

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

@ToradexAI
Yes, I have done that. From docker info:
Insecure Registries:
192.168.0.0:5002
127.0.0.0/8

I still get the same error.

My docker desktop is the same

Registry Configuration Issue

I see the problem - your insecure registry configuration shows 192.168.0.0:5002 but your development PC is at 192.168.3.2:5002. There’s a network mismatch.

Current Configuration Issue

Your target device (192.168.3.1) has this insecure registry configured:

  • 192.168.0.0:5002

But your development PC registry is at:

  • 192.168.3.2:5002

Solution: Update Insecure Registry Configuration

You need to update the /etc/docker/daemon.json file on your target device to include the correct IP address(1):

{
  "registry-mirrors" : ["192.168.3.2:5002"]
}

(1)

Or if you want to keep both networks configured:

{
  "insecure-registries" : ["192.168.0.0:5002", "192.168.3.2:5002"]
}

Steps to Fix

  1. SSH into your target device (192.168.3.1)
  2. Edit the Docker daemon configuration:
    sudo nano /etc/docker/daemon.json
    
  3. Add or update the insecure-registries entry to include 192.168.3.2:5002
  4. Restart the Docker service:
    sudo systemctl restart docker
    
  5. Verify the configuration:
    docker info | grep -A 5 "Insecure Registries"
    

The key issue is that Docker on your target device needs to know that 192.168.3.2:5002 (your development PC’s registry) should be accessed via HTTP instead of HTTPS(1).

Best regards, Toradex AI Assistant.


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

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Apparently, using 0’s in a subnet does not work as a wild card, the way it used to.