Open msatpathy26 opened 4 years ago
Adding below a less detailed summary of the error as well for a quick look.
root@raspberrypi4:/var/rootdirs/home/root# aktualizr -c /var/sota/ --loglevel 1
Aktualizr version 2020.9-0-gd4811f900 starting
Reading config: "/var/sota/sota.toml"
Current directory: /var/rootdirs/home/root
Use existing SQL storage: "/var/sota/sql.db"
Checking if device is provisioned...
All ECUs are already registered with the server.
Primary ECU serial: c708c67a484afaa6dc1c1fdc394ee9929fb54d8bc8bee946a63fd86604681409 with hardware ID: raspberrypi4
Device ID: 60fc6bbd-fd15-441b-b17f-fce4197988f4
Device Gateway URL: https://ota-ce.uptanedemo.com:8443
Certificate subject: CN=60fc6bbd-fd15-441b-b17f-fce4197988f4
Certificate issuer: CN=ota-devices-CA
Certificate valid from: Sep 14 11:21:11 2020 GMT until: Sep 14 11:21:11 2021 GMT
... provisioned OK
No pending updates, continuing with initialization
Reporting default hardware information
Reporting network information
Reporting libaktualizr configuration
got SendDeviceDataComplete event
Reporting network information
No installation result to report in manifest
GET https://ota-ce.uptanedemo.com:8443/director/1.root.json
Director metadata update failed: Failed to fetch role root in director repository.
It looks like you are using the Community Edition, which is not very actively supported at the moment. Something must be wrong with your backend. The device thinks it is provisioned yet is getting 405s on PUT /system_info
and lots of concerning messages like this:
response http code: 404
response: {"code":"missing_device","description":"device doesn't exist","cause":null,"errorId":"e3d6a0e8-ecda-491f-98ee-b4b022806e09"}
This also looks bad:
response http code: 424
response: {"code":"root_role_not_found","description":"root role was not found in upstream key store","cause":null,"errorId":"65242ca8-12f5-4202-be1c-}
Director metadata update failed: Failed to fetch role root in director repository.
If you can't even fetch the first Root metadata from the Director, something is clearly not right with the Director. Note that libaktualizr will always try to fetch newer versions of the Root metadata, and if there isn't a newer one, it will complain, but that isn't necessary a problem. This, however, is the first Root.
Thanks for the reply @patrickvacek
Speaking about the director, the latest version in community edition is using director-v2, however I am still using director. Can I get an idea what's the basic difference ?
Director was completely reimplemented to be more efficient, to drop unused features, and to make it easier to maintain. I don't know much about the details. I highly recommend using the new version.
It also occurs to me that it is possible that you are using an old enough version of Director that still expects libaktualizr to fetch the unnumbered Root metadata. That requirement was dropped months ago (I don't know when exactly), so we removed that: https://github.com/advancedtelematic/aktualizr/pull/1661. (See https://github.com/advancedtelematic/aktualizr/pull/1501 for some more context.)
@patrickvacek thanks for the useful input. My Director version is 5 month's old where as aktualizr is the most recent version. I would try to use a more recent version and see how it goes.
@patrickvacek I upgraded to the latest configuration and now it throws error 400. What does this error code imply ?
root@raspberrypi4:/var/rootdirs/home/root# aktualizr -c /var/sota/ --loglevel 1
Aktualizr version 2020.9-0-gd4811f900 starting
Reading config: "/var/sota/sota.toml"
Current directory: /var/rootdirs/home/root
Bootstrap empty SQL storage
Bootstraping DB to version 25
Unable to load previous device ID.
Successfully imported client certificate from "/var/sota/import/client.pem"
Successfully imported server CA certificate from "/var/sota/import/root.crt"
Successfully imported client TLS key from "/var/sota/import/pkey.pem"
No serial found in database for this ECU, defaulting to empty serial
Could not find Primary ECU serial, set to lazy init mode
Successfully imported installed versions from "/var/sota/import/installed_versions"
Checking if device is provisioned...
Initializer error: Server error: Error registering device: 400 {"code":"invalid_entity","description":"public-key length is wrong: DownField(110860ed8}
Sorry, but I've never seen that error before and I don't know much about the backend. Possibly @jochenschneider or @houcros might be able to say more about the device gateway and/or director's behavior here.
@patrickvacek , thanks for the pointers. As I wait to hear from anyone about any fix to the issue, would it be possible to know anything about the versions of server components (similar to this ) that you use for your test environment. For months I have been struggling to find the best match that can work together with recent version of aktualizr. I donot see any clear information available with aktualizr's release note stating the required versions of server components that must be available to work correctly.
Unfortunately we do not have a chart of compatible versions. The aktualizr and meta-updater CIs use whatever is running on our production server, and we do most internal testing against an internal instance that is pretty similar. I don't have many details there but @alexhumphreys or @SusVlaAlex might.
I've added the file config/latest-images.yaml
in ota-community-edition. This file should get automatically updated when we change the versions running on our production server. It's not exactly a compatibility chart with aktualizr, but it'll at least give an idea of what server versions were running at what dates.
Hi,
I am getting the following error message
Running at loglevel 0 I get the following logs:
Can I get some idea what's going wrong here ?