Foreman not reading in puppet environments

Problem: Running import environments from foreman server actually tries to delete existing environments

Expected outcome: Foreman should see the environments that exist on the foreman server

Foreman and Proxy versions: 1.21-2

Foreman and Proxy plugin versions: 1.21-2

Other relevant data:
Clicking on the import environments gives no errors in the logs, and shows this in the access log: - - [25/Apr/2019:14:16:31 +0000] "GET /puppet/v3/environments HTTP/1.1" 200 241 "-" "Ruby" 17

So its does the query, gets a 200 response, with 241 bytes.

If I however do a curl command to do the same:

curl -k -s -X GET --cert /etc/puppetlabs/puppet/ssl/certs/ --cacert /etc/puppetlabs/puppet/ssl/certs/ca.pem --key /etc/puppetlabs/puppet/ssl/private_keys/

this is the entry in the log file: - - [25/Apr/2019:14:17:31 +0000] "GET /puppet/v3/environments HTTP/1.1" 200 1183 "-" "curl/7.29.0" 17

Which shows it gets a lot more data back (and I do get all the environments listed from the curl output)

Puppet in general seems broken now, and not sure what changes if any were made unfortunately (it broke whilst I was on vacation). Hosts created aren’t reporting back properly, or picking up the classes they should be running. But no errors anywhere, everything runs ok just not with the results we should be getting.

Can anyone give me some ideas where I should start looking?

Solved: I re-ran foreman-installer and it seems to have fixed the issue. Not sure why it was screwed in the first place tho.