saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Install Salt from the Salt package repositories here:
https://docs.saltproject.io/salt/install-guide/en/latest/
Apache License 2.0
14.19k stars 5.48k forks source link

[BUG]TCP Publish Client encountered an exception while connecting to /var/run/salt/master/master_event_pub.ipc: StreamClosedError('Stream is closed') #66873

Open rimskij opened 2 months ago

rimskij commented 2 months ago

from salt-test01.test.pub

master congif: cluster_pki_dir: ../gv0/brick/pki/master

ls .../gv0/brick/pki/master/peers/ salt-test01.test.pub salt-test02.pub salt-test03.test.pub

salt-key -l debug 2024-09-03 14:48:36,033 [salt.channel.server:973 ][WARNING ][6604] Peer key missing PosixPath('../share/pki/master/peers/salt-test02.test.pub') 2024-09-03 14:48:36,035 [salt.channel.server:973 ][WARNING ][6604] Peer key missing PosixPath('../share/pki/master/peers/salt-test03.test.pub') 2024-09-03 14:48:41,418 [salt.channel.server:1126][CRITICAL][6658] Unhandled error while polling master events Traceback (most recent call last): File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/channel/server.py", line 1063, in handle_pool_publish aes = data["peers"][self.opts["id"]]["aes"] KeyError: 'aes' 2024-09-03 14:48:50,850 [salt.channel.server:1126][CRITICAL][6658] Unhandled error while polling master events Traceback (most recent call last): File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/channel/server.py", line 1063, in handle_pool_publish aes = data["peers"][self.opts["id"]]["aes"] KeyError: 'aes' 2024-09-03 17:24:07,920 [salt.transport.tcp:312 ][WARNING ][6662] TCP Publish Client encountered an exception while connecting to /var/run/salt/master/master_event_pub.ipc: StreamClosedError('Stream is closed'), will reconnect in 1 seconds - File "/usr/bin/salt-master", line 11, in sys.exit(salt_master())

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/scripts.py", line 86, in salt_master master.start()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/cli/daemons.py", line 223, in start self.master.start()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 844, in start salt.engines.start_engines(self.opts, self.process_manager)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/init.py", line 59, in start_engines proc_mgr.add_process(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 531, in add_process process.start()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 1100, in start super().start()

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/context.py", line 281, in _Popen return Popen(process_obj)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/popen_fork.py", line 19, in init self._launch(process_obj)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch code = process_obj._bootstrap(parent_sentinel=child_r)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 995, in wrapped_run_func return run_func()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/init.py", line 104, in run self.engineself.fun

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in call ret = self.loader.run(run_func, *args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as return _func_or_method(*args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/reactor.py", line 31, in start salt.utils.reactor.Reactor(opts).run()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 995, in wrapped_run_func return run_func()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/reactor.py", line 214, in run with salt.utils.event.get_event(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 127, in get_event return MasterEvent(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 928, in init super().init(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 265, in init self.connect_pub()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 323, in connect_pub self.subscriber = salt.utils.asynchronous.SyncWrapper(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/asynchronous.py", line 76, in init self.obj = cls(*args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 210, in ipc_publish_client return publish_client(opts, io_loop, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 152, in publish_client return salt.transport.tcp.PublishClient(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/tcp.py", line 220, in init super().init(opts, io_loop, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 398, in init super().init()

2024-09-03 17:24:07,959 [salt.utils.parsers:1062][WARNING ][6604] Master received a SIGTERM. Exiting. 2024-09-04 12:59:26,360 [salt.channel.server:395 ][ERROR ][16491] Authentication attempt from test-pct07 failed, the public keys did not match. This may be an attempt to compromise the Salt cluster. 2024-09-04 13:20:10,087 [salt.transport.tcp:312 ][WARNING ][16462] TCP Publish Client encountered an exception while connecting to /var/run/salt/master/master_event_pub.ipc: StreamClosedError('Stream is closed'), will reconnect in 1 seconds - File "/usr/bin/salt-master", line 11, in sys.exit(salt_master())

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/scripts.py", line 86, in salt_master master.start()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/cli/daemons.py", line 223, in start self.master.start()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/master.py", line 844, in start salt.engines.start_engines(self.opts, self.process_manager)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/init.py", line 59, in start_engines proc_mgr.add_process(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 531, in add_process process.start()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 1100, in start super().start()

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/process.py", line 121, in start self._popen = self._Popen(self)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/context.py", line 224, in _Popen return _default_context.get_context().Process._Popen(process_obj)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/context.py", line 281, in _Popen return Popen(process_obj)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/popen_fork.py", line 19, in init self._launch(process_obj)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/popen_fork.py", line 71, in _launch code = process_obj._bootstrap(parent_sentinel=child_r)

File "/opt/saltstack/salt/lib/python3.10/multiprocessing/process.py", line 314, in _bootstrap self.run()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 995, in wrapped_run_func return run_func()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/init.py", line 104, in run self.engineself.fun

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 160, in call ret = self.loader.run(run_func, *args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1269, in run return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/loader/lazy.py", line 1284, in _run_as return _func_or_method(*args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/engines/reactor.py", line 31, in start salt.utils.reactor.Reactor(opts).run()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/process.py", line 995, in wrapped_run_func return run_func()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/reactor.py", line 214, in run with salt.utils.event.get_event(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 127, in get_event return MasterEvent(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 928, in init super().init(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 265, in init self.connect_pub()

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/event.py", line 323, in connect_pub self.subscriber = salt.utils.asynchronous.SyncWrapper(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/asynchronous.py", line 76, in init self.obj = cls(*args, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 210, in ipc_publish_client return publish_client(opts, io_loop, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 152, in publish_client return salt.transport.tcp.PublishClient(

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/tcp.py", line 220, in init super().init(opts, io_loop, **kwargs)

File "/opt/saltstack/salt/lib/python3.10/site-packages/salt/transport/base.py", line 398, in init super().init()

Sxderp commented 2 months ago

I think this is a dupe of #66568