SWU forwarder fails

19 views
Skip to first unread message

Michael Häner

unread,
Jun 27, 2024, 5:39:54 AM (7 days ago) Jun 27
to swupdate
Hi,

I have just run into a problem with the "SWU forwarder" and do not understand the cause.

On the master device I see the following:
swupdate.sh[272]: [TRACE] : SWUPDATE running : [install_single_image] : Found installer for stream hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e.rootfs-20240625065519.swu swuforward
swupdate.sh[272]: [2024/06/27 07:27:54:6519] N: lws_create_context: LWS: 4.3.3-4415e84, NET CLI SRV H1 H2 WS ConMon IPV6-on
swupdate.sh[272]: [2024/06/27 07:27:54:6522] N: __lws_lc_tag: ++ [wsi|0|pipe] (1)
swupdate.sh[272]: [2024/06/27 07:27:54:6523] N: __lws_lc_tag: ++ [vh|0|netlink] (1)
swupdate.sh[272]: [2024/06/27 07:27:54:6527] N: __lws_lc_tag: ++ [vh|1|default||-1] (2)
swupdate.sh[272]: [2024/06/27 07:27:54:6620] N: __lws_lc_tag: ++ [wsicli|0|WS/h1/default/192.168.251.113] (1)
swupdate.sh[272]: * Trying 192.168.251.113:9990...
swupdate.sh[272]: * Connected to 192.168.251.113 (192.168.251.113) port 9990
swupdate.sh[272]: [TRACE] : SWUPDATE running : [callback_ws_swupdate] : Connection to http://192.168.251.113:9990/upload: established
swupdate.sh[272]: > POST /upload/upload HTTP/1.1
swupdate.sh[272]: Host: 192.168.251.113:9990
swupdate.sh[272]: User-Agent: libcurl-agent/1.0
swupdate.sh[272]: Accept: */*
swupdate.sh[272]: Content-Length: 155267316
swupdate.sh[272]: Content-Type: multipart/form-data; boundary=------------------------ElW6k9BMJHo7s6H2edLIiX
swupdate.sh[272]:
swupdate.sh[272]: * Recv failure: Connection reset by peer
swupdate.sh[272]: * Closing connection
swupdate.sh[272]: [ERROR] : SWUPDATE failed [0] ERROR swuforward_handler.c : curl_transfer_thread : 212 : SWU transfer to http://192.168.251.113:9990/upload failed (56) : 'Failure when receiving data from the peer'
swupdate.sh[272]: [ERROR] : SWUPDATE failed [0] ERROR swuforward_handler.c : swu_forward_data : 116 : Cannot write to fifo 0
swupdate.sh[272]: [ERROR] : SWUPDATE failed [0] ERROR swuforward_handler.c : install_remote_swu : 385 : Transferring SWU image was not successful
swupdate.sh[272]: [2024/06/27 07:28:12:2639] N: __lws_lc_untag: -- [wsi|0|pipe] (0) 17.611s
swupdate.sh[272]: [2024/06/27 07:28:12:2642] N: __lws_lc_untag: -- [vh|1|default||-1] (1) 17.611s
swupdate.sh[272]: [2024/06/27 07:28:12:2643] N: __lws_lc_untag: -- [wsicli|0|WS/h1/default/192.168.251.113] (0) 17.602s
swupdate.sh[272]: [2024/06/27 07:28:12:2644] N: __lws_lc_untag: -- [vh|0|netlink] (0) 17.612s
swupdate.sh[272]: [TRACE] : SWUPDATE running : [install_single_image] : Installer for swuforward not successful !
swupdate.sh[272]: [ERROR] : SWUPDATE failed [0] ERROR stream_interface.c : extract_files : 296 : Error streaming hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e.rootfs-20240625065519.swu
swupdate.sh[272]: [ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...
swupdate.sh[272]: [TRACE] : SWUPDATE running : [network_initializer] : Main thread sleep again !

On the slave device I see the following:
swupdate.sh[2123]: [ERROR] : SWUPDATE failed [0] ERROR mongoose_interface.c : ev_handler : 727 : 0x11 max_recv_buf_size reached
swupdate.sh[2123]: [ERROR] : SWUPDATE failed [0] ERROR mongoose_interface.c : ev_handler : 727 : 0xf socket error
```

The sw-description file has been extended as follows:
filename = "hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e.rootfs-20240625065519.swu";
sha256 = "$swupdate_get_sha256(hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e.rootfs-20240625065519.swu)";
type = "swuforward";
installed-directly = true;
properties: {
};

An independent test with CURL worked fine:
curl -F "file=@hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e-dirty.rootfs-20240627052920.swu" "http://192.168.251.113:9990/upload"
Content-Type: text/plain
Connection: close
Ok, hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e-dirty.rootfs-20240627052920.swu - 81 bytes.

Thank you for your help.

Best regards,
Michael

Stefano Babic

unread,
Jun 29, 2024, 6:26:55 AM (5 days ago) Jun 29
to Michael Häner, swupdate
Hi Michael,
It seems at first glance an issue inside mongoose code, and it cannot
recover. I am afraid that without debugging on the hw where it happens,
I cannot help more.

Best regards,
Stefano Babic

> The sw-description file has been extended as follows:
> filename =
> "hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e.rootfs-20240625065519.swu";
> sha256 =
> "$swupdate_get_sha256(hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e.rootfs-20240625065519.swu)";
> type = "swuforward";
> installed-directly = true;
> properties: {
> url = ["http://192.168.251.113:9990/upload"];
> };
>
> An independent test with CURL worked fine:
> curl -F
> "file=@hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e-dirty.rootfs-20240627052920.swu" "http://192.168.251.113:9990/upload"
> Content-Type: text/plain
> Connection: close
> Ok,
> hedge-image-esdk-cxg3-5.3.0-beta.7-89-gebc6676e7e-dirty.rootfs-20240627052920.swu - 81 bytes.
>
> Thank you for your help.
>
> Best regards,
> Michael
>
> --
> You received this message because you are subscribed to the Google
> Groups "swupdate" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to swupdate+u...@googlegroups.com
> <mailto:swupdate+u...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/swupdate/a661c681-6800-4ffd-9aa9-ad0d953ebd7fn%40googlegroups.com <https://groups.google.com/d/msgid/swupdate/a661c681-6800-4ffd-9aa9-ad0d953ebd7fn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages