sometimes can't import classes ERF12-4115 [ProxyAPI::ProxyException]

My foreman install on ubuntu is causing me problems. Often (not all the
time) I can't import classes:
(this is a pop-up in the gui)
*Error:* ERF12-4115 [ProxyAPI::ProxyException]: Unable to get classes from
Puppet for workstations ([RestClient::ServiceUnavailable]: 503 Service
Unavailable) for proxy https://puppet.example.com:8443/puppet ... and it
fails.

I also get these messeges in /var/log/puppetlabs/puppetserver/puppetserver-access.log
like this (but seemingly for all my nodes):

GET
/puppet/v3/node/technetium.example.com?environment=staging&configured_environment=staging&transaction_uuid=f69fcd48-2aee-4a0c-a91e-259c52998c8a&
*fail_on_404*=true HTTP/1.1" 500 396 "-" "Puppet/4.10.6 Ruby/2.1.9-p490
(x86_64-linux)" 5401

Ubuntu 16.04.3
puppetserver 2.8.0-1puppetlabs1
foreman-installer 1.15.6-1

when I run puppet agent -t I occasionally get:

Warning: Unable to fetch my node definition, but the agent run will
continue:
Warning: Error 500 on SERVER: Server Error: Failed to find
technetium.example.com via exec: Execution of
'/etc/puppetlabs/puppet/node.rb technetium.example.com' returned 1:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER:
Server Error: Failed when searching for node technetium.example.com: Failed
to find technetium.example.com via exec: Execution of
'/etc/puppetlabs/puppet/node.rb technetium.example.com' returned 1:
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

If I run:
/etc/puppetlabs/puppet/node.rb technetium.example.com
I get:
Error retrieving node technetium.example.com: Net::HTTPNotFound
Check Foreman's /var/log/foreman/production.log for more information.

If anyone did any research for me, I appreciate it, but I think I'm going
to have to retire this project for now.
Perhaps I can resume work on foreman at a later date.
-peter