I’m trying to deploy / debug an application with the Torizon IDE tasks, but for some unknown reason it keeps taking the IP of an old device and not the one I selected in my default device.
As you can see below, first it takes the correct IP address “10.10.250.1” but later, when it obviously fails, it tries to use an older IP “10.10.249.220”.
I don’t see the old IP anywhere in my setting files, and therefore I am completely stuck!
* Executing task: pwsh -nop .conf/validateDepsRunning.ps1
⚠️ VALIDATING ENVIRONMENT
✅ Environment is valid!
* Terminal will be reused by tasks, press any key to close it.
* Executing task: bash -c [[ ! -z "10.10.250.1" ]] && true || false
* Terminal will be reused by tasks, press any key to close it.
* Executing task: bash -c [[ "aarch64" == "aarch64" ]] && true || false
* Terminal will be reused by tasks, press any key to close it.
* Executing task: sleep 1
* Terminal will be reused by tasks, press any key to close it.
* Executing task: sshpass -p root scp -P 22 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no /home/igiona/git/gui/docker-compose.yml torizon@10.10.250.1:~/
Warning: Permanently added '10.10.250.1' (ED25519) to the list of known hosts.
* Terminal will be reused by tasks, press any key to close it.
* Executing task: DOCKER_HOST=10.10.250.1:2375 docker image prune -f --filter=dangling=true
Total reclaimed space: 0B
* Terminal will be reused by tasks, press any key to close it.
* Executing task: docker compose -p torizon stop gui gui-debug && docker compose -p torizon rm -f gui gui-debug
error during connect: Get "http://10.10.249.220:2375/v1.51/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.oneoff%3DFalse%22%3Atrue%2C%22com.docker.compose.project%3Dtorizon%22%3Atrue%7D%7D": dial tcp 10.10.249.220:2375: connect: no route to host
* The terminal process "/usr/bin/bash '-c', 'docker compose -p torizon stop gui gui-debug && docker compose -p torizon rm -f gui gui-debug'" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
I tried to reboot my PC, to remove the device and re-add it multiple times, but the issue persists.
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?
Hello Giona! Thank you for reaching out.
This issue typically occurs when an old IP address is cached in your project or Docker settings—even if it isn’t visible in your user-facing configuration. Here are some steps to help you resolve this:
1. Check VS Code Workspace Settings
Open your project’s .vscode/settings.json.
Look for the properties torizon_ip and host_ip. If either is set to the old IP (10.10.249.220), update or remove it. Example:
3. Clear Old Docker Contexts and Environment Variables
Double-check your shell/environment for any lingering DOCKER_HOST variables referring to the old IP. Run:
echo $DOCKER_HOST
Unset or update if needed.
Also, clean up Docker contexts that may be pointing to the old IP:
docker context ls
# Remove old contexts as necessary
4. Multi-NIC Environment Note
If you are in a multi-network setup, VS Code or Docker might incorrectly resolve the wrong network interface. In such cases, manual overrides as above are essential. Further Details
5. Restart VS Code
After making these changes, restart VS Code completely to ensure the environment reloads with the correct settings.
If you follow these steps, the IDE should stop referencing the old device IP. Let me know if you run into any issues!
May I ask what your network configuration looks like? Potentially the setup of wifi, ethernet, VPN, etc. could cause some harm here.
What might help is using the property torizon.overwriteHostIp inside settings.json, with which you would set a static IP. Using this instead of the automatic detection might solve your issue, because depending on your network configuration it might be hard for the automatic detection to locate the correct interface.
thank you for your message.
Nothing special in my setup right now, single WiFi NIC connected to the corp. network where also the device is connected.
No LAN, VPNs nor additional WiFis conncted…
I’m using PopOS (aka Ubuntu 22.04).
In fact, what’s bothering to me is that the IP detection actually works, but for some reason the env. var DOCKER_HOST is wrongly set withing the VsCode instance (not set on my machine globally).
There is quite some magic in the way Torizon IDE works, and if the magic doesn’t work it’s a bit of a problem because we get pretty much stuck…
I’ll try setting the global override as suggested, but sounds more like a workaround to a under-radar bug, than solution…
@collin.tx , also when I set the suggested flag in the settings, DOCKER_HOST remains the wrong one…
I now de-installed the Torizon IDE extension, and now the env variable is not set anymore… something isn’t right here
This is the behavior when you do not have a device set as default; the extension removes it from the workspace .vscode/settings.json.
So, let’s focus on the main issue. The torizon.overwriteHostIp is used only when your main network interface is not detected automatically, like when you have multiple interfaces, like Wifi, Ethernet, VPN and etc. So, in your case, the torizon.overwriteHostIp will not help.
The task that is failing for you is the pre-cleanup. So, VS Code should use the DOCKER_HOST set on the workspace .vscode/settings.json as the remote docker context for the docker commands, the DOCKER_HOST IP should be the same as the value of the torizon_ip property from .vscode/settings.json. But, for some reason VS Code is getting the 10.10.249.220 instead. Please take a look at the global settings.json. Press F1 and then select the option:
I did already check all of my settings previously, and there was / is no sign of that variable whatsoever.
The only place it occurs is in your PowerShell scripts and tasks.json.
De-installing and re-installing the extension “solved the issue”, so now I’m not facing the issue anymore, and when I start vs-code and run “echo $DOCKER_HOST” in the VsCode terminal the variable is now unset, whereas before it was already set by presumably your extension.
I’m pretty sure that this will popup again, since we switch devices a lot.
The torizon.overwriteHostIp doesn’t help me here, but it does in another use-case where the Verdin acts as hot-spot and we connect to it using a second WiFi dongle, in that case the HOST_IP resolution was always wrong.
(PS: I get that isn’t too trivial, but you could at least try to pick the HOST_IP from the NIC in which the TORIZON_IP relies in…)
Of course I always do that step in order to be able to work with the device.
As I wrote above, I removed and re-added the new device multiple times.
As you can see from the logs above, the scripts are picking up the new IP from the settings.json (automatically updated with the correct IP by the IDE extension), but than for some unknown reason DOCKER_HOST remained to the old device-IP.
Uninstalling and reinstalling the extension, solved the issue.
I personally think that there is something wrong with the extension, how comes that the app re-installation would fix this otherwise?
If you don’t think so, feel free to close this thread.
I hope it’s going to be “helpful” to whoever will encounter this issue in the future.