Open jrowinski3d opened 4 years ago
It sounds like the host might be under load and isn't creating the named pipe in time. When you are saying you are spawning N processes, are you creating N connections and N services as well? IIRC PAExec doesn't play well with multiple processes under the same spawned service but it's unfortunately not something I've played around with too much.
Hey @jborean93
I dont believe the host is under load. I have 2 Workstations I'm testing on. For each workstation I spawn a process to create the connection, connect, create service and run executable. Thats it. I just wanted to spawn processes to be ran at the same time for all my workstations.
Here is a snippet of what I'm doing, reading a json config to get specific params and execute the function
class MyProcesses():
def __init__(self, config, args):
self.config = config
self.args = args
def start_cluster(self):
for host in self.config['servers']:
h = host.get('hostname')
h_cmd = host.get('command')
if "master" in h:
cluster_args = self.config['node_extra_args']
else:
cluster_args = self.config['extra_args']
print("Starting Thread for %s" % h)
p = Process(target=start, args=(self.config, h, cluster_args, self.args))
Pros.append(p)
p.start()
# block until all the threads finish
for t in Pros:
t.join()
def start(config, h, cluster_args, exeN):
try:
c = Client(h, username=config['username'], password=config['password'])
c.connect()
c.create_service()
stdout, stderr, rc = c.run_executable(exeN[0], asynchronous=True, use_system_account=True, interactive=True, interactive_session=1, arguments=cluster_args)
finally:
c.remove_service()
c.disconnect()
Hi @jborean93
Opening another ticket to see if you could help. I am trying to spawn N Procceses per host and fire off to all run the same exe at the same time. It works majority of the time, but randomly I get this error. Just want to see if you have come across it or not.
As per MS error codes: UNKNOWN_ENUM = All instances of the designated named pipe are busy