Hello,
we are trying to implement delta updates, but don’t get it working with downloading artifacts via DDI from our hawkbit.
Problem seems to be the authentication with TargetToken. But I am not really sure, because we cant see much details in logs.
I guess we set wrong configuration in sw-description, maybe you can help us.
We only get:
[…]
[INFO ] : SWUPDATE running : [get_total_size] : Total bytes to be reused : 58355970
[INFO ] : SWUPDATE running : [get_total_size] : Total bytes to be downloaded : 116080
[INFO ] : SWUPDATE running : [install_delta] : Size of artifact to be installed : 59739136
[TRACE] : SWUPDATE running : [trigger_download] : Range request : 60722-62209,63368-65109,65792-73947,106330-134956,433953-464759,1734636-1745818,6149454-6163020,8131522-8135525,11793660-11809534,11810965-11811268,11814063-11814367,11814522-11814543
[TRACE] : SWUPDATE running : [install_single_image] : Found installer for stream somefile.zck.header raw
< HTTP/1.1 200 OK
< Content-Length: 0
< Date: Tue, 30 Jul 2024 12:30:55 GMT
< Cache-Control: no-cache, no-store, max-age=0, must-revalidate
< Expires: 0
< Pragma: no-cache
< Set-Cookie: JSESSIONID=someid; Path=/; Secure; HttpOnly
< Vary: Origin
< Vary: Access-Control-Request-Method
< Vary: Access-Control-Request-Headers
< Strict-Transport-Security: max-age=31536000 ; includeSubDomains
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 0
< X-Frame-Options: DENY
<
* Connection #0 to host someurl.net left intact
[TRACE] : SWUPDATE running : [channel_log_effective_url] : Channel's effective URL resolved to https://someurl.net:443/sometenant/controller/v1/somecontroller/deploymentBase/someid/feedback
[TRACE] : SWUPDATE running : [channel_log_reply] : Channel operation returned HTTP status code 200.
[TRACE] : SWUPDATE running : [parse_reply] : Got channel reply:
[TRACE] : SWUPDATE running : [channel_log_effective_url] : Channel's effective URL resolved to https://someurl/sometenant/controller/v1/somecontroller/softwaremodules/someid/artifacts/somefile.zck
[DEBUG] : SWUPDATE running : [channel_get_file] : Channel downloaded 0 bytes ~ 0 MiB.
[ERROR] : SWUPDATE failed [0] ERROR corelib/channel_curl.c : channel_log_reply : 872 : Channel operation returned HTTP error code 401.
[ERROR] : SWUPDATE failed [0] ERROR handlers/delta_handler.c : read_and_validate_package : 584 : Transfer was unsuccessful, aborting...
[ERROR] : SWUPDATE failed [0] ERROR handlers/delta_handler.c : install_delta : 1041 : Delta Update fails : aborting
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running : [zck_log_toswupdate] : (comp_close) Closing compression
[TRACE] : SWUPDATE running : [install_single_image] : Installer for delta not successful !
[ERROR] : SWUPDATE failed [1] Installation failed !
[TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running : Waiting for requests...
[TRACE] : SWUPDATE running : [process_notification_thread] : Update log to server from thread
Our sw-description file looks like this:
software =
{
version = "2.1.0";
description = "v2.1.0";
images: (
{
filename = "somefile.zck.header";
name = "custom";
version = "2.01.0";
device = "/dev/swu/update/custom";
type = "delta";
properties: {
headers = {
“Authorization” = "TargetToken sometoken";
};
chain = "raw";
source = "/dev/swu/stable/custom";
};
sha256 = "somehash";
},
);
[…]
}
Mit freundlichen Grüßen
With best regards
i. A. Manuel Kerkmann
KS-E Team Smart Farming
![]()
AMAZONEN-WERKE H. DREYER SE & Co. KG
Am Amazonenwerk 9-13
49205 Hasbergen-Gaste
Mail: Manuel....@amazone.de
Mobile: +49 160 979 302 89
If you are using Amazon's S3 bucket, there was a post recently telling
that Amazon supports range request, but with just one entry, making
unsuitable for delta update.
See:
https://groups.google.com/g/swupdate/c/iKo6h6muM0A/m/UFZ5jK_yAQAJ
It could be possible to let SWUpdate to find itself the URL because
Hawkbit delivers a list of Software Modules, but this is currently
unsupported.
Nevertheless, the URL in the handler is a generic URL and the .zck can
resides on any server on the network. This means that SWUpdate does not
think this is on the Hawkbit server, and does not send any additional
header. It is just an URL, and if you put it on Hawkbit using
authentication, a 401 is expected. Reverse Proxy via certificate should
work, because the downloader can use the same certificates used to
connect to Hawkbit.
>
> device = "/dev/swu/update/custom";
>
> type = "delta";
>
> properties: {
>
> url =
> https://someurl/sometenant/controller/v1/somecontroller/softwaremodules/someid/artifacts/somefile.zck;
>
> headers = {
>
> “Authorization” = "TargetToken sometoken";
>
> };
This is your invention, the delta handler does not support this property.