The issue with the certificate validation can happen when your operating system doesn't have updated CA certificates.
On the Windows operating systems, CA certificates are updated with the Windows Update. Make sure that you have all updates installed on the server.
On the Ubuntu/Debian Linux systems you can update by executing this command:
Alternatively, you can use an unencrypted connection, if maintaining up to date database of CA certificates in the operating system is not an option.