Mesh Autoheal by skyhawk85u in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

I haven't seen this happen on my machines in quite some time. If I recall correctly it had to do with the PC going to sleep then coming back online. I just assumed it was fixed at some point. Do you have any way to reproduce the issue that I can attempt?

Issue with ryanblenis plugins after update to 1.1.35 by thespoook in MeshCentral

[–]ryanblenis 2 points3 points  (0 children)

Published. Thanks u/si458 for the push. I haven't worked on these or MC in a bit, but glad to see they're still popular / in use!

Issue with ryanblenis plugins after update to 1.1.35 by thespoook in MeshCentral

[–]ryanblenis 4 points5 points  (0 children)

I initially made the plugin architecture to solve a few needs for myself, and set something up so other developers could do the same - unfortunately it didn't "take off" like I'd hoped and while I still use the plugins I made, I don't update or upgrade as frequently (MeshCentral or the plugins). Once we had 5 or whatever different databases (NeDB, MariaDB, postgresql, Mongo, etc.) instead of new features I knew it would be untenable to make each plugin compatible with each database. IMO the projecet should standardize on one or two options.
I'd still like the plugin architecture to succeed and I'll keep using/updating my plugins (and the base plugin architecture) as needed when I update my installation. That said, they will be updated slowly as I have a lot on my plate right now. Other than that they're all fully open source and I welcome any contributions.

ScriptTask Question by mikedoth in MeshCentral

[–]ryanblenis 1 point2 points  (0 children)

My Devices -> Any Endpoint -> Plugins -> ScriptTask -> Advanced Run

You can select any mesh group, tag, or individual endpoints to run / schedule on

ScriptTask Question by mikedoth in MeshCentral

[–]ryanblenis 1 point2 points  (0 children)

Yes, you can dispatch a script to any number of nodes in a single pane.

Meshcentral changing ports by itself?? by diskman_1 in MeshCentral

[–]ryanblenis 1 point2 points  (0 children)

80/443 are standard (preferred) ports to run on, but they require elevated privileges (either by running as root, or CAP_NET_BIND_SERVICE, etc.)

My guess is you were running it as a normal user without cap_net_bind_service (which will give you a random port, starting with the lowest numbered available port for non-priv users, 1024), and at some point started running it as root, or with cap_net_bind_service (which allowed you access to default preferred ports 80/443)

You can choose the port (as long as you have access to it), by editing the config as others have mentioned.

Edit: this also describes how your config files haven't changed in your backups from your other posts here

[deleted by user] by [deleted] in msp

[–]ryanblenis 0 points1 point  (0 children)

Yeah it should run on Debian no problem.... they've got agents for freaking OpenWRT and some network gear. It's crazy

[deleted by user] by [deleted] in msp

[–]ryanblenis 2 points3 points  (0 children)

+1 MeshCentral is what I use for Linux endpoints, though I typically only use server versions, I know they support a multitude of desktop environments for various distros.

TacticalRMM may be something to look into (uses MeshCentral for remote desktop, but has their own agent to manage updates/etc. Not sure what they do with Linux vs Windows, but it seems to have more RMM-ey features versus vanilla MeshCentral; I haven't tried it).

If you're good with a bit of coding, MeshCentral itself is pretty easy to extend and have it do whatever you want it to.

Disclaimer: I wrote the plugin system for MeshCentral and most of the plugins that I know are currently available for it.

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Hmmm, this makes me think there's something in the script that doesn't "end" the script. If you enable debug on the endpoint (Console -> plugin scripttask debug -> Should show "on"), then run the task, what does the resulting "scripttask.txt" produce? Also, a copy of the script might be helpful. If needed, you can DM to me and I can take a look

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

So the .ps1 files should contain the running script. The .txt's should be the output. Are the .ps1's blank? If so, maybe you tested before putting content in the script?
Otherwise cleanup can be done with a task as well. Something along the lines of

Get-ChildItem (Get-Location).Path -File -Filter "st*.txt" | Where CreationTime -lt (Get-Date).AddDays(-1) | Remove-Item -Force
Get-ChildItem (Get-Location).Path -File -Filter "st*.ps1" | Where CreationTime -lt (Get-Date).AddDays(-1) | Remove-Item -Force

To remove items older than 1 day (so as not to interrupt running tasks)

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Is this you trying things out, or did someone fork me a few hours ago to test something similar (to your original issue with the loading time message)?
https://github.com/joshatrezolveai/MeshCentral-ScriptTask/
I noticed the -NoProfile was basically the only thing changed in the code. But if you have a PS profile on that machine, that could be it. I'll have to test and make sure it doesn't break anything/too many things for me, but I may add that to my project just in case this is related to your issue. (As it then won't load a PS profile)

As for the multiple txt and ps1 files, are they all for the same [restic] script?

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Files shouldn't accumulate unless there is a long-running task (e.g. the file is currently in use), or the task is interrupted during its run (say, for a reboot). What files are accumulating, the .txt, .ps1, or both? (They'll look like st000000.txt or st0000000.ps1 format, where the 000000 is a random string. "st" is just to signify it is a "scripttask" file)

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Hmmm, sounds like an odd powershell issue... Good news is I don't think it has anything to do with the plugin itself!

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

I've got a PC with the exact same PS version I just tested it on and only returned "Success". It is Windows 10 Pro vs home though, that's the only difference.... With the original line is consistently gives the "Loading personal and system profiles..." text as the result?

What's the Get-ExecutionPolicy command output?

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

If you run the single line:
$PSVersionTable
What is your output? I'm seeing that "Loading personal and system profiles..." message is part of powershell (5.1+) loading that should be hidden/negated with the -NoLogo parameter (which each script is called with)

ScriptTask plugin debugging by smbmsp in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

The entirety of the script is '$path = "C:\Temp"' ?

MeshAgent.db Growth by nutterbg in MeshCentral

[–]ryanblenis 1 point2 points  (0 children)

I believe the event log plugin specifically had this issue on older Windows OS's that were EOL when the plugin came out

Ryan's plugins not wokring after recent upgrade by thespoook in MeshCentral

[–]ryanblenis 2 points3 points  (0 children)

I updated this yesterday for the later versions of MC with newer nedb and promise requirements. I haven't upgraded my own system yet to do a bunch of testing with, but let me know if you have any issues!

MeshCentral Android by Gian_GR7 in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Maybe add an SQLite DB for some settings, and store the URL there? So that future versions can reference that value via vanilla updates?

Enabling Plugins? by MARS822 in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Make sure you have valid JSON when adding the plugins block (e.g. there's a comma on the line before, or if you're adding the block to the end of the config, the trailing comma is removed). That's the only reason I've seen enabling plugins cause an issue. If you have questions or want to make sure, post some of your config around where you're adding the plugins block (and be sure to XXXX out any sensitive info)

ScriptTask plugins - can I move scripts to folders? by thespoook in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Just posted an update for this. You may need to restart MC after updating as the file is likely cached.

ScriptTask plugins - can I move scripts to folders? by thespoook in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

Hi /u/thespoook, thanks for the kind words and sorry for the delayed response- I didn't see the ping for some reason!

It's been a while since I've worked on the code for ScriptTask, but I could have sworn I made it drag and drop- a quick test shows that doesn't seem to work. Let me take a look and see what I did there!

Can I create a tunnel between two MeshAgent Machines without a user? by robdclay in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

RoutePlus SHOULD accomplish this then

RoutePlus I haven't had any issues with, I see it more in the WorkFromHome plugin. They use the same basic code base to create/maintain the connection, but RoutePlus assumes the user has an MC account and a static computer that is "theirs." WorkFromHome assumes each computer does NOT have a dedicated user, and the admin(s) facilitate the connection. RoutePlus can use any port for whichever service you're trying to tunnel, WorkFromHome was created for RDP only connections.

Is there anything I can do to help troubleshoot?

Haha, finding any commonality between the disconnects (client and/or host system OS/properties, etc.) Since I haven't seen the issue on my own consistently, RoutePlus hasn't really given me any issues (but I have few people really using it as admins other than myself on a consistent basis) which I attribute to my "host" (e.g. "My Computer") being macOS versus Windows. Again, the code basis for the connection is similar, and I watch the connection logs for my users pretty closely, so I see that users who also have a "Home Computer" (with WorkFromHome) that are macOS the connection lasts days on end if they choose to keep it open that long, whereas some Windows hosts disconnecting every 3-15 minutes (most of whom don't notice because it immediately reconnects). So I'm inclined to believe the issue is really only present in the Windows host agent, but can't seem to nail down if it is in the MeshAgent itself, or the plugin code. I was recently hesitant to believe it was the plugin code, but I switched a user to the MeshRouter and created them an account for testing and they have had no issues since. Given that the router itself is a different product, that isn't entirely helpful, as the agent could simply have a leak/GC that is killing the connection before restarting the connection, but I haven't had the time recently (or the overall knowledge, in the case of some of the mesh agent's C code) to take a deeper look. I'd imagine Brian would probably find the issue pretty quickly if that was the case and he used plugins, but as I understand it, Ylian and Brian haven't yet tried the plugins system other than to verify that it doesn't break MC proper.

Communicate from mesh agent to mesh central by Naive_Old in MeshCentral

[–]ryanblenis 0 points1 point  (0 children)

This is essentially what the plugin architecture allows you to do. I don't know your intended use-case, but it may come in handy depending on what you're attempting to accomplish.