eclipse-leda / leda-distro

Eclipse Leda provides a Yocto-based build setup for SDV.EDGE components
https://eclipse-leda.github.io/leda/
Apache License 2.0
14 stars 8 forks source link

Kanto cm containers not found in sdv-health #99

Closed FMT1COB closed 1 year ago

FMT1COB commented 1 year ago

I have followed this document to run eclipse leda on qemu (https://eclipse-leda.github.io/leda/docs/general-usage/running-qemu/). I have installed qemu in my linux machine and downloaded eclipse-leda-qemu-x86_64.tar.xz and extracted into my working directory. I have created a device id in azure iot hub as mentioned in the document (https://eclipse-leda.github.io/leda/docs/device-provisioning/script-provisioning/). I can find container json files in /data/var/containers/manifests but sdv-health is displaying kanto cm containers are not found.

vasilvas99 commented 1 year ago

All containerized components are pulled during runtime from the internet. Does your qemu image have internet access?

You can also run:

$ systemctl status kanto-auto-deployer

To check the state of the initial container deployment.

FMT1COB commented 1 year ago

I am getting not found response. root@qemux86-64:/data/var/containers/manifests# $ systemctl status kanto-auto-deployer -sh: $: not found I guess there is no internet. In sdv-health I can see ping internet failed [SDV Connectivity]

vasilvas99 commented 1 year ago

Hi, it seems you have copied over the $, command is only systemctl status kanto-auto-deployer.

Also which version of leda-distro are you using? I suggest the latest milestone release: 0.1.0-M1

FMT1COB commented 1 year ago

My Bad!. Yes I am using the same version. Please check below for the status kanto-auto-deployer root@qemux86-64:/data/var/containers/manifests# systemctl status kanto-auto-deployer use -l

May 03 12:55:02 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:02Z WARN kanto_auto_deployer::manifest_parser] Failed to load manifest directly. Will attempt auto-conversion from init-dir format. May 03 12:55:02 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:02Z INFO kanto_auto_deployer] Creating [seatservice-example] May 03 12:55:03 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:03Z ERROR kanto_auto_deployer] [CM error] Failed to create container: status: Unknown, message: "failed to resolve reference \"ghcr.io/boschglobal/kuksa.val.services/seat_service:v0.3.0\": failed to do request: Head \"https://ghcr.io/v2/boschglobal/kuksa.val.services/seat_service/manifests/v0.3.0\": dial tcp: lookup ghcr.io on 10.0.2.3:53: no such host", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} } May 03 12:55:03 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:03Z WARN kanto_auto_deployer::manifest_parser] Failed to load manifest directly. Will attempt auto-conversion from init-dir format. May 03 12:55:03 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:03Z INFO kanto_auto_deployer] Creating [sua] May 03 12:55:04 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:04Z ERROR kanto_auto_deployer] [CM error] Failed to create container: status: Unknown, message: "failed to resolve reference \"ghcr.io/eclipse-leda/leda-contrib-self-update-agent/self-update-agent:build-66\": failed to do request: Head \"https://ghcr.io/v2/eclipse-leda/leda-contrib-self-update-agent/self-update-agent/manifests/build-66\": dial tcp: lookup ghcr.io on 10.0.2.3:53: no such host", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} } May 03 12:55:04 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:04Z WARN kanto_auto_deployer::manifest_parser] Failed to load manifest directly. Will attempt auto-conversion from init-dir format. May 03 12:55:04 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:04Z INFO kanto_auto_deployer] Creating [vum] May 03 12:55:05 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:05Z ERROR kanto_auto_deployer] [CM error] Failed to create container: status: Unknown, message: "failed to resolve reference \"ghcr.io/eclipse-leda/leda-contrib-vehicle-update-manager/vehicleupdatemanager:main-1d8dca55a755c4b3c7bc06eabfa06ad49e068a48\": failed to do request: Head \"https://ghcr.io/v2/eclipse-leda/leda-contrib-vehicle-update-manager/vehicleupdatemanager/manifests/main-1d8dca55a755c4b3c7bc06eabfa06ad49e068a48\": dial tcp: lookup ghcr.io on 10.0.2.3:53: no such host", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} } May 03 12:55:05 qemux86-64 kanto-auto-deployer[543]: [2023-05-03T12:55:05Z INFO kanto_auto_deployer] Running in daemon mode. Continuously monitoring "/data/var/containers/manifests" Unit use.service could not be found.

vasilvas99 commented 1 year ago

Are you perhaps behind a corporate proxy, since the run-leda.sh script sets-up slirp-networking and requires transparent internet access?

FMT1COB commented 1 year ago

I have updated the proxy using export command like this export http_proxy=http://USERNAME:PASSWORD@[proxy-server-ip-or-dns-name]:PORT export https_proxy=http://[proxy-server-ip-or-dns-name]:[Port-Number]

And saved proxy details in this /etc/bash.bashrc file vi /etc/bash.bashrc export http_proxy=http://USERNAME:PASSWORD@[proxy-server-ip-or-dns-name]:PORT export ftp_proxy=http://USERNAME:PASSWORD@[proxy-server-ip-or-dns-name]:PORT https_proxy=http://[proxy-server-ip-or-dns-name]:[Port-Number]

Later I have tried to deploy the containers using kanto-auto-deployer, I am getting the 403 forbidden error. root@qemux86-64:~# kanto-auto-deployer /data/var/containers/manifests/ [2023-05-04T09:20:34Z INFO kanto_auto_deployer] Running initial deployment of "/data/var/containers/manifests" [2023-05-04T09:20:34Z INFO kanto_auto_deployer] Reading manifests from [/data/var/containers/manifests] [2023-05-04T09:20:34Z WARN kanto_auto_deployer::manifest_parser] Failed to load manifest directly. Will attempt auto-conversion from init-dir format. [2023-05-04T09:20:34Z INFO kanto_auto_deployer] Creating [cloudconnector] [2023-05-04T09:20:35Z ERROR kanto_auto_deployer] [CM error] Failed to create container: status: Unknown, message: "failed to resolve reference \"ghcr.io/eclipse-leda/leda-contrib-cloud-connector/cloudconnector:main-47c01227a620a3dbd85b66e177205c06c0f7a52e\": failed to authorize: failed to fetch oauth token: unexpected status: 403 Forbidden", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }

vasilvas99 commented 1 year ago

It seems that the proxy is denying you access to a public GitHub registry.

Can you try two things:

  1. wget google.com - to check if DNS resolution/internet access works in general
  2. Do you have docker on your host machine? If yes, can you (using the same proxy settings) execute:
    docker pull ghcr.io/eclipse-leda/leda-contrib-cloud-connector/cloudconnector:main-47c01227a620a3dbd85b66e177205c06c0f7a52e
mikehaller commented 1 year ago

The issue seems to became stale, and since this is not a Leda issue but depends on the user's environment, i'll close this issue for now. If you have anything to add, you may reopen / create a new issue with more specific description.