Could not communicate with fleet-server Checking API will retry

We have Could not communicate with the fleet-server Checking API will retry following error can you help for this

Hi!
From the error message it looks like a HTTP/HTTPS mismatch.
Could you give the commands that you used to start fleet-server and agent? Was the intention to start them both on HTTP or HTTPS?