Conflict Servers Array in mender.json with MENDER_SERVER_URL


I’m building mender-client using Yocto and I would like to set 2 mender servers using the Servers array json:

So i have specified a mender.conf in the SOURCE_URI with the following conf:

“Servers”: [{“ServerURL”: “”}, {“ServerURL”: “”}],

Unfortunately the MENDER_SERVER_URL is automatically set to a value:

As said in the recipe:

# If a mender.conf has been provided in SRC_URI, merge this with the
# settings we generate. The settings specified by variables take precedence.

So the mender.conf output will look like this :

“UpdatePollIntervalSeconds”: 1800,
“InventoryPollIntervalSeconds”: 28800,
“Servers”: [{“ServerURL”: “”}, {“ServerURL”: “”}],
“ServerURL”: “

Which will result in an ERROR as it’s forbidden to specify both Servers and ServerURL.
Is there a way to avoid setting the ServerURL in the Yocto Mender recipe ?

Thanks for your help,

Hi @clementp, I think you can just set MENDER_SERVER_URL to “” in your local.conf file and then add the multiple servers with your custom conf file.