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

Handle trailing slash in Mender client's server URL configuration

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 1.2.0, 1.3.0
    • Fix Version/s: 1.3.0, 1.2.3
    • Labels:

      Description

      When building with Yocto Project, if you set

      MENDER_SERVER_URL = "https://hosted.mender.io/"
      

      (note the trailing slash), the client will not be able to connect to the server, and fail with the following error messages:

      Nov 14 16:32:39 raspberrypi3 mender[270]: level=info msg="State transition: authorize [Sync] -> authorize-wait [Idle]" module=mender
      Nov 14 16:32:39 raspberrypi3 mender[270]: time="2017-11-14T16:32:39Z" level=error msg="authorize failed: transient error: authorization request failed: unexpected authorization status 404" module=state
      

      If you remove the trailing slash, to make it like this:

      MENDER_SERVER_URL = "https://hosted.mender.io"
      

      it works as expected.

      This is too fragile and will lead to many configuration and diagnostics issues.

      This YP variable is likely just copied directly into the client configuration, so the fix should go into the client.

      Acceptance criteria

      • The Mender client is able to connect to the server both if there is a trailing slash in the server URL and not

        Attachments

          Container Issues

            Issue Links

              Activity

                People

                • Assignee:
                  a10053 Marcin Pasinski
                  Reporter:
                  a10003 Eystein Maloy Stenberg
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Zendesk Support

                      Summary Panel