# /usr/bin/foreman-node host1.master.vm
Couldn't retrieve ENC data: Error retrieving node host1.master.vm: Net::HTTPNotFound
# /usr/bin/foreman-node salt.master.vm
Could not get grains: undefined method `merge' for nil:NilClass
I’m trying to get my host to appear on the webfrontend all to no avail, can someone please help me figure out what my config problem might be?
cat /etc/salt/foreman.yaml
---
:proto: https
:host: foreman.master.vm
:port: 8443
# if using http with ssl certificates
:ssl_ca: "/etc/puppetlabs/puppet/ssl/certs/ca.pem"
:ssl_cert: "/etc/puppetlabs/puppet/ssl/certs/salt.master.vm.pem"
:ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/salt.master.vm.pem"
# if using http with username and password instead of https with certicates
#:username: admin
#:password: changeme
:timeout: 10
:salt: /usr/bin/salt
:upload_grains: true
The HTTP Not Found error is your clue - the ENC script cannot find the Foreman server to ask for ENC data.
And this is probably why. 8443 is the port used by the proxy, not Foreman itself. Foreman uses normal HTTPS on port 443, which is probably what you want there.
We’ll need a much longer output from production.log. Try using tail -f /var/log/foreman/production.log before you run the ENC, and then capture the whole output of the request for node data.
Side note, there is an issue with fact/grain uploads in 10.0.0, you may want to upgrade to 10.1.0 once this PR is merged: