Support #12426
closedProblems to import Salt States to Foreman
Description
Hello everybody,
I have a problem when I try to import the Salt States, The following error appears:
ERF12-4701 [ProxyAPI::ProxyException]: Unable to fetch Salt states list ([ProxyAPI::ProxyException]: ERF12-7301 [ProxyAPI::ProxyException]: Unable to fetch Salt environments list ([RestCli...) for proxy https://master.salt.lan:8443/salt/
Can anybody help me please?
Thanks!
Updated by david L over 9 years ago
More info:
this is my foreman.yaml
:proto: https
:host: master.salt.lan
:port: 8443
:ssl_ca: /var/lib/puppet/ssl/certs/ca.pem
:ssl_cert: /var/lib/puppet/ssl/certs/master.salt.lan.pem
:ssl_key: /var/lib/puppet/ssl/private_keys/master.salt.lan.pem
:timeout: 10
:salt: /usr/bin/salt
:upload_grains: true
the salt.yml
---:enabled: https
:autosign_file: /etc/salt/autosign.conf
:salt_command_user: root
- Some features require using the Salt API - such as listing environments and retrieving state info
:use_api: true
:api_url: https://localhost:8080
:api_auth: pam
:api_username: david
:api_password: **
Updated by david L over 9 years ago
foreman version: 1.9.3
salt version: 2015.5.3 (Lithium)
Updated by Stephen Benjamin over 9 years ago
- Tracker changed from Bug to Support
Hi,
Can you share the /etc/salt/master configuration for the API?
Is the salt-api service started? Any errors in /var/log/salt/* and /var/log/foreman-proxy/proxy.log?
Updated by david L over 9 years ago
Hi Stephen,
the /etc/salt/master configuration:
external_auth:
pam:
david:
- '@runner'
rest_cherrypy:
port: 8080
host: master.salt.lan
ssl_key: /var/lib/puppet/ssl/private_keys/master.salt.lan.pem
ssl_crt: /var/lib/puppet/ssl/certs/master.salt.lan.pem
Yes, the salt-api service is started.
In /var/log/salt/master I have the next errors:
2015-11-10 15:11:22,292 [salt.loaded.int.module.cmdmod ][ERROR ]2824 output: Couldn't retrieve ENC data: Could not send facts to Foreman: Permission denied - /var/lib/puppet/ssl/certs/master.salt.lan.pem
2015-11-10 15:11:22,293 [salt.loaded.int.pillar.puppet ][CRITICAL]2824 YAML data from /usr/bin/foreman-node failed to parse
And this is the error in the proxy.log file:
E, [2015-11-10T15:15:43.694224 #1883] ERROR -- : Failed to list environments: Connection refused - connect(2)
Thanks!!
Updated by david L over 9 years ago
Sorry, finally I can import the Salt States. I had a problem with the IP off the salt.master on the etc/hosts file.
Thanks for all!!!!!!!!!
Updated by Stephen Benjamin over 9 years ago
- Status changed from New to Closed
Great, glad it's working! Thanks for letting me know.