# Conflict Servers Array in mender.json with MENDER\_SERVER\_URL

**URL:** https://hub.mender.io/t/conflict-servers-array-in-mender-json-with-mender-server-url/2218
**Category:** General Discussions
**Tags:** yocto
**Created:** [July 22, 2020, 12:41pm UTC](https://hub.mender.io/t/conflict-servers-array-in-mender-json-with-mender-server-url/2218 "2020-07-22T12:41:51Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![clementp](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/clementp/32/1392_2.png) [@clementp](https://hub.mender.io/u/clementp)
#### Post date: [July 22, 2020, 12:41pm UTC](https://hub.mender.io/t/conflict-servers-array-in-mender-json-with-mender-server-url/2218/1 "2020-07-22T12:41:51Z")

</div>

Hi,

I’m building mender-client using Yocto and I would like to set 2 mender servers using the Servers array json:  
[https://docs.mender.io/2.4/client-configuration/configuration-file/configuration-options#servers](https://docs.mender.io/2.4/client-configuration/configuration-file/configuration-options#servers)

So i have specified a mender.conf in the SOURCE\_URI with the following conf:

> {  
> “Servers”: [{“ServerURL”: “[https://my-serverA.com](https://my-serverA.com)”}, {“ServerURL”: “[https://my-fallback.com](https://my-fallback.com)”}],  
> }

Unfortunately the MENDER\_SERVER\_URL is automatically set to a value:

> <https://github.com/mendersoftware/meta-mender/blob/master/meta-mender-core/recipes-mender/mender-client/mender-client.inc#L13>

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”: “[https://my-serverA.com](https://my-serverA.com)”}, {“ServerURL”: “[https://my-fallback.com](https://my-fallback.com)”}],  
> “ServerURL”: “[https://docker.mender.io](https://docker.mender.io)”  
> }

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,  
Clement

---

<div class="post-metadata">

### Author: ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)
#### Post date: [July 22, 2020, 2:46pm UTC](https://hub.mender.io/t/conflict-servers-array-in-mender-json-with-mender-server-url/2218/2 "2020-07-22T14:46:37Z")

</div>

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.

Drew
