Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Agent install fails if the server takes more than 300 seconds to run "salt-minion-setup.exe" #120

Closed
trs998 opened this issue Sep 29, 2020 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@trs998
Copy link

trs998 commented Sep 29, 2020

"normal" agent install via powershell or exe baked in does not show the error - but running the command manually on administrative command prompt shows:

"C:\Program Files\TacticalAgent\tacticalrmm.exe" -m install --api "https://api.NOTREALDOMAIN.co.uk" --client-id 1 --site-id 2 --agent-type "server" --auth "50d8818cd794NOTREALAUTHd27fde5f"
Downloading salt minion
Found existing Mesh Agent. Removing...
Installing mesh agent
Adding agent to dashboard
Found existing salt-minion. Removing
Stopping salt-minion service
Uninstalling existing salt-minion
Salt was removed
Installing the salt-minion, this might take a while...
2020-09-29 10:35:27,303 - installer - install - 297 - ERROR - Command '['salt-minion-setup.exe', '/S', '/custom-config=saltcustom', '/master=api.NOTREALDOMAIN.co.uk', '/minion-name=SLOWSERVER-2019-8', '/start-minion=1']' timed out after 300.0 seconds

Yes - this server is a bit slow (<20mb/sec disks with other tasks to do too) but is there a way to adjust the timeout?

It looks like it's using a packaged version of python so is doing a lot of file reading and 300 seconds is not long enough. Possibly a flag for "allow X seconds for installer" we could edit in the ps1 script? I don't know what's cutting the install process off at the 300 second mark so I don't know how to adjust this timeout.

@trs998
Copy link
Author

trs998 commented Sep 29, 2020

"alt_cmd, cwd=self.programdir, shell=True, timeout=300" in winagent/installer.py seems to be the issue.

@wh1te909 wh1te909 self-assigned this Sep 29, 2020
@wh1te909 wh1te909 added the bug Something isn't working label Sep 29, 2020
@wh1te909
Copy link
Member

😂 wow, I got some pretty slow machines too but it's never taken more than 2 minutes. I'll release a new agent shortly with a higher default timeout and an optional flag to specify a custom timeout.

@trs998
Copy link
Author

trs998 commented Sep 29, 2020

I think it's a combination of conventional hard disks and other VMs meaning high io latency - the salt-minion seems to involve a lot of small files and that's disproportionately slow on busy conventional arrays.
That sounds like an excellent fix, thank you.

@wh1te909
Copy link
Member

new agent v0.11.2 is out, changed default timeout to 900 seconds and you can also pass --timeout 5000 or whatever number to the installer to override. Can pass it as well to the baked EXE, not just the manual command. Update RMM first using update.sh script if want to use the baked exe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants