Unauthorized response on first device setup

Hi guys,

I’m trying to connect my first device on menderhub.
I’m starting with a default raspbian-lite version converted with “mender-convert” but i receive

DEBU[0000] making an authorization request () to server https://hosted.mender.io  module=client_auth
DEBU[0001] got response: &{401 Unauthorized 401 HTTP/1.1 1 1 map[X-Men-Requestid:[814bf1b6-3ee1-456f-8ab8-7eca194a0e70] Content-Security-Policy:[default-src https: data: 'unsafe-inline' 'unsafe-eval'] Content-Type:[application/json; charset=utf-8] X-Authentication-Version:[unknown] Strict-Transport-Security:[max-age=31536000; includeSubdomains] Server:[openresty/1.13.6.2] Date:[Mon, 18 Nov 2019 16:24:32 GMT] Connection:[keep-alive] X-Xss-Protection:[1; mode=block] X-Content-Type-Options:[nosniff] Vary:[Accept-Encoding] Access-Control-Allow-Origin:[*] X-Frame-Options:[SAMEORIGIN]] 0x2354080 -1 [] false true map[] 0x2080980 0x209c6c0}  module=client_auth
ERRO[0001] authorize failed: transient error: authorization request failed: (request_id: ): authentication request rejected server error message: Unauthorized  module=state

Any idea?

Hi @Silverkron, welcome to Mender Hub. Hopefully we can help you with your Mender installation.

This is expected behavior as the server does not know your device yet. If you log into the web interface of the server, then you will see a device in the “pending” state with a button to allow the device into your fleet. Once you accept the device, then it will be part of the fleet and can upload its inventory, receive, updates, etc.
Drew

Hi @drewmoseley,

thanks for the feedback. Unfortunately I have no pending device :confused:

I replaced the “TenantToken” (i hoped that it was wrong) but i receive the same result

It works!

“mender-convert” tool formatted the “TenantToken” with single quotes. I removed these to fix it.

Excellent. Thanks for letting us know.
And I think the root cause has also been fixed upstream.