Authorization request error: x509 because it doesn't contain any IP SANs

when i see the log for mender client using the below command it shows authorization request error: x509
journalctl -u mender

Dec 04 10:20:56 iWave-G27M mender[3961]: time=“2019-12-04T10:20:56Z” level=info msg=“Issuer: [], Valid from: 2016-12-14 19:52:46 +0000 UTC, Valid to: 2026-12-12 19:52:46 +0000 UTC” module=client

Dec 04 10:20:56 iWave-G27M mender[3961]: time=“2019-12-04T10:20:56Z” level=info msg=“State transition: init [none] -> init [none]” module=mender

Dec 04 10:20:56 iWave-G27M mender[3961]: time=“2019-12-04T10:20:56Z” level=info msg=“State transition: init [none] -> idle [Idle]” module=mender

Dec 04 10:20:56 iWave-G27M mender[3961]: time=“2019-12-04T10:20:56Z” level=info msg=“State transition: idle [Idle] -> authorize-wait [Idle]” module=mender

Dec 04 10:20:56 iWave-G27M mender[3961]: time=“2019-12-04T10:20:56Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]” module=mender

Dec 04 10:20:57 iWave-G27M mender[3961]: time=“2019-12-04T10:20:57Z” level=error msg="Failure occured while executing authorization request: &url.Error{Op:“Post”, URL:"https://192.168.0.100/api/devices/

v1/authentication/auth_requests", Err:x509.HostnameError{Certificate:(*x509.Certificate)(0x44204d4f00), Host:“192.168.0.100”}}" module=“client_auth”

Dec 04 10:20:57 iWave-G27M mender[3961]: time=“2019-12-04T10:20:57Z” level=error msg="authorization request error: x509: cannot validate certificate for 192.168.0.100 because it doesn’t contain any IP SANs

" module=“client_auth”

Dec 04 10:20:57 iWave-G27M mender[3961]: time=“2019-12-04T10:20:57Z” level=error msg="authorize failed: transient error: authorization request failed: generic error occured while executing authorization re

quest: Post https://192.168.0.100/api/devices/v1/authentication/auth_requests: x509: cannot validate certificate for 192.168.0.100 because it doesn’t contain any IP SANs" module=state

Dec 04 10:20:57 iWave-G27M mender[3961]: time=“2019-12-04T10:20:57Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]” module=mender

Dec 04 10:21:26 iWave-G27M mender[3961]: time=“2019-12-04T10:21:26Z” level=info msg=“State transition: authorize-wait [Idle] -> authorize [Sync]” module=mender

Dec 04 10:21:27 iWave-G27M mender[3961]: time=“2019-12-04T10:21:27Z” level=error msg="Failure occured while executing authorization request: &url.Error{Op:“Post”, URL:"https://192.168.0.100/api/devices/

v1/authentication/auth_requests", Err:x509.HostnameError{Certificate:(*x509.Certificate)(0x44203c0f00), Host:“192.168.0.100”}}" module=“client_auth”

Dec 04 10:21:27 iWave-G27M mender[3961]: time=“2019-12-04T10:21:27Z” level=error msg="authorization request error: x509: cannot validate certificate for 192.168.0.100 because it doesn’t contain any IP SANs

" module=“client_auth”

Dec 04 10:21:27 iWave-G27M mender[3961]: time=“2019-12-04T10:21:27Z” level=error msg="authorize failed: transient error: authorization request failed: generic error occured while executing authorization re

quest: Post https://192.168.0.100/api/devices/v1/authentication/auth_requests: x509: cannot validate certificate for 192.168.0.100 because it doesn’t contain any IP SANs" module=state

Dec 04 10:21:27 iWave-G27M mender[3961]: time=“2019-12-04T10:21:27Z” level=info msg=“State transition: authorize [Sync] -> authorize-wait [Idle]” module=mender

For HTTPS communication to work, certificates need to be generated for domain names, and will not work with an IP address.

Please have a look at, Production installation | Mender documentation

My mistake i was trying to test demo server and by mistake edited mender.conf and edited the MENDER_SERVER_URL value, I reverted back the change and now it is working