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

Get started on Windows

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Open
    • Priority: (None)
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
    • Days in progress:
      0

      Description

      From a user who was successfull in running our Get Started guide on Windows using a virtual device.

      I got it to work, but you might want to update your instructions a bit, please read this:

      how I do it:
      mostly like you say here: https://hosted.mender.io/ui/#/help/application-updates/demo-virtual-device
      I have also looked at the video
      https://youtu.be/Y0BwZv1aZR0

      • I am using Docker for Windows.
      • I am starting the docker container from the Windows command line.

      I realised that I have to do some things differently

      You say to do

      TENANT_TOKEN='eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZW5kZXIudGVuYW50IjoiNWZiMWY3NjUxNmE2YjllOTU2YmJhNjMwIiwiaXNzIjoiTWVuZGVyIiwic3ViIjoiNWZiMWY3NjUxNmE2YjllOTU2YmJhNjMwIn0.WirAS1A8EkKyELzJ-QyRyGtFpnyo517D7LXKyBYitfZxxAlPp08vih0HnL12q5YG7_yjpw1TWkF2RqGfMIZWZpnqr_PYDgpt8Gog3ypbz5sS7vFVy89kxydVFRp5lT7Smzs5RRNWzhBWTXKgdAC3UxdtSRpu-2K3bT20iWK_OmxzzYQPKvNaww3SZp3eV6qm6LybSULaXPo3P0cqNXnszHt0L-PfEn_cbZjZOzNTuByPFhQxEYMusMenspHntzNEM4ju3VU96w-MPBOkIKJ0eq7DhrjLb3boW8lyRc2Pj_5AfNT7KjDfE6wEoGvwRHz_AcyZ6RxAcr9UkWMKeHjzEwdFcuCLiaA6jV7F1kQ8-ckTEjmMhJiRb4Zagvsgya7rQtD05IDQy0eb4sAZg0AN6SIWdpyBInCdYJxg9KIR7Y5nNRq_btkBatnOg6i5TvuJEj_fG1LZdO-nZGtUcwMLko6Qf7taAXUfDD-FTUGqbJkXKns1ypWYCenwi0TZjHEO'

      I have to do

      set TENANT_TOKEN=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJtZW5kZXIudGVuYW50IjoiNWZiMWY3NjUxNmE2YjllOTU2YmJhNjMwIiwiaXNzIjoiTWVuZGVyIiwic3ViIjoiNWZiMWY3NjUxNmE2YjllOTU2YmJhNjMwIn0.WirAS1A8EkKyELzJ-QyRyGtFpnyo517D7LXKyBYitfZxxAlPp08vih0HnL12q5YG7_yjpw1TWkF2RqGfMIZWZpnqr_PYDgpt8Gog3ypbz5sS7vFVy89kxydVFRp5lT7Smzs5RRNWzhBWTXKgdAC3UxdtSRpu-2K3bT20iWK_OmxzzYQPKvNaww3SZp3eV6qm6LybSULaXPo3P0cqNXnszHt0L-PfEn_cbZjZOzNTuByPFhQxEYMusMenspHntzNEM4ju3VU96w-MPBOkIKJ0eq7DhrjLb3boW8lyRc2Pj_5AfNT7KjDfE6wEoGvwRHz_AcyZ6RxAcr9UkWMKeHjzEwdFcuCLiaA6jV7F1kQ8-ckTEjmMhJiRb4Zagvsgya7rQtD05IDQy0eb4sAZg0AN6SIWdpyBInCdYJxg9KIR7Y5nNRq_btkBatnOg6i5TvuJEj_fG1LZdO-nZGtUcwMLko6Qf7taAXUfDD-FTUGqbJkXKns1ypWYCenwi0TZjHEO
      (without the single quotes)

      you then say to do

      docker run -it -e SERVER_URL='https://hosted.mender.io' -e TENANT_TOKEN=$TENANT_TOKEN mendersoftware/mender-client-qemu:latest

      In a Windows command prompt, I have to do

      docker run -it -e SERVER_URL='https://hosted.mender.io' -e TENANT_TOKEN=%TENANT_TOKEN% mendersoftware/mender-client-qemu:latest

      When the container is up, I log in as root. You say to do

      journalctl -u mender --follow

      but apparently the client actually writes a different log, because I have to do

      journalctl -u mender-client --follow

      Then in the log, I see this:

      Nov 16 22:39:08 qemux86-64 mender[242]: time="2020-11-16T22:39:08Z" level=error msg="Failure occurred while executing authorization request: &url.Error

      Unknown macro: {Op}

      "
      Nov 16 22:39:08 qemux86-64 mender[242]: time="2020-11-16T22:39:08Z" level=error msg="Authorization request error: dial tcp: lookup 'https: no such host"

      i.e., it uses the commandline URL 'https://hosted.mender.io' to concatenate "https://'https//hosted.mender.io'/api/devices/v1/authentication/auth_requests\" which is of course nonsensical,

      so I kill the container instance and instead give the bare server address as parameter, not the URL

      docker run -it -e SERVER_URL=hosted.mender.io -e TENANT_TOKEN=%TENANT_TOKEN% mendersoftware/mender-client-qemu:latest

      Then the journal entries periodically say:
      Nov 16 22:49:24 qemux86-64 mender[246]: time="2020-11-16T22:49:24Z" level=error msg="Authorize failed: transient error: authorization request failed: (request_id: ): authentication request rejected server error message: Unauthorized"

      At this point, the device actually shows up in my dashboard and can be authorised.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mirzak Mirza Krak
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:

                Summary Panel