salt icon indicating copy to clipboard operation
salt copied to clipboard

Weird salt authentication with master error

Open rvora opened this issue 11 years ago • 2 comments

Can you help me why there would be a salt master authentication error in the middle of running state.sls as part of state.orchestrate? This operation follows state.highstate on the minion.

salt 2014.7.5 (Helium)

..... minion id redacted .....:
    Data failed to compile:
----------
    Rendering SLS 'base:roles.common.sensu_client' failed: Jinja error: Attempt to authenticate with the salt master failed
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/salt/utils/templates.py", line 280, in render_jinja_tmpl
    output = template.render(**decoded_context)
  File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
    return self.environment.handle_exception(exc_info, True)
  File "<template>", line 10, in top-level template code
  File "/usr/lib/python2.6/site-packages/salt/modules/mine.py", line 227, in get
    sreq = salt.transport.Channel.factory(__opts__)
  File "/usr/lib/python2.6/site-packages/salt/transport/__init__.py", line 47, in factory
    return ZeroMQChannel(opts, **kwargs)
  File "/usr/lib/python2.6/site-packages/salt/transport/__init__.py", line 236, in __init__
    self.auth = salt.crypt.SAuth(opts)
  File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 811, in __init__
    self.crypticle = self.__authenticate()
  File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 832, in __authenticate
    self.opts.get('auth_tries', 1)
  File "/usr/lib/python2.6/site-packages/salt/crypt.py", line 650, in sign_in
    raise SaltClientError('Attempt to authenticate with the salt master failed')
SaltClientError: Attempt to authenticate with the salt master failed

; line 10

---
[...]
{% else %}
  {% set ipaddr = salt['grains.get']('ip_interfaces:eth0')[0] %}
{% endif %}

{% set sensuserver = [] %}
{%- for server, ipaddrs in salt['mine.get']('kroles:monitor', 'network.ip_addrs', 'grain').iteritems() -%}    <======================
    {%- do sensuserver.append(ipaddrs|first) -%}
{%- endfor -%}

{% set hostname = salt['grains.get']('nodename') %}

rvora avatar Oct 03 '15 03:10 rvora

@rvora, thanks for the report. I am really unsure why you would encounter this error. Is it possible for you to construct a simpler reproducible case? Also, 2014.7.5 is no longer supported. You could try upgrading to 2015.8.0.

jfindlay avatar Oct 06 '15 21:10 jfindlay

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.

stale[bot] avatar Jan 13 '18 22:01 stale[bot]