salt icon indicating copy to clipboard operation
salt copied to clipboard

2017.7.4 to 2018.3.0 upgrade issue: Salt request timed out. The master is not responding

Open tjyang opened this issue 8 years ago • 98 comments

Description of Issue/Question

I have a standby saltmaster on saltstack 2017.7.4 and I am trying to upgrade it to 8.3.0 salt just released. After 8.3.0 upgrade, I am getting following issue.

[root@salt01 ~]# sudo salt minion01 test.version
Salt request timed out. The master is not responding. 
You may need to run your command with `--async` in order to bypass the congested event bus. 
With `--async`, the CLI tool will print the job id (jid) and exit immediately without
 listening for responses.  You can then use `salt-run jobs.lookup_jid` to look up 
the results of the job in the job cache later.
[root@salt01 ~]#

Setup

(Please provide relevant configs and/or SLS files (Be sure to remove sensitive info).)

Steps to Reproduce Issue

  • snapshot salt01 VM (VMware image) for backup.
  • disable /etc/yum.repos.d/salt-latest.repo
  • yum update -y && reboot
  • enable /etc/yum.repos.d/salt-latest.repo
  • yum update -y salt && reboot
  • run test.ping on all minions or just one minion
[root@salt01 ~]# sudo salt minion01 test.version
Salt request timed out. The master is not responding. 
You may need to run your command with `--async` in order to bypass 
the congested event bus. With `--async`, the CLI tool will print the job id (jid) and 
exit immediately without listening for responses. You can then 
use `salt-run jobs.lookup_jid` to look up the results of the job in the job cache later.
[root@salt01 ~]#
  • If I revert the salt01's VM image back to saltstack 7.4 version. this problem disappear.

Versions Report

  • errors in systemctl status -l salt-master.
[root@salt01 ~]# systemctl status -l salt-master
? salt-master.service - The Salt Master Server
   Loaded: loaded (/usr/lib/systemd/system/salt-master.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-04-04 09:08:33 CDT; 19min ago
     Docs: man:salt-master(1)
           file:///usr/share/doc/salt/html/contents.html
           https://docs.saltstack.com/en/latest/contents.html
 Main PID: 1090 (salt-master)
   CGroup: /system.slice/salt-master.service
           +-1090 /usr/bin/python /usr/bin/salt-master
           +-1480 /usr/bin/python /usr/bin/salt-master
           +-1707 /usr/bin/python /usr/bin/salt-master
           +-1708 /usr/bin/python /usr/bin/salt-master
           +-1715 /usr/bin/python /usr/bin/salt-master
           +-1716 /usr/bin/python /usr/bin/salt-master
           +-1717 /usr/bin/python /usr/bin/salt-master
           +-1718 /usr/bin/python /usr/bin/salt-master
           +-1724 /usr/bin/python /usr/bin/salt-master
           +-1726 /usr/bin/python /usr/bin/salt-master
           +-1727 /usr/bin/python /usr/bin/salt-master
           +-1728 /usr/bin/python /usr/bin/salt-master
           +-1729 /usr/bin/python /usr/bin/salt-master
           +-1730 /usr/bin/python /usr/bin/salt-master

Apr 04 09:12:15 salt01 salt-master[1090]: pub = salt.crypt.get_rsa_pub_key(pubfn)
Apr 04 09:12:15 salt01 salt-master[1090]: File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 210, in get_rsa_pub_key
Apr 04 09:12:15 salt01 salt-master[1090]: key = RSA.load_pub_key(path)
Apr 04 09:12:15 salt01 salt-master[1090]: File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 406, in load_pub_key
Apr 04 09:12:15 salt01 salt-master[1090]: return load_pub_key_bio(bio)
Apr 04 09:12:15 salt01 salt-master[1090]: File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 422, in load_pub_key_bio
Apr 04 09:12:15 salt01 salt-master[1090]: rsa_error()
Apr 04 09:12:15 salt01 salt-master[1090]: File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 302, in rsa_error
Apr 04 09:12:15 salt01 salt-master[1090]: raise RSAError, m2.err_reason_error_string(m2.err_get_error())
Apr 04 09:12:15 salt01 salt-master[1090]: RSAError: no start line
[root@salt01 ~]#

  • version report
[root@salt01 ~]# salt --versions-report
Salt Version:
           Salt: 2018.3.0

Dependency Versions:
           cffi: 1.6.0
       cherrypy: unknown
       dateutil: 1.5
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: 1.3.8
         Jinja2: 2.7.2
        libgit2: 0.24.6
        libnacl: 1.4.3
       M2Crypto: 0.21.1
           Mako: 0.8.1
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: 1.2.5
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: 3.4.3
         pygit2: 0.24.2
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: 0.2.4
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core

[root@salt01 ~]#

tjyang avatar Apr 04 '18 14:04 tjyang

@tjyang So we have all the information and can accurately attempt to replicate the situation, was the minion upgraded to 2018.3.0 as well or is it still running 2017.7.4?

garethgreenaway avatar Apr 04 '18 15:04 garethgreenaway

Hi @garethgreenaway , Thanks for the quick reply.

Yes. all minions are still using 2017.7.4(some are even older).

tjyang avatar Apr 04 '18 15:04 tjyang

I'm having this same issue with 2018.3.0. My salt-minion is also on 2018.3.0.

This is what I'm getting in /var/log/salt/master:

2018-04-04 15:40:43,095 [tornado.application:123 ][ERROR   ][2361] Future exception was never retrieved: Traceback (most recent call last):
  File "/usr/lib64/python2.7/site-packages/tornado/gen.py", line 230, in wrapper
    yielded = next(result)
  File "/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 676, in handle_message
    stream.send(self.serial.dumps(self._auth(payload['load'])))
  File "/usr/lib/python2.7/site-packages/salt/transport/mixins/auth.py", line 436, in _auth
    pub = salt.crypt.get_rsa_pub_key(pubfn)
  File "/usr/lib/python2.7/site-packages/salt/crypt.py", line 210, in get_rsa_pub_key
    key = RSA.load_pub_key(path)
  File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 426, in load_pub_key
    return load_pub_key_bio(bio)
  File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 441, in load_pub_key_bio
    rsa_error()
  File "/usr/lib64/python2.7/site-packages/M2Crypto/RSA.py", line 330, in rsa_error
    raise RSAError(Err.get_error_message())
RSAError: no start line
# salt --versions-report
Salt Version:
           Salt: 2018.3.0

Dependency Versions:
           cffi: 1.6.0
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.28.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: 3.4.3
         pygit2: Not Installed
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.4.1708 Core
         locale: ANSI_X3.4-1968
        machine: x86_64
        release: 4.13.13-6-pve
         system: Linux
        version: CentOS Linux 7.4.1708 Core

DeviantEng avatar Apr 04 '18 15:04 DeviantEng

Hitting me as well, with the same message @DeviantEng reported in the log.

> salt --versions-report
Salt Version:
           Salt: 2018.3.0
 
Dependency Versions:
           cffi: 1.6.0
       cherrypy: unknown
       dateutil: 1.5
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: Not Installed
        libnacl: Not Installed
       M2Crypto: 0.28.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.4.8
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: 3.4.3
         pygit2: Not Installed
         Python: 2.7.5 (default, May  3 2017, 07:55:04)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4
 
System Versions:
           dist: redhat 7.4 Maipo
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: Red Hat Enterprise Linux Server 7.4 Maipo

edit: Minions are anywhere from 2016.11.3 (Carbon) to 2018.3.0 (Oxygen).

kubodhi avatar Apr 04 '18 15:04 kubodhi

We came in this morning to this problem. Our salt master updated and about half our minions have been updated from 2017.7.2 to 2018.3.0 via automatic update. Most of the 2018.3.0 minions appear to be off the air from the master's point of view. And we are seeing lots of errors in the logs:

2018-04-04 15:58:12,052 [salt.payload     :154 ][CRITICAL][6782] Could not deserialize msgpack message. This often happens when trying to read a file not in binary mode. To see message payload, enable debug logging and retry. Exception:
 unpackb() got an unexpected keyword argument 'ext_hook'
2018-04-04 15:58:12,095 [tornado.general  :410 ][ERROR   ][6782] Uncaught exception, closing connection.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 407, in _run_callback
    callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/zeromq.py", line 1045, in mark_future
    data = self.serial.loads(msg[0])
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 146, in loads
    ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder)
  File "_unpacker.pyx", line 80, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:82)
TypeError: unpackb() got an unexpected keyword argument 'ext_hook'
2018-04-04 15:58:12,096 [tornado.general  :445 ][ERROR   ][6782] Uncaught exception, closing connection.
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 433, in _handle_events
    self._handle_recv()
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 465, in _handle_recv
    self._run_callback(callback, msg)
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 407, in _run_callback
    callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/zeromq.py", line 1045, in mark_future
    data = self.serial.loads(msg[0])
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 146, in loads
    ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder)
  File "_unpacker.pyx", line 80, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:82)
TypeError: unpackb() got an unexpected keyword argument 'ext_hook'
2018-04-04 15:58:12,097 [tornado.application:612 ][ERROR   ][6782] Exception in callback None
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/tornado/ioloop.py", line 866, in start
    handler_func(fd_obj, events)
  File "/usr/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 433, in _handle_events
    self._handle_recv()
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 465, in _handle_recv
    self._run_callback(callback, msg)
  File "/usr/lib/python2.7/dist-packages/zmq/eventloop/zmqstream.py", line 407, in _run_callback
    callback(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/tornado/stack_context.py", line 275, in null_wrapper
    return fn(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/salt/transport/zeromq.py", line 1045, in mark_future
    data = self.serial.loads(msg[0])
  File "/usr/lib/python2.7/dist-packages/salt/payload.py", line 146, in loads
    ret = msgpack.loads(msg, use_list=True, ext_hook=ext_type_decoder)
  File "_unpacker.pyx", line 80, in msgpack._unpacker.unpackb (msgpack/_unpacker.cpp:82)
TypeError: unpackb() got an unexpected keyword argument 'ext_hook'
2018-04-04 15:58:51,928 [salt.minion      :998 ][ERROR   ][6782] Error while bringing up minion for multi-master. Is master at saltmaster.ourdomain.com responding?

brianeclow avatar Apr 04 '18 16:04 brianeclow

For the time being, I manually downgraded our salt-master back to 2017.7.5 (Nitrogen) and we're back in business.

kubodhi avatar Apr 04 '18 16:04 kubodhi

I experienced the same issue after automatically updating to 2018.3.0

I was able to get everything connecting again by making sure python-msgpack was installed on both the master and minions.

tannerwilliams avatar Apr 04 '18 16:04 tannerwilliams

Thanks everyone. Going to see if I can duplicate the issue and dive into what the root cause is.

garethgreenaway avatar Apr 04 '18 16:04 garethgreenaway

Hey guys,

We are also experiencing the issue after the master was upgraded to 2018.3.0.

Regards,

Hanoz

haeac avatar Apr 04 '18 16:04 haeac

Unfortunately I haven't been able to replicate the issue. If someone could provide a VM snapshot or container of an affected system that would be great. Thanks!

garethgreenaway avatar Apr 04 '18 21:04 garethgreenaway

Had the same issue and downgraded the master to 2017.7.5

lnrdll avatar Apr 04 '18 21:04 lnrdll

@garethgreenaway , I can provide a VMware snaphost. Since this is a production system, please advise me how can I take out my sensitive info.

tjyang avatar Apr 04 '18 22:04 tjyang

@tjyang That would be greatly appreciated. Please remove any personal or company proprietary information. Also send the snapshot info. along to [email protected], then it's not publicly available in the issue. Thanks!

garethgreenaway avatar Apr 04 '18 22:04 garethgreenaway

@garethgreenaway , Let me see if I can reproduce this issue in my homelab which only have a few minions connected. Send in production VM will be last resort. for homelab, I can even open up an ssh access to you if I can reproduce the issue, will keep you posted.

tjyang avatar Apr 04 '18 22:04 tjyang

@tjyang Sounds good!

garethgreenaway avatar Apr 04 '18 22:04 garethgreenaway

So I was able to fix the issue by upgrading the m2crypto and the zeromq libraries, and it is working afterwards. I don't know if that helps.

Auha avatar Apr 04 '18 23:04 Auha

@Auha Every bit of information helps! Do you know what versions of both you had installed before the upgrade?

garethgreenaway avatar Apr 04 '18 23:04 garethgreenaway

  • 2018.3.0 with issue, before m2crypto|zeromq' upgrade
[root@salt01 ~]# rpm -qa |egrep 'm2crypto|zeromq'
zeromq-4.1.4-5.el7.x86_64
m2crypto-0.21.1-17.el7.x86_64
[root@salt01 ~]#
  • upgrade per @Auha's pointer
[root@va32lsalt01 ~]# yum update -y
Loaded plugins: changelog, fastestmirror, langpacks, show-leaves
Loading mirror speeds from cached hostfile
 * base: mirrors.advancedhosters.com
 * elrepo: repos.ord.lax-noc.com
 * epel: mirror.cogentco.com
 * extras: mirror.clarkson.edu
 * updates: mirror.cogentco.com
Resolving Dependencies
--> Running transaction check
---> Package m2crypto.x86_64 0:0.21.1-17.el7 will be updated
---> Package m2crypto.x86_64 0:0.28.2-3.el7 will be an update
--> Processing Dependency: python2-typing for package: m2crypto-0.28.2-3.el7.x86_64
---> Package zeromq.x86_64 0:4.1.4-5.el7 will be updated
---> Package zeromq.x86_64 0:4.1.4-6.el7 will be an update
--> Running transaction check
---> Package python2-typing.noarch 0:3.5.2.2-3.el7 will be installed
--> Finished Dependency Resolution

<snipped>
  • salt-call --versions-report Salt Version:
[root@salt01 ~]# salt-call --versions-report
Salt Version:
           Salt: 2018.3.0

Dependency Versions:
           cffi: 1.6.0
       cherrypy: 5.6.0
       dateutil: 1.5
      docker-py: Not Installed
          gitdb: 0.6.4
      gitpython: 1.0.1
          ioflo: 1.3.8
         Jinja2: 2.7.2
        libgit2: 0.24.6
        libnacl: 1.4.3
       M2Crypto: 0.28.2
           Mako: 0.8.1
   msgpack-pure: Not Installed
 msgpack-python: 0.5.1
   mysql-python: 1.2.5
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: 3.4.3
         pygit2: 0.24.2
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: 0.9.0
        timelib: 0.2.4
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.4.1708 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.4.1708 Core

[root@salt01 ~]#

  • salt-master start up ok.
[root@salt01 ~]# systemctl status -l  salt-master
● salt-master.service - The Salt Master Server
   Loaded: loaded (/usr/lib/systemd/system/salt-master.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2018-04-04 18:23:51 CDT; 2min 46s ago
     Docs: man:salt-master(1)
           file:///usr/share/doc/salt/html/contents.html
           https://docs.saltstack.com/en/latest/contents.html
 Main PID: 10232 (salt-master)
   CGroup: /system.slice/salt-master.service
           ├─10232 /usr/bin/python /usr/bin/salt-master
           ├─10246 /usr/bin/python /usr/bin/salt-master
           ├─10249 /usr/bin/python /usr/bin/salt-master
           ├─10252 /usr/bin/python /usr/bin/salt-master
           ├─10253 /usr/bin/python /usr/bin/salt-master
           ├─10254 /usr/bin/python /usr/bin/salt-master
           ├─10255 /usr/bin/python /usr/bin/salt-master
           ├─10256 /usr/bin/python /usr/bin/salt-master
           ├─10257 /usr/bin/python /usr/bin/salt-master
           ├─10264 /usr/bin/python /usr/bin/salt-master
           ├─10265 /usr/bin/python /usr/bin/salt-master
           ├─10266 /usr/bin/python /usr/bin/salt-master
           ├─10267 /usr/bin/python /usr/bin/salt-master
           └─10268 /usr/bin/python /usr/bin/salt-master

Apr 04 18:23:49 va32lsalt01 systemd[1]: Starting The Salt Master Server...
Apr 04 18:23:51 va32lsalt01 systemd[1]: Started The Salt Master Server.
[root@salt01 ~]#

tjyang avatar Apr 04 '18 23:04 tjyang

I don't know if this helps, but I ran just a normal yum update when I previously just upgraded only the salt-master and its dependencies.

--> Running transaction check
---> Package libsodium.x86_64 0:1.0.5-1.el7 will be updated
---> Package libsodium.x86_64 0:1.0.16-1.el7 will be an update
---> Package m2crypto.x86_64 0:0.21.1-17.el7 will be updated
---> Package m2crypto.x86_64 0:0.28.2-3.el7 will be an update
--> Processing Dependency: python2-typing for package: m2crypto-0.28.2-3.el7.x86_64
---> Package python-simplejson.x86_64 0:3.2.0-1.el7 will be obsoleted
---> Package python2-msgpack.x86_64 0:0.4.8-1.el7 will be updated
---> Package python2-msgpack.x86_64 0:0.5.1-1.el7 will be an update
---> Package python2-simplejson.x86_64 0:3.10.0-1.el7 will be obsoleting
---> Package zeromq.x86_64 0:4.1.4-5.el7 will be updated
---> Package zeromq.x86_64 0:4.1.4-6.el7 will be an update
--> Running transaction check
---> Package python2-typing.noarch 0:3.5.2.2-3.el7 will be installed
--> Finished Dependency Resolution

Auha avatar Apr 04 '18 23:04 Auha

Definitely helps. Looks like we might be able to narrow this down to m2crypto version 0.21.1-17.el7.

garethgreenaway avatar Apr 04 '18 23:04 garethgreenaway