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

Invalid server certificate cause Mender client to exit

    XMLWordPrintable

    Details

      Description

      I inadvertently neglected to install my custom server.crt file. This resulted in the Mender client exiting with the following log:

      Feb 18 22:19:56 raspberrypi3 systemd[1]: Started Mender OTA update service.
      Feb 18 22:19:56 raspberrypi3 mender[276]: time="2019-02-18T22:19:56Z" level=info msg="Configuration file does not exist: /var/lib/mender/mender.conf" module=config
      Feb 18 22:19:56 raspberrypi3 mender[276]: time="2019-02-18T22:19:56Z" level=info msg="Loaded configuration file: /etc/mender/mender.conf" module=config
      Feb 18 22:19:56 raspberrypi3 mender[276]: time="2019-02-18T22:19:56Z" level=info msg="Mender running on partition: /dev/mmcblk0p3" module=main
      Feb 18 22:19:57 raspberrypi3 mender[276]: time="2019-02-18T22:19:57Z" level=error msg="/etc/mender/server.crt is inaccessible: open /etc/mender/server.crt: no such file or directory" module=client
      Feb 18 22:19:57 raspberrypi3 mender[276]: time="2019-02-18T22:19:57Z" level=error msg="error initializing mender controller: error creating HTTP client: cannot initialize server trust: open /etc/mender/server.crt: no such file or directory" module=main
      Feb 18 22:19:57 raspberrypi3 systemd[1]: mender.service: Main process exited, code=exited, status=1/FAILURE
      Feb 18 22:19:57 raspberrypi3 systemd[1]: mender.service: Failed with result 'exit-code'.

      In this case, rollback is not performed.  The Mender client should not exit on error here, but rather do rollback, assuming we are in an OTA update.

      Acceptance criteria

      • When booting after an OTA update, the Mender client should roll back, not exit, upon Mender configuration errors

        Attachments

          Activity

            People

            • Assignee:
              oleorhagen Ole Petter Orhagen
              Reporter:
              drewmoseley Drew Moseley
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Summary Panel