Hi Antara,
I got it working with setting the following environment variables in the Kanto container manifest:
SDV_MQTT_ADDRESS=mqtt://mosquitto:1883
SDV_VEHICLEDATABROKER_ADDRESS=grpc://databroker:55555
SDV_MIDDLEWARE_TYPE=native
Log output from seatadjuster-app:
Can't find the service location for SeatService, make sure to set the
│
││ necessary env variables for all depemdencies │
││ 2023-06-05 12:58:58,581 INFO [__main__] [main.py:111] [trace_id=4fc4addbe52b77b2449c51b114bda1ab span_id=6902e5c7076f8491
resource.service.name=/tmp/staticx-pCNHhk/main] - Starting │
││ seat adjuster app...
│
││ 2023-06-05 12:58:58,581 DEBUG [sdv.vehicle_app] [vehicle_app.py:72] [trace_id=4fc4addbe52b77b2449c51b114bda1ab
span_id=6902e5c7076f8491 resource.service.name=/tmp/staticx-pCNHhk/ │
││ main] - VehicleApp instantiation successfully done │
││ 2023-06-05 12:58:58,582 INFO [sdv.vdb.subscriptions] [subscriptions.py:72] [trace_id=4fc4addbe52b77b2449c51b114bda1ab
span_id=6902e5c7076f8491 resource.service.name=/tmp/staticx- │
││ pCNHhk/main] - Subscribing to SELECT Vehicle.Cabin.Seat.Row1.Pos1.Position
│
││ 2023-06-05 12:58:58,583 DEBUG [sdv.native.mqtt] [mqtt.py:52] [trace_id=4fc4addbe52b77b2449c51b114bda1ab
span_id=6902e5c7076f8491 resource.service.name=/tmp/staticx-pCNHhk/main] - │
││ Mqtt native connection OK!
The config has changed in the velocitas-template at the end of last year and I think we didn’t update any documentation yet.
https://github.com/eclipse-velocitas/vehicle-app-python-sdk/commit/bfdbc0317632551ec4fb222f5fdcd9e297a489ac
Regards
Mike
Von: leda-dev <leda-dev-bounces@xxxxxxxxxxx>
Im Auftrag von Antara Dey
Gesendet: Montag, 5. Juni 2023 14:40
An: leda developer discussions <leda-dev@xxxxxxxxxxx>
Betreff: Re: [leda-dev] SeatAdjusterApp launch in Leda
Hi,
Update: I have set the registry to public. Hope it works now.
Regards,
Antara
From: Antara Dey
Sent: Monday, 5 June 2023 2:25 PM
To: leda developer discussions <leda-dev@xxxxxxxxxxx>
Subject: RE: SeatAdjusterApp launch in Leda
Hello Mike,
Oh yes, my registry is private. If required, I can make it public for a few hours’ time, and you can use it to verify. Do let me know.
Yes, I copied the file first using - scp -P 2222 seatadjuster-app.json root@localhost:/data/var/containers/manifests/
then, recreated the container using kantui – Stop, Remove and Redeploy.
Also tried with kanto-auto-deployer command from the manifests folder to check the logs.
I even tried rebooting Leda to ensure it.
Hi Antara,
Unfortunately, I am unable to verify your deployment descriptor as it references a private container:
[2023-06-05T12:10:01Z ERROR kanto_auto_deployer] [CM error] Failed to create container: status: Unknown, message: "failed to resolve reference \"ghcr.io/antaradey-itk/seat-adjuster-app:latest\":
failed to authorize: failed to fetch anonymous token: unexpected status: 401 Unauthorized", details: [], metadata: MetadataMap { headers: {"content-type": "application/grpc"} }
I think you’re right about the log message, it only appears for the DAPR use case (which is no longer used for Leda).
Did you recreate the container? (Eg Stop, Remove and Redeploy)
How do you deploy it? Using kanto-auto-deployer?
Cheers
Mike
Hello,
I updated the Dockerfile maintaining only Kanto container manifest and added the
extra_hosts tag, yet I still see no change. Attached the file for your reference.
On comparing the logs between Velocitas and Leda, I see that the log of “Topic registered” for the MQTT in Velocitas is logged only by DAPR runtime. The application proceeds to display log for subscription of data broker.
PFA for reference.
For better understanding, I also tried to compare seat-service logs of Leda and run-seatservice in Velocitas. Isn’t it expected to log in a similar fashion?
Regards,
Antara
Hi,
the attached container manifest looks like a merged Velocitas application manifest (Port, DAPR_GRPC_PORT, VehicleModel, dependencies) and a Kanto Container Manifest
(container_id, container_name, image, host_config etc.)
You cannot just “merge” two different types of JSON configurations into a single file.
Kanto may be ignoring the Velocitas keys, but it’s not the right way to copy everything into a single file and hope for the best.
Coming to the problem that the application is not connecting to databroker, and I actually assume that it also does not connect to the MQTT broker. It says “Registering
topic”, which is an indication that the code WANTS to register, but there is no further log, so it may as well not be able to connect. Otherwise it should log something like “Topic registered”
Since there is no “extra_hosts” defined, the application container may not resolve the IP addresses of the services correctly.
I guess you’re missing this part in the container deployment manifest:
"host_config":
{
…
"extra_hosts": [
"databroker:container_databroker-host",
"mosquitto:host_ip"
],
…
}
Regards
Mike
Hello Leda Community,
I am a student currently working at ITK.
I, and my team have been exploring Eclipse Leda, to understand its underlying functionality and how it interacts with the contributor pieces of SDV.
I am currently facing a challenge with debugging the application container in Leda and seek some support on it.
First, I used to Velocitas examples tutorial to launch the services in VS Code and traced the logs.
Then, I followed the Leda documentation and launched the Seat Adjuster Vehicle App as a Kanto-CM container in Leda. I used the Dockerfile from Velocitas repository to create a docker image – which includes the necessary
modifications for it to work. All other containers are also successfully up and running.
Issue: The
SeatAdjusterApp does not work as expected in Leda. It does not launch completely. It subscribes to MQTT topic /seatadjuster/setPosition/request. But, as seen from the Kantui logs, it fails to further subscribe to the VehicleDataBroker. Due to this, the
MQTT publish message command (move seat position) does not render any output from the app. The functionality of the application works as expected in Velocitas.
I have attached the Container Manifest, Dockerfile and Kantui logs for your reference.
Kindly provide support and/or information on this issue to proceed further.
Best regards,
Antara Dey
Work Student
ITK Engineering GmbH, Stuttgart-Vaihingen