Problem with SSL validation

Hi,

i have two cuba apps deployed in ubuntu as uber jar both with https enable. Both apps are v.7.2.7.
I need to move some data beweent them by using Cuba REST API. Problem is that i´m getting this exeption:

org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://someurl:8443/app/rest/v2/queries/some_entity/some_query": PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target; nested exception is javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

Certificate is generated by certbot (letsencrypt).