Certificate error with node.rb

During fact upload occured an exception: SSL_connect returned=1 errno=0 state=error: certificate verify failed
Unable to read from Cache file: No such file or directory @ rb_sysopen - /opt/puppetlabs/server/data/puppetserver/yaml/foreman/atlxweb29250.at.strabag.com.yaml

Expected outcome:
That it works

Foreman and Proxy versions:

Is this when running puppet agent on a host, or running node.rb manually?

This was when I tried to run node.rb.
We figured out that we had a problem with the certificate which we used in the apache. We changed it back to the certificate of the server and now it runs smooth.