How to connect RPI4 to Mender Server Production

Hi Mender Team, I have a problem here and I hope you guys can help me. I will make it clear as possible to understand.
I have a virtual machine running Centos7 and I have build a Mender Server Production on it by following the docs. I run my server without any error, everything was find but when I try to connect my RPI4 to my Mender Server is not working. My device is not append in pending tab . I will provide some screenshot and code for you guys. Hope you guys can help me fix this problem. I will much appreciated your help!

Here is the state of ./run ps on Mender Server

menderproduction_mender-api-gateway_1 /entrypoint.sh Up 0.0.0.0:443->443/tcp, 80/tcp
*menderproduction_mender-create-artifact- /usr/bin/workflows --confi … Up 8080/tcp *
worker_1
menderproduction_mender-deployments_1 /entrypoint.sh --config /e … Up 8080/tcp
menderproduction_mender-device-auth_1 /usr/bin/deviceauth --conf … Up 8080/tcp
menderproduction_mender-gui_1 /entrypoint.sh nginx Up (healthy) 80/tcp
menderproduction_mender-inventory_1 /usr/bin/inventory --confi … Up 8080/tcp
menderproduction_mender-mongo_1 docker-entrypoint.sh mongod Up 27017/tcp
menderproduction_mender-useradm_1 /usr/bin/useradm --config … Up 8080/tcp
menderproduction_mender-workflows-server_1 /usr/bin/workflows --confi … Up 8080/tcp
men> derproduction_mender-workflows-worker_1 /usr/bin/workflows --confi … Up
> menderproduction_minio_1 /usr/bin/docker-entrypoint … Up (healthy) 9000/tcp
> menderproduction_storage-proxy_1 /usr/local/openresty/bin/o … Up 0.0.0.0:9000->9000/tcp
> [root@localhost production]#

State of Mender Client on RPI4

Nov 25 09:25:10 raspberrypi mender[2393]: time=“2020-11-25T09:25:10Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”
Nov 25 09:25:10 raspberrypi mender[2393]: time=“2020-11-25T09:25:10Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization request: Post https://docker.mender.io
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]”
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:“https://docker.mender.io/api/devices/v1/authentication/auth_requests
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=error msg=“Authorization request error: Host validation error”
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=error msg="Failure occurred while executing authorization request: &url.Error{Op:“Post”, URL:“https://docker.mender.io/api/devices/v1/authentication/auth_requests
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=error msg=“Authorization request error: Host validation error”
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization request: Post https://docker.mender.io
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]”
Nov 25 09:25:40 raspberrypi mender[2393]: time=“2020-11-25T09:25:40Z” level=error msg="Authorize failed: transient error: authorization request failed: generic error occurred while executing authorization request: Post https://docker.mender.io

/etc/hosts file with 192.168.1.93 is Ip addr of my Mender Server
image

mender.conf file

image

During setup Mender Production installation you generate new keys/certificates, as is described here.

You need to use the server.crt from above instead of the demo.crt on the device.

Also you generated certificates for a certain domain name, per this step:

CERT_API_CN=$API_GATEWAY_DOMAIN_NAME CERT_STORAGE_CN=$STORAGE_PROXY_DOMAIN_NAME ../keygen

So you do not need the /etc/hosts entries anymore, and should instead use the appropriate domain name as ServerURL attribute in /etc/mender/mender.conf

Thanks for reply so fast Mr @mirzak, I know that I need to have server.crt on my device but I don’t have it. I want to ask that how I can create one and can I replace ServerURL with https://“My-Server-Ip-Addres”??