Project

General

Profile

Actions

Support #14115

closed

Unable to fetch Salt States

Added by Lukas Müller almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Smart Proxy
Target version:
-
Triaged:
Fixed in Releases:
Found in Releases:

Description

Hello,

i installed die Salt-Plugin into foreman with the manual.
The Salt-Keys are listed fine, but when i want to import my written salt states, this error occurs:

ERF12-4701 [ProxyAPI::ProxyException]: Unable to fetch Salt states list ([ProxyAPI::ProxyException]: ERF12-7301 [ProxyAPI::ProxyException]: Unable to fetch Salt environments list ([RestCli...) für Proxy https://foremanserver.domain.de:8443/salt/

After the error is occured one times, the error does not appear for a few minutes. If i click import salt states again, the proxy log only throws :

D, [2016-03-09T11:18:31.778652 #8233] DEBUG -- : close: 10.140.79.170:45199
D, [2016-03-09T11:18:42.971896 #8233] DEBUG -- : accept: 10.140.79.170:45200
D, [2016-03-09T11:18:42.974813 #8233] DEBUG -- : Rack::Handler::WEBrick is invoked.
D, [2016-03-09T11:18:43.094956 #8233] DEBUG -- : close: 10.140.79.170:45200

I got the first error from the online foreman interface because the proxy does not log it into the proxy.log in var log.

Do you know where the error is?

The saltcron.log throws SSL error which i don't understand:

Traceback (most recent call last):
File "/usr/sbin/upload-salt-reports", line 137, in <module>
upload(jobs_to_upload())
File "/usr/sbin/upload-salt-reports", line 100, in upload
cert_file=config[':ssl_cert'])
File "/usr/lib64/python2.7/httplib.py", line 1182, in __init__
context.load_cert_chain(cert_file, key_file)
SSLError: [SSL] PEM lib (_ssl.c:2738)

Thanks,
Lukas

Actions #1

Updated by Lukas Müller almost 9 years ago

my Foreman-Release is 1.10.2

Actions #2

Updated by Lukas Müller almost 9 years ago

/etc/salt/foreman.yml:

---
:proto: https
:host: foremanserver.domain.de
:port: 443
:ssl_ca: "/var/lib/puppet/ssl/certs/ca.pem" 
:ssl_cert: "/var/lib/puppet/ssl/private_keys/foremanserver.domain.de.pem" 
:ssl_key: "/var/lib/puppet/ssl/certs/foremanserver.domain.de.pem" 
:timeout: 10
:salt: /usr/bin/salt
:upload_grains: true

/etc/salt/master entrys:
The saltuser ist created.

file_roots:
   base:
     - /srv/salt/

ext_pillar:
  - puppet: /usr/bin/foreman-node
master_tops:
  ext_nodes: /usr/bin/foreman-node
autosign_file: /etc/salt/autosign.conf
external_auth:
  pam:
    saltuser:
      - '@runner'

rest_cherrypy:
  port: 9191
  host: 0.0.0.0
  ssl_key: /var/lib/puppet/ssl/private_keys/foremanserver.domain.de
  ssl_crt: /var/lib/puppet/ssl/certs/foremanserver.domain.de.pem

/etc/foreman-proxy/settings.d/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_auth: pam
:api_url: https://foremanserver.domain.de:9191
:api_username: saltuser
:api_password: saltpassword

All Foreman-Services are Running (foreman, foreman-proxy, foreman-tasks, salt-master, salt-api)

Actions #3

Updated by Lukas Müller almost 9 years ago

Log-Outpout http 406: (proxy.log) when clicking on import states from...

D, [2016-03-09T12:48:58.189711 #4464] DEBUG -- : accept: 10.140.79.170:45375
D, [2016-03-09T12:48:58.192039 #4464] DEBUG -- : Rack::Handler::WEBrick is invoked.
E, [2016-03-09T12:48:58.194412 #4464] ERROR -- : Failed to list environments: Connection refused - connect(2)
I, [2016-03-09T12:48:58.194805 #4464]  INFO -- : 10.140.79.170 - - [09/Mar/2016 12:48:58] "GET /salt/environments HTTP/1.1" 406 60 0.0020

D, [2016-03-09T12:48:58.236095 #4464] DEBUG -- : close: 10.140.79.170:45375

Actions #4

Updated by Lukas Müller almost 9 years ago

Can be closed, i forget the .pem extension @ /etc/salt/master cherrypy section @ssl_key - value

Actions #5

Updated by Anonymous over 8 years ago

  • Status changed from New to Closed

closing.

Actions

Also available in: Atom PDF