Docker error when deploying to device from Torizon Visual Studio plug-in

I’m looking again at the Torizon Visual Studio plugin after working on other projects for a while. But I can’t get the most simple hello world template project to deploy and run on my iMX6 target. The plug-in does build the container but then fails to deploy it to the target and shows this message:

Pulling image on target.
Done
Exception while deploying/running container to target.
Code: 530
Description: Local docker exception.
Message: Docker exception: 500 Server Error for http://127.0.0.1:55703/v1.40/images/create?tag=latest&fromImage=localhost%3A32769%2Fhellotorizon_arm32v7-debian_bullseye_debug_5cd29bed-bc11-41f3-b0ec-2fab3378fd45: Internal Server Error ("Get "http://localhost:32769/v2/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)")

Docker Desktop itself appears to be working fine as I can pull and run images from the command line. I can also use the command line on the iMX6 module to pull and run images directly on the module. And I can use Visual Studio to deploy and debug C# in a container on the iMX6 with no problem. The issue only seems to be in using the Torizon Plug-in to deploy and debug C++ code on the module.

Some of the articles I found online suggested setting the DNS to 8.8.8.8, I tried that but it didn’t solve my problem. Has anyone seen this issue and do you know how to solve it?

I am using Docker Desktop v4.12.0
TorizonCore 5.4.193-5.7.0+git.f5d73fd6e9f8
Torizon Plug-in 1.5.0

Hi @MikeS ,

Just to be sure, in what IDE are you having this issue? You said Visual Studio, but our extension there only supports C/C++. On the other hand our VSCode extension supports .NET/C#, so I’m not exactly sure which one you are referring to.

Regardless of the IDE, does this issue happen every time you try deploying your app, or does it happen sometimes at random?

Best regards,
Lucas Akira

Hi @lucas_a.tx ,

I saw this when using Visual Studio 2019 with the Torizon plug-in for Visual Studio and the hello world template in C++.

I then tried using Visual Studio Code with the Torizon extension. The hello world C++ application in Visual Studio Code also fails to deploy to the device and reports a docker error, shown below. Maybe there is something wrong with my docker setup? Do I need to allow access between docker and the Torizon extensions on specific port numbers which are not open by default? This used to work with Torizon on the same PC but I haven’t used it for a year or so while I worked on other projects. Docker has updated itself to v4.12.0 and the Torizon extensions have also been updated since I last used them successfully. Perhaps I should try uninstalling docker and then trying again?

This is the error from Visual Studio Code:

Local docker exception. :: Error (530) - Docker exception: Get "http://localhost:49154/v2/": dial tcp [::1]:49154: connect: connection refused message:Get "http://localhost:49154/v2/": dial tcp [::1]:49154: connect: connection refused The push refers to repository [localhost:49154/cppapp_arm32v7-debian-no-ssh_bullseye_debug_f32ab5f5-c334-4ff5-83c4-207adb6a3382]

Mike

Hi @MikeS ,

We couldn’t reproduce your issue on Visual Studio nor on VSCode, which leads me to believe that this is a problem related to Docker.

Based on these two links:

Get https://registry-1.docker.io/v2/: net/http: request canceled while waiting for connection · Issue #611 · docker/for-win · GitHub

Client.Timeout exceeded while awaiting headers · Issue #1534 · docker/for-win · GitHub

I suggest you try the following:

  • Reinstall Docker Desktop and check if you’re using the latest VSCode version (1.71.2 as of writing this)
  • After reinstalling Docker reboot your PC and try deploying the image on VSCode; make sure you’re not connected to a VPN
  • Maybe try setting your DNS to 8.8.4.4 instead of 8.8.8.8, or changing back to automatic DNS, then trying again

See if this helps you.

Best regards,
Lucas Akira

Hi @lucas_a.tx,
I did go ahead yesterday and removed Visual Studio Code, Docker, and WSL from my system. I then reinstalled them all (Same versions as before). It seemed to also help to delete the .moses folder on my PC. After that the Torizon plugins for both Visual Studio Code and Visual Studio 2019 started to work again. I didn’t have to use any specific DNS servers.
Mike

Glad everything is working now. Can I mark this question as solved?

Best regards,
Lucas Akira

Yes. I just marked it as solved myself just now.

1 Like