No progress bar and no messages in web interface

66 views
Skip to first unread message

Massimo Tosa

unread,
Sep 3, 2025, 3:47:17 AMSep 3
to swupdate
Hi everybody,

while performing an update neither a progress bar nor any message in the web gui is shown. The update is anyway successfull.
I can even successfully connect a websocket with wscat but also there no message is shown. That's why I guess it is not a problem with the websocket but rather ist the handler not emitting any message.

Attached are the Yocto defconfig, swupdate.cfg and sw-description.

I already found the following posts in the group but they are not helpful for me:


SWUpdate v2025.05.0
Mongoose v7.17

Kind regards

Massimo Tosa
sw-description
swupdate.cfg
defconfig

Stefano Babic

unread,
Sep 3, 2025, 4:08:48 AMSep 3
to Massimo Tosa, swupdate
Hi Massimo,

On 03.09.25 09:47, Massimo Tosa wrote:
> Hi everybody,
>
> while performing an update neither a progress bar nor any message in the
> web gui is shown. The update is anyway successfull.
> I can even successfully connect a websocket with wscat but also there no
> message is shown. That's why I guess it is not a problem with the
> websocket but rather ist the handler not emitting any message.
>

Can you start swupdate-progress in a console and see if messages are
received ? Can you also try to reset the socket path to their default,
that is
CONFIG_SOCKET_CTRL_PATH=""
CONFIG_SOCKET_PROGRESS_PATH=""


> Attached are the Yocto defconfig, swupdate.cfg and sw-description.
>
> I already found the following posts in the group but they are not
> helpful for me:
>
> SWUpdate <https://groups.google.com/g/swupdate/c/ZoXa5j_eNYg/m/IBaAUqmqAgAJ>
> No messages in web interface <https://groups.google.com/g/swupdate/
> c/7ru3qUvjDvg/m/diRB1dkYAwAJ>
>
> SWUpdate v2025.05.0
> Mongoose v7.17
>

This version is proven to work, so it should be something else.

Best regards,
Stefano Babic

Massimo Tosa

unread,
Sep 4, 2025, 3:41:06 AMSep 4
to swupdate
Hi Stefano,

I've reset the socket path to their default but still no messages on web interface and websocket.
swupdate-progress shows instead some messages:

Update started !
Interface: WEBSERVER

INFO : file8.swu
INFO : {"0": {"VERSION" : "99.99"}}
[ ============================================================ ] 1 of 13 100% (helpers.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 2 of 13 100% (update-tom-linux.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 3 of 13 100% (update-tom-app.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 4 of 13 100% (update-tom-partitions.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 5 of 13 100% (rootfs-tom.ext4.gz.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 6 of 13 100% (app-TomMain.tar.gz.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 7 of 13 100% (helpers.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 8 of 13 100% (update-tom-linux.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 9 of 13 100% (update-tom-app.sh.enc), dwl 100% of 339559424 bytes
[ ============================================================ ] 10 of 13 100% (update-tom-partitions.sh.enc), dwl 100% of 339559424 bytes
SUCCESS !

DONE.

Best regards

Massimo Tosa

Stefano Babic

unread,
Sep 4, 2025, 4:02:06 AMSep 4
to Massimo Tosa, swupdate
Hi Massimo,
That means: SWUpdate is emitting messages and they are sent to the
listeners, including the web servers. You have then to dig why the web
sockets connection is not working on your device.

Best regards,
Stefano Babic

> Best regards
>
> Massimo Tosa
>
>
> On Wednesday, 3 September 2025 at 10:08:48 UTC+2 Stefano Babic wrote:
>
> Hi Massimo,
>
> On 03.09.25 09:47, Massimo Tosa wrote:
> > Hi everybody,
> >
> > while performing an update neither a progress bar nor any message
> in the
> > web gui is shown. The update is anyway successfull.
> > I can even successfully connect a websocket with wscat but also
> there no
> > message is shown. That's why I guess it is not a problem with the
> > websocket but rather ist the handler not emitting any message.
> >
>
> Can you start swupdate-progress in a console and see if messages are
> received ? Can you also try to reset the socket path to their default,
> that is
> CONFIG_SOCKET_CTRL_PATH=""
> CONFIG_SOCKET_PROGRESS_PATH=""
>
>
> > Attached are the Yocto defconfig, swupdate.cfg and sw-description.
> >
> > I already found the following posts in the group but they are not
> > helpful for me:
> >
> > SWUpdate <https://groups.google.com/g/swupdate/c/ZoXa5j_eNYg/m/
> IBaAUqmqAgAJ <https://groups.google.com/g/swupdate/c/ZoXa5j_eNYg/m/
> IBaAUqmqAgAJ>>
> > No messages in web interface <https://groups.google.com/g/
> swupdate/ <https://groups.google.com/g/swupdate/>
> > c/7ru3qUvjDvg/m/diRB1dkYAwAJ>
> >
> > SWUpdate v2025.05.0
> > Mongoose v7.17
> >
>
> This version is proven to work, so it should be something else.
>
> Best regards,
> Stefano Babic
>
> --
> 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 visit https://groups.google.com/d/msgid/
> swupdate/90f4e21e-073e-4163-b76b-47f2547c0cc0n%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/90f4e21e-073e-4163-
> b76b-47f2547c0cc0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Massimo Tosa

unread,
Sep 4, 2025, 4:36:08 AMSep 4
to swupdate
Hi Stefano,

I will have a look in that direction.
Thank you.

Best regards

Massimo Tosa

Massimo Tosa

unread,
Sep 15, 2025, 12:20:41 AMSep 15
to swupdate
Hi Stefano,

I had a look into the Mongoose code. Mongoose is receiving the messages from the /tmp/swupdateprog socket. The websocket connections with the clients (web interface and wscat in my case) are established and I can send messages from wscat to Mongoose (I added a printf to log incoming messages).
I guess that the reason why no message is sent from Mongoose is because no event MG_EV_WAKEUP is received by ev_handler().

I changed the broadcast() function in mongoose_interface.c to trigger MG_EV_WAKEUP events for every websocket connection in the following way:

mg_wakeup(conn_info.mgr, conn_info.id, str, strlen(str));
struct mg_str data;
data.buf = str;
data.len = strlen(str);
struct mg_connection *t;
for (t = conn_info.mgr->conns; t != NULL; t = t->next) {
  if(t->is_websocket)
  {
    mg_call(t, MG_EV_WAKEUP, &data);
  }
}

In this way it is working but does not look like an elegant solution.

Now I am a bit puzzled. The weksockets are working, the unix sockets as well. It looks like a bug in Mongoose but cannot be that such a big issue passed unobserved for such a long time. I am missing something.
What could be the reason that prevents MG_EV_WAKEUP events to be triggered?

SWUpdate v2025.05

Best regards

Massimo Tosa

Michael Glembotzki

unread,
Sep 15, 2025, 5:21:45 AMSep 15
to swupdate
Hi Massimo,

the MG_EV_WAKEUP is triggered internally from within mongoose.
Checking the code [1], can you double check there is no error during socketpair creation?
Please ensure that both mg_socketpair and mg_wrapfd succeed.

Best regards,
Michael


[1]
bool mg_wakeup_init(struct mg_mgr *mgr) {
  bool ok = false;
  if (mgr->pipe == MG_INVALID_SOCKET) {
    union usa usa[2];
    MG_SOCKET_TYPE sp[2] = {MG_INVALID_SOCKET, MG_INVALID_SOCKET};
    struct mg_connection *c = NULL;
    if (!mg_socketpair(sp, usa)) {
      MG_ERROR(("Cannot create socket pair"));
    } else if ((c = mg_wrapfd(mgr, (int) sp[1], wufn, NULL)) == NULL) {
      closesocket(sp[0]);
      closesocket(sp[1]);
      sp[0] = sp[1] = MG_INVALID_SOCKET;
    } else {
      tomgaddr(&usa[0], &c->rem, false);
      MG_DEBUG(("%lu %p pipe %lu", c->id, c->fd, (unsigned long) sp[0]));
      mgr->pipe = sp[0];
      ok = true;
    }
  }
  return ok;
}

Stefano Babic

unread,
Sep 15, 2025, 5:24:29 AMSep 15
to Massimo Tosa, swupdate
Hi Massimo,

On 9/15/25 06:20, Massimo Tosa wrote:
> Hi Stefano,
>
> I had a look into the Mongoose code. Mongoose is receiving the messages
> from the /tmp/swupdateprog socket. The websocket connections with the
> clients (web interface and wscat in my case) are established and I can
> send messages from wscat to Mongoose (I added a printf to log incoming
> messages).
> I guess that the reason why no message is sent from Mongoose is because
> no event MG_EV_WAKEUP is received by ev_handler().
>

Everything is working, you can even test it on your PC.

> I changed the broadcast() function in mongoose_interface.c to trigger
> MG_EV_WAKEUP events for every websocket connection in the following way:
>

Is it not that your are starting swupdate twice, maybe running "-i"
together with the daemon ? Last instance overwrites the so0ckets.

Best regards,
Stefano Babic
> ZoXa5j_eNYg/m/ <https://groups.google.com/g/swupdate/c/
> ZoXa5j_eNYg/m/>
> > IBaAUqmqAgAJ <https://groups.google.com/g/swupdate/c/
> ZoXa5j_eNYg/m/ <https://groups.google.com/g/swupdate/c/
> ZoXa5j_eNYg/m/>
> > IBaAUqmqAgAJ>>
> > > No messages in web interface <https://groups.google.com/g/
> <https://groups.google.com/g/>
> > swupdate/ <https://groups.google.com/g/swupdate/ <https://
> groups.google.com/g/swupdate/>>
> > > c/7ru3qUvjDvg/m/diRB1dkYAwAJ>
> > >
> > > SWUpdate v2025.05.0
> > > Mongoose v7.17
> > >
> >
> > This version is proven to work, so it should be something else.
> >
> > Best regards,
> > Stefano Babic
> >
> > --
> > 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 visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> > swupdate/90f4e21e-073e-4163-
> b76b-47f2547c0cc0n%40googlegroups.com <http://40googlegroups.com>
> > <https://groups.google.com/d/msgid/
> swupdate/90f4e21e-073e-4163- <https://groups.google.com/d/msgid/
> swupdate/90f4e21e-073e-4163->
> > b76b-47f2547c0cc0n%40googlegroups.com?
> utm_medium=email&utm_source=footer <http://40googlegroups.com?
> utm_medium=email&utm_source=footer>>.
>
> --
> 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 visit https://groups.google.com/d/msgid/
> swupdate/75f32bfa-7c40-4766-8f6d-46dbe4916b08n%40googlegroups.com
> <https://groups.google.com/d/msgid/
> swupdate/75f32bfa-7c40-4766-8f6d-46dbe4916b08n%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Massimo Tosa

unread,
Sep 15, 2025, 7:16:06 AMSep 15
to swupdate
Hi Michael,

I confirm that both mg_socketpair and mg_wrapfd succeed. The "else" part of the "if statement" in mg_wakeup_init() is executed. sp[0] and sp[1] have both a valid file descriptor.
Anyway when the mg_wakeup is called I notice that the send function half of the times returns an ECONNREFUSED error.

Best regards

Massimo

Massimo Tosa

unread,
Sep 15, 2025, 7:16:40 AMSep 15
to swupdate
Hi Stefano,

I'm starting swupdate manually with the following command:

swupdate -f /etc/swupdate/swupdate.cfg -w ""

I intentionally deactivated the systemd service to see the output logs.

With "ps" I can see two processes named swupdate with different pid. I thought of a fork within swupdate because if I kill one, both of them disappear.

I confirm that I have the same problem even with older swupdate versions on my target machine while on my pc the issue does not persist. So it has to be due to the machine itself.
Firewall is deactivated. Loopback address is available.

Best regards

Massimo

Stefano Babic

unread,
Sep 15, 2025, 8:08:02 AMSep 15
to Massimo Tosa, swupdate
Hi Massimo,

On 9/15/25 13:16, Massimo Tosa wrote:
> Hi Stefano,
>
> I'm starting swupdate manually with the following command:
>
> swupdate -f /etc/swupdate/swupdate.cfg -w ""
>
> I intentionally deactivated the systemd service to see the output logs.
>
> With "ps" I can see two processes named swupdate with different pid. I
> thought of a fork within swupdate because if I kill one, both of them
> disappear.
>
> I confirm that I have the same problem even with older swupdate versions
> on my target machine while on my pc the issue does not persist. So it
> has to be due to the machine itself.
> Firewall is deactivated. Loopback address is available.

Someone is destroying the sockets, it sould be also systemd because it
doesn't control the service. Move the sockets inot /run, and test again.

Best regards,
Stefano
> > mg_wakeup(conn_info.mgr, conn_info.id <http://conn_info.id>, str,
> > > > SWUpdate <https://groups.google.com/g/swupdate/c/ <https://
> groups.google.com/g/swupdate/c/>
> > ZoXa5j_eNYg/m/ <https://groups.google.com/g/swupdate/c/ <https://
> groups.google.com/g/swupdate/c/>
> > ZoXa5j_eNYg/m/>
> > > IBaAUqmqAgAJ <https://groups.google.com/g/swupdate/c/ <https://
> groups.google.com/g/swupdate/c/>
> > ZoXa5j_eNYg/m/ <https://groups.google.com/g/swupdate/c/ <https://
> groups.google.com/g/swupdate/c/>
> > ZoXa5j_eNYg/m/>
> > > IBaAUqmqAgAJ>>
> > > > No messages in web interface <https://groups.google.com/g/
> <https://groups.google.com/g/>
> > <https://groups.google.com/g/ <https://groups.google.com/g/>>
> > > swupdate/ <https://groups.google.com/g/swupdate/ <https://
> groups.google.com/g/swupdate/> <https://
> > groups.google.com/g/swupdate/ <http://groups.google.com/g/
> swupdate/>>>
> > > > c/7ru3qUvjDvg/m/diRB1dkYAwAJ>
> > > >
> > > > SWUpdate v2025.05.0
> > > > Mongoose v7.17
> > > >
> > >
> > > This version is proven to work, so it should be something else.
> > >
> > > Best regards,
> > > Stefano Babic
> > >
> > > --
> > > 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 visit https://groups.google.com/d/
> <https://groups.google.com/d/>
> > msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/>>
> > > swupdate/90f4e21e-073e-4163-
> > b76b-47f2547c0cc0n%40googlegroups.com <http://40googlegroups.com>
> <http://40googlegroups.com <http://40googlegroups.com>>
> > swupdate/90f4e21e-073e-4163- <https://groups.google.com/d/msgid/
> <https://groups.google.com/d/msgid/>
> > swupdate/90f4e21e-073e-4163->
> > > b76b-47f2547c0cc0n%40googlegroups.com <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer <http://40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>>.
> >
> > --
> > 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 visit https://groups.google.com/d/msgid/
> <https://groups.google.com/d/msgid/>
> > swupdate/75f32bfa-7c40-4766-8f6d-46dbe4916b08n%40googlegroups.com
> <http://40googlegroups.com>
> > <https://groups.google.com/d/msgid/ <https://groups.google.com/d/
> msgid/>
> > swupdate/75f32bfa-7c40-4766-8f6d-46dbe4916b08n%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> 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 visit https://groups.google.com/d/msgid/
> swupdate/e62b5187-3e04-42f8-98d6-232e9cb42a0cn%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/
> e62b5187-3e04-42f8-98d6-232e9cb42a0cn%40googlegroups.com?
> utm_medium=email&utm_source=footer>.

Massimo Tosa

unread,
Sep 19, 2025, 5:33:49 AMSep 19
to swupdate
Hi everybody,

FYI: as expected the issue was due to a setting of my network structure that prevented the transmission of data between the wakeup sockets.
No change in swupdate has been necessary.

Thanks all for the support.

Best regards

Massimo 

Stefano Babic

unread,
Sep 19, 2025, 5:38:35 AMSep 19
to Massimo Tosa, swupdate
Hi Massimo,

n 9/19/25 11:33, Massimo Tosa wrote:
> Hi everybody,
>
> FYI: as expected the issue was due to a setting of my network structure
> that prevented the transmission of data between the wakeup sockets.

There was no doubt...:-D

> No change in swupdate has been necessary.
>
> Thanks all for the support.
>

> <http://conn_info.id <http://conn_info.id>>, str,
> groups.google.com/g/swupdate/c/> <https://
> > groups.google.com/g/swupdate/c/ <http://groups.google.com/g/
> swupdate/c/>>
> > > ZoXa5j_eNYg/m/ <https://groups.google.com/g/swupdate/c/
> <https://groups.google.com/g/swupdate/c/> <https://
> > groups.google.com/g/swupdate/c/ <http://groups.google.com/g/
> swupdate/c/>>
> > > ZoXa5j_eNYg/m/>
> > > > IBaAUqmqAgAJ <https://groups.google.com/g/swupdate/c/
> <https://groups.google.com/g/swupdate/c/> <https://
> > groups.google.com/g/swupdate/c/ <http://groups.google.com/g/
> swupdate/c/>>
> > > ZoXa5j_eNYg/m/ <https://groups.google.com/g/swupdate/c/
> <https://groups.google.com/g/swupdate/c/> <https://
> > groups.google.com/g/swupdate/c/ <http://groups.google.com/g/
> swupdate/> <http://groups.google.com/g/ <http://groups.google.com/g/>
> > swupdate/>>>
> > > > > c/7ru3qUvjDvg/m/diRB1dkYAwAJ>
> > > > >
> > > > > SWUpdate v2025.05.0
> > > > > Mongoose v7.17
> > > > >
> > > >
> > > > This version is proven to work, so it should be something else.
> > > >
> > > > Best regards,
> > > > Stefano Babic
> > > >
> > > > --
> > > > 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 visit https://groups.google.com/d/
> <https://groups.google.com/d/>
> > <https://groups.google.com/d/ <https://groups.google.com/d/>>
> > > msgid/ <https://groups.google.com/d/msgid/ <https://
> groups.google.com/d/msgid/> <https://
> > groups.google.com/d/msgid/ <http://groups.google.com/d/msgid/>>>
> > > > swupdate/90f4e21e-073e-4163-
> > > b76b-47f2547c0cc0n%40googlegroups.com
> <http://40googlegroups.com> <http://40googlegroups.com
> <http://40googlegroups.com>>
> > <http://40googlegroups.com <http://40googlegroups.com>
> groups.google.com/d/msgid/> <https://groups.google.com/ <https://
> groups.google.com/>
> > d/msgid/>
> > > swupdate/90f4e21e-073e-4163- <https://groups.google.com/d/
> <http://40googlegroups.com>>?
> > > utm_medium=email&utm_source=footer <http://40googlegroups.com
> <http://40googlegroups.com>
> > <http://40googlegroups.com <http://40googlegroups.com>>?
> > > utm_medium=email&utm_source=footer>>.
> > >
> > > --
> > > 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 visit https://groups.google.com/d/
> msgid/ <https://groups.google.com/d/msgid/>
> > <https://groups.google.com/d/msgid/ <https://groups.google.com/d/
> msgid/>>
> > >
> swupdate/75f32bfa-7c40-4766-8f6d-46dbe4916b08n%40googlegroups.com
> <http://40googlegroups.com>
> d/msgid/> <https://groups.google.com/d/ <https://groups.google.com/d/>
> > msgid/>
> > >
> swupdate/75f32bfa-7c40-4766-8f6d-46dbe4916b08n%40googlegroups.com
> <http://40googlegroups.com>
> > <http://40googlegroups.com <http://40googlegroups.com>>?
> > > utm_medium=email&utm_source=footer>.
> >
> > --
> > 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 visit https://groups.google.com/d/msgid/
> <https://groups.google.com/d/msgid/>
> > swupdate/e62b5187-3e04-42f8-98d6-232e9cb42a0cn%40googlegroups.com
> <http://40googlegroups.com>
> > <https://groups.google.com/d/msgid/swupdate/ <https://
> groups.google.com/d/msgid/swupdate/>
> > e62b5187-3e04-42f8-98d6-232e9cb42a0cn%40googlegroups.com
> <http://40googlegroups.com>?
> > utm_medium=email&utm_source=footer>.
>
> --
> 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 visit https://groups.google.com/d/msgid/
> swupdate/eee02e28-8bd0-4d26-b663-0ddaf09e4852n%40googlegroups.com
> <https://groups.google.com/d/msgid/swupdate/eee02e28-8bd0-4d26-
> b663-0ddaf09e4852n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Reply all
Reply to author
Forward
0 new messages