Skip to content

Windows 2012 Multi-Master ZMQError #29396

Closed

Description

@Ch3LL

Tested on salt-versions: 2015.8.1 and 2015.8.3

Minion OS: Windows 2012
Master OS: centos7

When you add multiple-masters in the windows minion config file as follows:

master:
  - <masterA>
  - <masterB>

And after you accept the keys on both masters then restart the minion, I receive the following error in the minion debug log:

[DEBUG   ] LazyLoaded config.merge
[DEBUG   ] LazyLoaded mine.update
[INFO    ] Added mine.update to scheduler
[INFO    ] Updating job settings for scheduled job: __mine_interval
[DEBUG   ] SaltEvent PUB socket URI: tcp://127.0.0.1:4510
[DEBUG   ] SaltEvent PULL socket URI: tcp://127.0.0.1:4511
[DEBUG   ] Sending event - data = {'_stamp': '2015-12-03T15:55:00.343000', 'complete': True, 'schedule': {'__mine_interv
al': {'function': 'mine.update', 'jid_include': True, 'minutes': 60, 'maxrunning': 2}}}
[DEBUG   ] Persisting schedule
[ERROR   ] Failed to persist the updated schedule
[DEBUG   ] Handling event '/salt/minion/minion_schedule_add_complete\n\n\x83\xa6_stamp\xba2015-12-03T15:55:00.343000\xa8
complete\xc3\xa8schedule\x81\xaf__mine_interval\x84\xa8function\xabmine.update\xabjid_include\xc3\xa7minutes<\xaamaxrunn
ing\x02'
[INFO    ] Minion is starting as user 'Administrator'
[DEBUG   ] AsyncEventPublisher PUB socket URI: tcp://127.0.0.1:4510
[DEBUG   ] AsyncEventPublisher PULL socket URI: tcp://127.0.0.1:4511
[INFO    ] Starting pub socket on tcp://127.0.0.1:4510
[CRITICAL] Unexpected error while connecting to <masterA>
Traceback (most recent call last):
  File "C:\salt\bin\lib\site-packages\salt\minion.py", line 639, in _connect_minion
    minion.tune_in(start=False)
  File "C:\salt\bin\lib\site-packages\salt\minion.py", line 1642, in tune_in
    io_loop=self.io_loop,
  File "C:\salt\bin\lib\site-packages\salt\utils\event.py", line 806, in __init__
    self.epub_sock.bind(epub_uri)
  File "zmq/backend/cython/socket.pyx", line 489, in zmq.backend.cython.socket.Socket.bind (zmq\backend\cython\socket.c:
4824)
  File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq\backend\cython\socket.c:7
055)
    raise ZMQError(errno)
ZMQError: Address in use
[DEBUG   ] Reading configuration from c:\salt\conf\minion
[INFO    ] The salt minion is shut down�

The minion then consistently restarts with the above error and I am seeing about 40% CPU usage just from the python/salt process. I am able to run commands such as a test.ping from masterA but I am never able to run a test.ping from masterB.

When I do run a command from masterA I see schedule.clean_proc_dir with the job information in the log every time the minion restarts and it never clears for that job ID

[DEBUG   ] LazyLoaded config.merge
[DEBUG   ] schedule.clean_proc_dir: checking job {'tgt_type': 'glob', 'jid': '20151203170907703728', 'tgt': '*', 'pid':
2644, 'ret': '', 'user': 'root', 'arg': [], 'fun': 'test.ping'} for process existence
[DEBUG   ] schedule.clean_proc_dir: Cleaning proc dir, pid 2644 still exists.
[DEBUG   ] schedule.clean_proc_dir: checking job {'tgt_type': 'glob', 'jid': '20151203171057776681', 'tgt': '*', 'pid':
2644, 'ret': '', 'user': 'root', 'arg': [], 'fun': 'test.ping'} for process existence
[DEBUG   ] schedule.clean_proc_dir: Cleaning proc dir, pid 2644 still exists.
[DEBUG   ] schedule.clean_proc_dir: checking job {'tgt_type': 'glob', 'jid': '20151203171313249146', 'tgt': '*', 'pid':
2644, 'ret': '', 'user': 'root', 'arg': [], 'fun': 'test.ping'} for process existence
[DEBUG   ] schedule.clean_proc_dir: Cleaning proc dir, pid 2644 still exists.
[DEBUG   ] schedule.clean_proc_dir: checking job {'tgt_type': 'glob', 'jid': '20151203171417747304', 'tgt': '*', 'pid':
2644, 'ret': '', 'user': 'root', 'arg': [], 'fun': 'test.ping'} for process existence
[DEBUG   ] schedule.clean_proc_dir: Cleaning proc dir, pid 2644 still exists.
[DEBUG   ] LazyLoaded mine.update
[INFO    ] Added mine.update to scheduler
[INFO    ] Updating job settings for scheduled job: __mine_interval
[DEBUG   ] SaltEvent PUB socket URI: tcp://127.0.0.1:4510
[DEBUG   ] SaltEvent PULL socket URI: tcp://127.0.0.1:4511
[DEBUG   ] Sending event - data = {'_stamp': '2015-12-03T16:16:14.123000', 'complete': True, 'schedule': {'__mine_interv
al': {'function': 'mine.update', 'jid_include': True, 'minutes': 60, 'maxrunning': 2}}}
[DEBUG   ] Persisting schedule
[ERROR   ] Failed to persist the updated schedule
[DEBUG   ] Handling event '/salt/minion/minion_schedule_add_complete\n\n\x83\xa6_stamp\xba2015-12-03T16:16:14.123000\xa8
complete\xc3\xa8schedule\x81\xaf__mine_interval\x84\xa8function\xabmine.update\xabjid_include\xc3\xa7minutes<\xaamaxrunn
ing\x02'
[INFO    ] Minion is starting as user 'Administrator'
[DEBUG   ] AsyncEventPublisher PUB socket URI: tcp://127.0.0.1:4510
[DEBUG   ] AsyncEventPublisher PULL socket URI: tcp://127.0.0.1:4511
[INFO    ] Starting pub socket on tcp://127.0.0.1:4510
[CRITICAL] Unexpected error while connecting to <masterA>
Traceback (most recent call last):
  File "C:\salt\bin\lib\site-packages\salt\minion.py", line 639, in _connect_minion
    minion.tune_in(start=False)
  File "C:\salt\bin\lib\site-packages\salt\minion.py", line 1642, in tune_in
    io_loop=self.io_loop,
  File "C:\salt\bin\lib\site-packages\salt\utils\event.py", line 806, in __init__
    self.epub_sock.bind(epub_uri)
  File "zmq/backend/cython/socket.pyx", line 489, in zmq.backend.cython.socket.Socket.bind (zmq\backend\cython\socket.c:
4824)
  File "zmq/backend/cython/checkrc.pxd", line 25, in zmq.backend.cython.checkrc._check_rc (zmq\backend\cython\socket.c:7
055)
    raise ZMQError(errno)
ZMQError: Address in use�

Activity

  1. added
    Core
    bug
    P3
    severity-high
    ZD
    on Dec 3, 2015
  2. added this to the Approved milestone on Dec 3, 2015
  3. Ch3LL commented on Dec 3, 2015

    @Ch3LL
    ContributorAuthor

    ZD-532

  4. added
    Regression
    on Dec 3, 2015
  5. self-assigned this
    on Dec 4, 2015
  6. modified the milestones: B 6, Approved on Dec 10, 2015
  7. modified the milestones: B 7, B 6 on Dec 10, 2015
  8. basepi commented on Dec 17, 2015

    @basepi
    Contributor

    @jacksontj Can you take a glance at this? I can reproduce this issue and have done a lot of catching up on our current minion tune in and multi master code. I think what's going on is Windows won't allow multiple event publishers to be created on the same interface/port. However, I'm not sure if I can just ignore the error and move on. It's been a long time since I've been in this code. Do we need to share the event_publisher object across our multiple minions for multi-master?

  9. basepi commented on Dec 17, 2015

    @basepi
    Contributor

    I think I'm going to just try having each minion object make its own ipc socket, since I don't think they need to cross talk.

  10. basepi commented on Dec 17, 2015

    @basepi
    Contributor

    Whoops, make that tcp sockets. Hmmm, different ports perhaps? >.<

  11. added
    fixed-pls-verify
    on Dec 18, 2015
  12. added
    Platform
    and removed
    Core
    on Dec 18, 2015
  13. visbits commented on Feb 3, 2016

    @visbits

    8.4 fixes this.

  14. basepi commented on Feb 3, 2016

    @basepi
    Contributor

    Thanks for the confirmation, @visbits!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Multi-MasterP3PlatformRegressionWindowsZDbugfixed-pls-verifyseverity-high

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions