Hi,
I see on my salt-master with installed and "obviously" working smartproxy
incl salt-api some errors in the
==> /var/log/foreman-proxy/salt-cron.log
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:581)
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 112, in upload
json.dumps(job), headers)
File "/usr/lib/python2.7/httplib.py", line 1001, in request
self._send_request(method, url, body, headers)
File "/usr/lib/python2.7/httplib.py", line 1035, in _send_request
self.endheaders(body)
File "/usr/lib/python2.7/httplib.py", line 997, in endheaders
self._send_output(message_body)
File "/usr/lib/python2.7/httplib.py", line 850, in _send_output
self.send(msg)
File "/usr/lib/python2.7/httplib.py", line 812, in send
self.connect()
File "/usr/lib/python2.7/httplib.py", line 1212, in connect
server_hostname=server_hostname)
File "/usr/lib/python2.7/ssl.py", line 350, in wrap_socket
_context=self)
File "/usr/lib/python2.7/ssl.py", line 566, in init
self.do_handshake()
File "/usr/lib/python2.7/ssl.py", line 788, in do_handshake
self._sslobj.do_handshake()
SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed
(_ssl.c:581)
But I don't find out which SSL Setting is wrong or which certs I have
forgotten.
The registration of the SmartProxy works fine, even also the import of some
salt states.
I think this will be the problem why I receive no reports from my minions.
Am I right?
my forman.yaml
:proto: https
:host: vmg-utf-foreman-000.to3.zone.loc
:port: 443
:ssl_ca: "/var/lib/puppet/ssl/certs/ca.pem"
:ssl_cert: "/var/lib/puppet/ssl/certs/vmg-utf-foreman-000.to3.zone.loc.pem"
:ssl_key:
"/var/lib/puppet/ssl/private_keys/vmg-utf-foreman-000.to3.zone.loc.pem"
:timeout: 10
:salt: /usr/bin/salt
:upload_grains: true
and my settings in salt-masters conf
external_auth:
pam:
saltuser:
- .*
- '@runner'
- '@wheel'
- '@jobs'
rest_cherrypy:
port: 9191
host: 0.0.0.0
ssl_key:
/var/lib/puppet/ssl/private_keys/vmg-utf-foreman-000.to3.zone.loc.pem
ssl_crt: /var/lib/puppet/ssl/certs/vmg-utf-foreman-000.to3.zone.loc.pem
Also the other settings in master config from
http://theforeman.org/plugins/foreman_salt/4.0/index.html#2.1.2SaltMasterConfiguration
On my way to find out whats going wrong or what's missing, I found on my
saltmaster another exception but in the
==> /var/log/foreman/dynflow_executor.output <==
Exiting
/usr/lib/ruby/vendor_ruby/bundler/rubygems_integration.rb:256:in block in replace_gem': Please install the sqlite3 adapter:
gem install
activerecord-sqlite3-adapter(sqlite3 is not part of the bundle. Add it to Gemfile.) (LoadError) from /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/sqlite3_adapter.rb:3:in
<top (required)>'
from
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in
require' from /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in
block in require'
from
/usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:236:in
load_dependency' from /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/dependencies.rb:251:in
require'
from
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:50:in
resolve_hash_connection' from /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:41:in
resolve_string_connection'
from
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:25:in
spec' from /usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/connection_adapters/abstract/connection_specification.rb:130:in
establish_connection'
from
/usr/share/foreman/vendor/ruby/2.1.0/gems/activerecord-3.2.21/lib/active_record/railtie.rb:88:in
block (2 levels) in <class:Railtie>' from /usr/share/foreman/vendor/ruby/2.1.0/gems/activesupport-3.2.21/lib/active_support/lazy_load_hooks.rb:36:in
instance_eval'
==> /var/log/foreman/production.log <==
2016-02-22T15:51:59 [app] [I] Connecting to database specified by
database.yml
I thought foreman itself is not needed, so what is there logging. Is this
activerecord-sqlite3-adapter mandatory?
– Tom (aka Jon Snow… knows nothing…)