# Mender client testing on solidrun with Mender demo server

**URL:** <https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505>\
**Category:** General Discussions\
**Created:** [April 26, 2019, 10:00am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505 "2019-04-26T10:00:18Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 26, 2019, 10:00am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/1 "2019-04-26T10:00:18Z")

</div>

Hi,  
Mender client throwing following errors on my device…

```auto
root@solidrun-imx6:~# cat /var/log/kern.log | grep mender
Apr 26 09:32:26 solidrun-imx6 mender[454]: level=info msg="Configuration file does not exist: /var/lib/mender/mender.conf" module=config  
Apr 26 09:32:26 solidrun-imx6 mender[454]: level=info msg="Loaded configuration file: /etc/mender/mender.conf" module=config  
Apr 26 09:32:26 solidrun-imx6 mender[454]: level=info msg="Mender running on partition: /dev/mmcblk0p2" module=main  
Apr 26 09:32:27 solidrun-imx6 mender[454]: level=info msg="API Gateway certificate (in PEM format): \n-----BEGIN CERTIFICATE-----\nMIIFwjCCA6qgAwIBAgIJAM12YhUgT0yJMA0GCSqGSIb3DQEBCwUAMHYxCzAJBgNV\nBAYTAklOMQswCQYDVQQIDAJUUzEMMAoGA1UEBwwDSFlEMQ0wCwYDVQQKDARESUdJ\nMQwwCgYDVQQLDANJT1QxEzARBgNVBAMMCmxlc2hhbi5jb20xGjAYBgkqhkiG9w0B\nCQEWC3JhbUB0Y3MuY29tMB4XDTE5MDIyMjA2MTY1N1oXDTIwMDIyMjA2MTY1N1ow\ndjELMAkGA1UEBhMCSU4xCzAJBgNVBAgMAlRTMQwwCgYDVQQHDANIWUQxDTALBgNV\nBAoMBERJR0kxDDAKBgNVBAsMA0lPVDETMBEGA1UEAwwKbGVzaGFuLmNvbTEaMBgG\nCSqGSIb3DQEJARYLcmFtQHRjcy5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAw\nggIKAoICAQDbX01+Y+7e0SdZVlXAAQQ1ChBhe0XUcB6Kht4nqWMtx9pwJ98gRbRP\n0uieyEnA96DlTYp5ntnBWGb9Zcp/0IuKK7TGXhXZtoaedLaSEhxiq7F5QbW3WJuf\nkuo7yDXpxhw4zmjm1RlDW7BLlSGhDR+fFeRGE/diu0h8vc/eFDkL38PspVKvxLiS\n7VyVuikdQ1WSDEbOFhN92BOQ4dnSuhVBQLEtp8p74S5MS3QVpjKQOyFSB+ktlBXU\nIk6QKEGWiXPJ3LeRoXJqUSNpMDag+nrid5VtBgliAtTYBWrtmxXsZbZ341c9Dr47\nvKVkHZ9zNpQLJ6CeymOuL/dDFLVrF6Ny3R3YgWDO9d+rmRq5718SiyobRvBsnWT8\nM9kUPtDG3BvztvUyPmKa/1gELkISrpi2O3eZXpMmPYLP
Apr 26 09:32:27 solidrun-imx6 mender[454]: level=info msg="Issuer: [DIGI], Valid from: 2019-02-22 06:16:57 +0000 UTC, Valid to: 2020-02-22 06:16:57 +0000 UTC" module=client  
Apr 26 09:32:27 solidrun-imx6 mender[454]: level=info msg="State transition: init [none] -> init [none]" module=mender  
Apr 26 09:32:27 solidrun-imx6 mender[454]: level=info msg="State transition: init [none] -> idle [Idle]" module=mender  
Apr 26 09:32:27 solidrun-imx6 mender[454]: level=info msg="State transition: idle [Idle] -> authorize [Sync]" module=mender  
Apr 26 09:34:12 solidrun-imx6 mender[454]: level=error msg="Failure occured while executing authorization request: &url.Error{Op:\"Post\", URL:\"https://leshan.com/api/devices/v1/authentication/auth_requests\", Err:x509.HostnameError{Certificate:(*x509.Certificate)(0x1908000), Host:\"leshan.com\"}}" module="client_auth"  
Apr 26 09:34:12 solidrun-imx6 mender[454]: level=error msg="authorization request error: x509: certificate is valid for docker.mender.io, not leshan.com" module="client_auth"  
Apr 26 09:34:12 solidrun-imx6 mender[454]: level=error msg="authorize failed: transient error: authorization request failed: generic error occured while executing authorization request: Post https://leshan.com/api/devices/v1/authentication/auth_requests: **x509: certificate is valid for docker.mender.io, not leshan.com" module=state**  
Apr 26 09:34:12 solidrun-imx6 mender[454]: level=info msg="State transition: authorize [Sync] -> authorize-wait [Idle]" module=mender  

```

Following are changes i have done in yocto mender build…  
local.conf

```auto
MENDER_DEMO_HOST_IP_ADDRESS = "10.42.0.223"
MENDER_SERVER_URL = "https://leshan.com"
FILESEXTRAPATHS_prepend_pn-mender := "/etc/apache2/ssl:"
SRC_URI_append_pn-mender = " file://leshan.crt"

```

mender.conf in receips-mender/mender/files\*\*/mender.conf\*\*

```auto
{
    "InventoryPollIntervalSeconds": 30,
    "RetryPollIntervalSeconds": 30,
    "RootfsPartA": "/dev/mmcblk0p2",
    "RootfsPartB": "/dev/mmcblk0p3",
    "ServerCertificate": "/etc/mender/leshan.crt",
    "ServerURL": "https://leshan.com",
    "TenantToken": "",
    "UpdatePollIntervalSeconds": 30
}

```

Following are my changes on device side while device up and running  
cat /etc/mender/mender.conf

```auto
{
    "InventoryPollIntervalSeconds": 1800,
    "RetryPollIntervalSeconds": 300,
    "RootfsPartA": "/dev/mmcblk0p2",
    "RootfsPartB": "/dev/mmcblk0p3",
    "ServerCertificate": "/etc/mender/leshan.crt",
    "ServerURL": "https://leshan.com",
    "TenantToken": "dummy",
    "UpdatePollIntervalSeconds": 1800
}

```

```auto
root@solidrun-imx6:~# ls -lrt /etc/mender/
total 16
-rw-r--r-- 1 root root 24 Mar 18 10:11 artifact_info
-rw-r--r-- 1 root root 312 Apr 26 06:41 mender.conf
drwxr-xr-x 2 root root 4096 Apr 26 06:47 scripts
-rw-r--r-- 1 root root 2057 Apr 26 09:29 leshan.crt

```

```auto
cat /etc/hosts 
127.0.0.1	localhost.localdomain localhost
10.42.0.1 leshan.com

```

Edit: @mirzak: Prettified logs

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 26, 2019, 10:11am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/2 "2019-04-26T10:11:25Z")

</div>

Hi @ramu,

You seem to be mixing “demo environment” settings and with "production environment.

To better understand what you are trying to do, can please confirm which server instance are you using,

1. [https://docs.mender.io/1.7/getting-started/create-a-test-environment](https://docs.mender.io/1.7/getting-started/create-a-test-environment)

or

1. [https://docs.mender.io/1.7/administration/production-installation](https://docs.mender.io/1.7/administration/production-installation)

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 26, 2019, 10:37am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/3 "2019-04-26T10:37:34Z")

</div>

I used mender server from [https://docs.mender.io/1.7/getting-started/create-a-test-environment](https://docs.mender.io/1.7/getting-started/create-a-test-environment) and tested mender client on raspbery board using readily available images from mender site…

Then now, I am using the same above demo server which is running on my laptop ( Created certificate with [CN=leshan.com](http://CN=leshan.com) ) for mender client running on my solidrun board. I have made the above said changes like server name, certificate, ip address etc for in my yocto build for my device…

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 26, 2019, 10:40am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/4 "2019-04-26T10:40:37Z")

</div>

> [@ramu](#):
>
> MENDER\_DEMO\_HOST\_IP\_ADDRESS = “10.42.0.223”

Above is all you need for the demo environment in your Yocto configuration.

You can remove this,

```auto
MENDER_SERVER_URL = "https://leshan.com"
FILESEXTRAPATHS_prepend_pn-mender := "/etc/apache2/ssl:"
SRC_URI_append_pn-mender = " file://leshan.crt"

```

We already provide “demo certificates” for usage with demo environment and you can not use custom keys/certificates in this case.

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 26, 2019, 10:49am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/5 "2019-04-26T10:49:42Z")

</div>

If i want to use demo server then what are the values i need to use for below attributes in mender.conf and etc/hosts??  
I think i can delete below lines or mender.conf in recipes-more/

“ServerCertificate”: “/etc/mender/leshan.crt”,  
“ServerURL”: “[https://leshan.com](https://leshan.com)”,

```auto
cat /etc/hosts 
127.0.0.1	localhost.localdomain localhost
10.42.0.1 leshan.com **Here** ( mender.io ??)

```

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 26, 2019, 10:52am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/6 "2019-04-26T10:52:02Z")

</div>

It should be:

```auto
10.42.0.1 docker.mender.io

```

But if you use the `MENDER_DEMO_HOST_IP_ADDRESS` variable in Yocto, it will set this up correctly

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [April 27, 2019, 12:28pm UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/7 "2019-04-27T12:28:00Z")

</div>

> [@ramu](#):
>
> Then now, I am using the same above demo server which is running on my laptop ( Created certificate with [CN=leshan.com](http://CN=leshan.com) ) for mender client running on my solidrun board. I have made the above said changes like server name, certificate, ip address etc for in my yocto build for my device…

Demo server will be same in any case except the IP address configuration on the client to access the server. The demo server certificate and other configurations will be ready when you add the `/meta-mender/meta-mender-demo` to your soldrun board. No extra settings are required apart from what @mirzak suggested.

If you plan to go for production with your own server and certificate, then you need to [remove](https://docs.mender.io/1.7/artifacts/yocto-project/building-for-production) this meta-mender-demo layer and configure it as per your settings. Taking the demo server and making it as production server will not work!

I hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 27, 2019, 12:59pm UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/8 "2019-04-27T12:59:31Z")

</div>

It is for demo purpose only… I have not added meta-mender-demo layer… I will add and try

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 29, 2019, 6:00am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/9 "2019-04-29T06:00:11Z")

</div>

Thanks Ajith and Mirzak… Now device able to connect to demo server… But facing below issue…  
Inventory update failed

There was a problem updating the device auth status: cannot PUT /api/management/v2/devauth/devices/5cc68daddb7acc0001a4a4e8/auth/5cc68daddb7acc0001a4a4e9/status (500)… [Request ID: 001abd89]

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 29, 2019, 6:23am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/10 "2019-04-29T06:23:58Z")

</div>

Which version of the demo server are you running?

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 29, 2019, 6:31am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/11 "2019-04-29T06:31:33Z")

</div>

Demo server version is 1.7.0 … Below are the intervals i have changed from default vaules  
“InventoryPollIntervalSeconds”: 5,  
“RetryPollIntervalSeconds”: 30,

```
"UpdatePollIntervalSeconds": 5
```

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [April 29, 2019, 6:35am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/12 "2019-04-29T06:35:19Z")

</div>

Check if any of these are helpful,

[https://docs.mender.io/1.7/troubleshooting/mender-server](https://docs.mender.io/1.7/troubleshooting/mender-server)

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [April 29, 2019, 7:05am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/13 "2019-04-29T07:05:11Z")

</div>

Thank you… Now able to fetch the inventory data… I decommissioned some old device with same certificate…

---

<div class="post-metadata">

**Author:** ![ajithpv](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/ajithpv/32/728_2.png) [@ajithpv](https://hub.mender.io/u/ajithpv)\
**Post date:** [April 30, 2019, 5:27am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/14 "2019-04-30T05:27:55Z")

</div>

To make sure that the server is clean and solid, can you please do the below steps to make it default?  
[https://docs.mender.io/1.7/getting-started/maintain-the-test-environment#clean-up-the-environment](https://docs.mender.io/1.7/getting-started/maintain-the-test-environment#clean-up-the-environment)

This will reset the mender server to it’s original state so that, your device then consider as a new one and fetch the inventory data (if decommission made issue).

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [May 6, 2019, 12:09pm UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/15 "2019-05-06T12:09:46Z")

</div>

Thanks Ajith and Mirzak… I am able to update my device with new releases using production server and client… As of now I am updating the /etc/hosts and systemd/network/eth.entwork using mender-artifact tool… I Specified below changes as well, still /etc/hosts not reflecting these changes…  
MENDER\_DEMO\_HOST\_IP\_ADDRESS = “10.42.0.1”  
MENDER\_SERVER\_URL = “[https://mender.solid.com](https://mender.solid.com)”

I need to generate keys for signing the artifacts…  
info: no public key was provided for authenticating the artifact

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [May 6, 2019, 12:13pm UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/16 "2019-05-06T12:13:58Z")

</div>

> [@ramu](#):
>
> MENDER\_DEMO\_HOST\_IP\_ADDRESS = “10.42.0.1”

You do not need this if you have production server, nor do you need to update the /etc/hosts" file.

> MENDER\_SERVER\_URL = “[https://mender.solid.com](https://mender.solid.com/)”

Above is all you need + your custom `server.crt` if you generated as such.

> I need to generate keys for signing the artifacts…  
> info: no public key was provided for authenticating the artifact

[https://docs.mender.io/1.7/artifacts/signing-and-verification](https://docs.mender.io/1.7/artifacts/signing-and-verification)

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [May 7, 2019, 6:19am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/17 "2019-05-07T06:19:54Z")

</div>

I am facing below error with signing mender images …  
~/workspace/mender/mender-artifact modify solidrun-rel2.mender -k artifact-keys/private.key  
Error selecting images for modification: error validating signature

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [May 7, 2019, 6:21am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/18 "2019-05-07T06:21:25Z")

</div>

Please use the `sign` command instead of `modify`, e.g

```
 mender-artifact sign artifact.mender -k private.key -o artifact-signed.mender

```

We are aware of some problems with `modify` and that is what you are seeing here.

---

<div class="post-metadata">

**Author:** ![ramu](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@ramu](https://hub.mender.io/u/ramu)\
**Post date:** [May 9, 2019, 6:05am UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/19 "2019-05-09T06:05:59Z")

</div>

I am able to sign the artifact and upgrade to new releases…

I need to use the mender-artifact to write the ip address and server name in to /etc/hosts file for mender client to access the server… I created the certificate for Gateway\_API as well for my production server…  
So MENDER\_SERVER\_URL = “[https://mender.solid.com](https://mender.solid.com)” in local.conf not working for me… Usually mender client trying access “[https://mender.solid.com](https://mender.solid.com)” on localhost only

---

<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:** [May 13, 2019, 8:32pm UTC](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505/20 "2019-05-13T20:32:06Z")

</div>

Hi @ramu, I’m not sure what the issue is here. Are you still having trouble?

[Next page](https://hub.mender.io/t/mender-client-testing-on-solidrun-with-mender-demo-server/505.md?page=2)
