Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leda-dev] Launching KUKSA:mock_service in Leda
  • From: "Ivanov Vasil (BD/PAD-COD1)" <Vasil.Ivanov3@xxxxxxxxx>
  • Date: Wed, 8 Nov 2023 15:21:20 +0000
  • Accept-language: en-150, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bosch.com; dmarc=pass action=none header.from=bosch.com; dkim=pass header.d=bosch.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1Oduyx20VaiSJsH0C2WNUXB839PQF1GMWWh/9SSeEoc=; b=M2BYmX7uSBXYA0qLdy2Zy3B6GCS2rxOxEMzDdra1Nk37vJ5ONsTSFxBUK4FIdxqJ99Jt8FiZvNeG1aTNSQaXlkQsVJNsa7Pg0sLwhqFMIY5Jn1ZDtNJ7qhYoF645hTWCJa/FhG3O6LG/xd+iGyVV2JAz9UhDaDJeWaBd7g3OLpDUY+tLqXzGZhH8hGFeXr4zgyFZpjdQlvwOzSdQvISKig2am8RFCu6CONPn+xKqhkAW5iUTP4IOjrDPnGjOVevOInsq6U6drFNhk/mdLe15a6WAwiVSPWmraVhubcSDnsGSBr4Zzzxj1ZLaTYW6nFCo5t0BB+VupUwrYpx1JjG3Lg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GpI87PK78o88fjsD7DuaBwfEBIZUImoe40f4LSjt6K1yS1/V/aNfuTUuLrRj70AeYuGRFSAJyGEqOlavqCxO/P/X7nNl6ojN1d+O1opVYJL4XxHcZH4Ey5w5q3WPsc6Kk9rqYxy5Gb0K4uhgXoKsYDzQ6D2H+CGlfagACxKcG3nvfzJ9ul2e2FaGnaXja6YZtyIygziIBXw0qkyddAK6aSiIKeltMhnYYKVjhS+OQeBm0bXvXocm4ufWl706hkh/X6WpGIGyPWB3WMwqBJ6eZeB4hZDnFrdSRC5SReQgYvtG+45+JgtaHfxokNeauc11bMTpy1M3UBHmPc79wicfJQ==
  • Delivered-to: leda-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/leda-dev/>
  • List-help: <mailto:leda-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/leda-dev>, <mailto:leda-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/leda-dev>, <mailto:leda-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels:
  • Thread-index: AQHaEkZBdWlPun4+QUKpmzsAIs8NqrBwhtlx
  • Thread-topic: [leda-dev] Launching KUKSA:mock_service in Leda

Hi Antara,

From what I see in your container descriptor, you set the environment variables as so:
        "env": [
           "SDV_MQTT_ADDRESS=mqtt://mosquitto:1883",
           "SDV_VEHICLEDATABROKER_ADDRESS=grpc://databroker:55555",
           "SDV_MIDDLEWARE_TYPE=native",
           "RUST_LOG=info",
           "vehicle_data_broker=info"
]
However, "mosquitto" and "databroker" don't mean anything to the kanto container manager and that is why you are probably getting RPC (connection) errors.

If you want to use mosquitto and databroker to refer to the MQTT broker (native) on Leda and the databroker container, you would need to add some extra host entries:
        "extra_hosts": [        
                "mosquitto:host_ip",
                "databroker:container_databroker-host"
   ]

Now, host_ip and container_databroker-host are special variables in Kanto manifests which resolve to the Host ip and the ip of the container with the name databroker in the virtual bridge network respectively. Adding the above-mentioned extra host entries now map "mosquitto" and "databroker" to those IPs and this will allow your mock service to connect to both services (if everything else is ok).


P.S.2: 
If you do the extra hosts re-mapping the way I suggested, you shouldn't need in host networking mode. If you still decide to run in host-networking mode, then you would need to map both "mosquitto" and "databroker" to 127.0.0.1.

P.S.3: 
In docker, on the default docker0 bridge network you don't have a DNS server that allows container-name based communication and I assume that's why you can't get it to work without host networking. 

Overall, I suggest going with the approach I described in the beginning of this email and if you need further help, don't hesitate to write back. 

Best regards,
Vasil



From: leda-dev <leda-dev-bounces@xxxxxxxxxxx> on behalf of Antara Dey via leda-dev <leda-dev@xxxxxxxxxxx>
Sent: Wednesday, 8 November 2023 16:24
To: leda-dev@xxxxxxxxxxx <leda-dev@xxxxxxxxxxx>
Cc: Antara Dey <Antara.Dey@xxxxxxxxxxxxxxxxxx>
Subject: [leda-dev] Launching KUKSA:mock_service in Leda
 
Hello Leda community,

I am trying to launch the mock_service from KUKSA as Kanto container in Leda image. 

Steps: 
      1. Import mock_service from KUKSA repository into Velocitas template. 
      2. Modify vehicle signals for vehicle application and test it.
      3. Create docker image, and push to private repository. 
      4. Pull docker image and run in Velocitas environment. -> Runs as expected.
      5. Use Kanto-CM container manifest to launch in Leda v.M2 image.
      6. Restart Kanto-CM.

The creation of the mock_service container is successful. 
But, it throws the following errors in logs and does not run as expected. 

.

As suggested by Velocitas team, I have referred the Velocitas Kanto manifest file for mock_service from mockservice.json.

Please find attached JSON file of the mock_service which I use in Leda image. 

Note: I observe the same error in Velocitas in the following scenarios:
1) Container launched without Local-Runtime Up. 
2) *docker run* without flag --net=host.

Kindly provide insights into this issue.

Kind regards,
Antara 



Back to the top