Ylianst / MeshCentral

A complete web-based remote monitoring and management web site. Once setup you can install agents and perform remote desktop session to devices on the local network or over the Internet.
https://meshcentral.com
Apache License 2.0
4.27k stars 571 forks source link

Router are not persistent #5149

Open tecnicosya opened 1 year ago

tecnicosya commented 1 year ago

If I use RouterPlus, WorkAtHome, MeshRouter, the routes work for a little bit of time, 1 day . After that the routes not work anymore. To get it working again, I

To Reproduce Steps to reproduce the behavior:

  1. Go to RouterPlus, WorkAtHome or MeshRouter
  2. Click on any of this and create a route.
  3. Test the connection wait a day or less. Or Restart Meshcentral service on the server. All routes still created on the server or that show the meshcentral web admin, but not work.
  4. Try to connect again and not connect.

Expected behavior I want the to be a persistent the route if the MeshAgent is running on the client side.

Server Software (please complete the following information):

Client Device (please complete the following information):

Remote Device (please complete the following information):

Additional context Add any other context about the problem here.

Your config.json file


{
  "$schema": "https://raw.githubusercontent.com/Ylianst/MeshCentral/master/meshcentral-config-schema.json",
  "__comment1__": "This is a simple configuration file, all values and sections that start with underscore (_) are ignored. Edit a section and remove the _ in front of the name. Refer to the user's guide for details.",
  "__comment2__": "See node_modules/meshcentral/sample-config-advanced.json for a more advanced example.",
  "settings": {
    "cert": "MyServerRemoved",
    "_WANonly": true,
    "_LANonly": true,
    "_sessionKey": "MyReallySecretPassword1",
    "_port": 443,
    "_aliasPort": 443,
    "_redirPort": 80,
    "_redirAliasPort": 80,
    "plugins": {"enabled": true }
  },
  "domains": {
    "": {
      "title": "NameRemoved",
      "title2": "TM",
      "_minify": true,
      "_newAccounts": false,
      "_userNameIsEmail": true
    }
  },
  "_letsencrypt": {
    "__comment__": "Requires NodeJS 8.x or better, Go to https://letsdebug.net/ first before trying Let's Encrypt.",
    "email": "myemail@mydomain.com",
    "names": "myserver.mydomain.com",
    "production": false
  }

}
mik000000 commented 1 year ago

i think it fails connect cause the cookie is expired.. you could see it in server log when you try connect to a route. it says: ERR: Bad cookie due to timeout i've tried to modify sessiontime and agentidletimeout in server config but it doesn't help. where can we tune that cookie expiration time?