Uploaded image for project: 'Mender'
  1. Mender
  2. MEN-4694

[mender-connect] Reconnection not happening until a new event is received over D-Bus

    XMLWordPrintable

    Details

    • Days in progress:
      0

      Description

      If the websocket connections terminates (e.g. deviceconnect gets restarted), mender-connect won't reestablish the connection until a new event is received over the D-Bus channel.

      Latest logs from mender-connect:

      May 12 22:11:01 raspberrypi mender-connect[454]: time="2021-05-12T22:11:01+02:00" level=error msg="messageLoop: error on readMessage: websocket: close 1006 (abnormal closure): unexpected EOF; disconnecting, waiting for reconnect."
      May 12 22:11:16 raspberrypi mender-connect[454]: time="2021-05-12T22:11:16+02:00" level=warning msg="The server certificate cannot be loaded: no file provided"
      May 12 22:11:43 raspberrypi mender-connect[454]: time="2021-05-12T22:11:43+02:00" level=error msg="messageLoop: error on readMessage: websocket: close 1006 (abnormal closure): unexpected EOF; disconnecting, waiting for reconnect."
      May 12 22:11:59 raspberrypi mender-connect[454]: time="2021-05-12T22:11:59+02:00" level=warning msg="The server certificate cannot be loaded: no file provided"
      

      Reason is here:

      • We send a reconnection event on a channel here, from the main message loop.
      • This message will make needsReconnect to return true once (see here)]
      • needsReconnect is evaluated only if a new JWT token state change is received from dbus, though (see here)]

      We should change the logic here to handle the reconnection request even if there is no new JWT token from the Mender client.

        Attachments

          Activity

            People

            • Assignee:
              merlin Peter Grzybowski
              Reporter:
              tranchitella Fabio Tranchitella
            • Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Zendesk Support