Mender convert image not connecting to Mender host

Hi there,

I am using mender convert on a RPI0w image. And on booting it doesn’t successfully connect to mender host or show up as a “pending” device.

mender-client journal gives the below output, additionally, the mender.conf files seems to be empty. From what I understand, the host url should be in this file, but it is not. Any idea what could be causing that?

Dec 21 21:16:39 raspberrypi mender[562]: time=“2020-12-21T21:16:39Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]”
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:16:40 raspberrypi mender[562]: time=“2020-12-21T21:16:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:21:39 raspberrypi mender[562]: time=“2020-12-21T21:21:39Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]”
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:21:40 raspberrypi mender[562]: time=“2020-12-21T21:21:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:26:39 raspberrypi mender[562]: time=“2020-12-21T21:26:39Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]”
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:26:40 raspberrypi mender[562]: time=“2020-12-21T21:26:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:31:39 raspberrypi mender[562]: time=“2020-12-21T21:31:39Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]”
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:31:40 raspberrypi mender[562]: time=“2020-12-21T21:31:40Z” level=warning msg=“RetryPollIntervalSeconds is not defined”
Dec 21 21:36:39 raspberrypi mender[562]: time=“2020-12-21T21:36:39Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]”
Dec 21 21:36:40 raspberrypi mender[562]: time=“2020-12-21T21:36:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:36:40 raspberrypi mender[562]: time=“2020-12-21T21:36:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:"https:///api/devices/v1/authenticati
Dec 21 21:36:40 raspberrypi mender[562]: time=“2020-12-21T21:36:40Z” level=error msg=“Authorization request error: http: no Host in request URL”
Dec 21 21:36:40 raspberrypi mender[562]: time=“2020-12-21T21:36:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization requ
Dec 21 21:36:40 raspberrypi mender[562]: time=“2020-12-21T21:36:40Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”

I would check your mender convert configuration as your Mender host Url is missing the hostname

Thanks for responding so quickly. My mender convert config file that I am using is below. I tried it both with and without the MENDER_SERVER_URL variable set. My

RASPBERRYPI_CONFIG=“raspberrypi0w”*
RASPBERRYPI_KERNEL_IMAGE=“kernel.img”*
MENDER_KERNEL_IMAGETYPE=zImage*
MENDER_DEVICE_TYPE=“raspberrypi0w”*
MENDER_STORAGE_TOTAL_SIZE_MB=16000*
MENDER_SERVER_URL=https://hosted.mender.io*

source configs/raspberrypi_config

My mender.conf file in the device iteslf only has the following inside:

{
“RootfsPartA”: “/dev/mmcblk0p2”,
“RootfsPartB”: “/dev/mmcvlk0p3”
}

It seems to me that this should have much more, including the mender host url. Any idea why this is not being generated/how to fix?

And I am using the following commands for the convert:

./scripts/bootstrap-rootfs-overlay-hosted-server.sh
–output-dir ${PWD}/deploy
–tenant-token token here

MENDER_ARTIFACT_NAME=host-fixed ./docker-mender-convert \
--disk-image input/menderize_image.img \
--config configs/raspberrypi0w_config \

wrap quotes around the url, and why are they stars at the end of your key value pairs? if these are actually in your config file and not just an artifact of creating the forum posting then i believe they will be interpreted as glob patterns when the config file is source’d

Yep, the stars were just an artifact of posting, they are not in the config file. I retried the conversion with quotes around the host url and got the same result unfortunately.

Am I potentially using the wrong command when setting the parameters?

./scripts/bootstrap-rootfs-overlay-hosted-server.sh

This is what was in the documentation, but I think I don’t have a good grasp of what it does. Should this be modified.

Beyond that, any thoughts about what could be happening? It’s very strange. Are there maybe two different config files I need to modify?

looks like MENDER_SERVER_URL isnt a supported variable with mender convert, take a look at the docs as it look like you need to create a custom rootfs overlay using the scripts supplied in the scripts folder in mender-convert folder to configure the mender client.