Visual Studio Code: Problem in debugging C project

Recently I started development on AM62 SOM module with Verdin Development Board.

I installed Visual Studio Code and installed Torizon IDE Extension successfully.

After that I created a project in C console application which prints “Hello Torizon” in the debug console window.

But when I debug the project I am getting the following error. Kindly go through and guide me how to proceed.

WARN[0000] The “DOCKER_LOGIN” variable is not set. Defaulting to a blank string.
[+] Pulling 1/0
! surgpio-debug Warning Get “https://192.168.1.17:5002/v2/”: http: server gave… 0.0s
WARNING: Some service image(s) must be built from source by running:
docker compose build surgpio-debug
1 error occurred:
* Error response from daemon: Get “https://192.168.1.17:5002/v2/”: http: server gave HTTP response to HTTPS client

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

Thank you for reaching out with your issue. It seems like you’re encountering a problem with Docker’s ability to access a registry due to an HTTPS connection issue. Let’s go through some steps to help you resolve this:

  1. Check Docker Login Credentials:

    • The warning about the “DOCKER_LOGIN” variable suggests that Docker might not be authenticated properly. Please ensure your Docker login credentials are correctly set by running docker login in your terminal and entering your credentials.
  2. Verify Docker Registry URL:

    • The error message indicates an attempt to access a registry at https://192.168.1.17:5002/v2/. Please verify that this URL is correct and accessible. If this is a private registry, ensure it is configured to accept HTTPS connections.
  3. Check Network Configuration:

    • Make sure your network settings allow access to the registry. This might involve checking firewall settings or network proxies that could be blocking the connection.
  4. Docker Daemon Configuration:

    • If the registry uses a self-signed certificate, you may need to configure Docker to trust this certificate. You can do this by adding the registry’s certificate to Docker’s trusted certificates.
    • Alternatively, if you are in a controlled environment and understand the risks, you can configure Docker to allow insecure connections to the registry by adding the registry URL to the insecure-registries list in Docker’s daemon configuration file (usually located at /etc/docker/daemon.json).
  5. Rebuild Docker Images:

    • After addressing the above issues, try rebuilding the Docker images by running docker compose build surgpio-debug as suggested in the error message.

By following these steps, you should be able to resolve the Docker login and HTTPS connection issues, allowing you to proceed with debugging your C project on the Torizon platform.

I hope this helps! If you have any further questions, feel free to ask.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Debugging in Torizon IDE v2 fails when connecting with ssh.

Hi @sujithqinn,

On the AM62 device could you run cat /etc/docker/daemon.json. You should see something like this:

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

Except the IP address should match the IP address of your PC that is running VSCode.

Best Regards,
Jeremias