Ylianst/MeshCentralRouter

Mappings only work for so long

Closed this issue · 13 comments

So i have a bit on an issue with router (latest version and previous).

I use router to create remote mappings to enable me to access websites using router as a proxy.

It works lovely at first, but after a while (maybe 30 mins) it stops working, i can get to the homepage of the site I am mapped to, but any pages outside of the home page I get:

image

Anyone else seeing the same ?

@Ylianst are issues on router better reported on the meshcentral issue log or do you want them here ?

I'm having this same issue between a Windows 7 and 10 PC. Doesn't matter if the Win7 PC is the router server or client, so-to-speak. Seems to happen twice a day
It's resolved by restarting the router program
The RoutePlus plugin does the same thing

Here's what I eventually get when enabling debug logging on the router exe:

Debug-Websocket noProxy
Debug-Websocket TCP connected, doing TLS...
Debug-VerifyServerCertificate: tlsCertFingerprint = _______
Debug-VerifyServerCertificate: Hash1 = _______
Debug-VerifyServerCertificate: Hash2 = _______
Debug-Websocket TLS setup, sending HTTP header...
Debug-Websocket got setup upgrade header.
Debug-MeshMapper-#1233: Websocket mapping, connected to server.
Debug-Websocket got string data, len = 53
Debug-Websocket got closed fragment.
Debug-MeshMapper-#1233: Websocket mapping, connected to server.
Debug-MeshMapper-#1233: ShutdownWebClients()

In particular, notice "got closed fragment". All the other lines appear throughout the log, but "Got closed fragment" only happened when the port forwarding broke, and it never recovers on its own.

Drnikcuk are you on Windows 7 too? Symantec antivirus? When you say you can still get to the homepage of the site you're mapped to, I think I misread you. That's not just caching right? I have a different issue where the port closes altogether so I will delete my posts if our issues are different.

@easy124 I think its same issue, I use relays for winbox access and they stop working after a while also.

I am on MeshCentral Router for mac and it also stops working (same with the plugin RoutePlus https://github.com/ryanblenis/MeshCentral-RoutePlus)

Looking into this now.

Reading above, I don't know what I need to test. I am doing SSH and web page access and it seems to work fine. Issues like it "stops working" are not helpful. I need much more details.

It seems like I need create a mapping and wait 30 minutes for it to fail? - Thanks.

The end-user claims there is no pattern for when ""got closed fragment"" happens and the port closes.
It happens sometimes frequent, sometimes less frequent. Sometimes in the middle of using the port.
No problems noticed when Win8 Client + Win10 server is involved.
The TCP port used, and program employed (e.g. RDP/HTTP) does not seem to be a factor.
Whether the Win7 PC is connecting to a Win10 port, or serving a port, does not matter.
Drnikcuk, are you using Windows 7 or no?? It only happened with a Windows 7 PC involved for me.

I will update if I find myself with the problem again.

Ok. I may have found the problem. I renew authentication cookies every 24 minutes, but when creating a mapping, it takes the cookie at that time instead of using the latest one. So, eventually the mapping will has an old cookie and no new connections will happen unless you remove and re-create the mapping. I just fixed the code for this. Will be in MeshCentral Router v1.4.

FYI. Latest MeshCentral Router v1.4 can be downloaded here.

Published MeshCentral v0.7.74 with latest MeshCentral Router or use link above with an existing server (no need to update the server). Let me know if that works.

Published MeshCentral v0.7.74 with latest MeshCentral Router or use link above with an existing server (no need to update the server). Let me know if that works.

Hey @Ylianst is there a new mac version available too ? Thx

Can confirm that in the windows version of the client the mappings are no longer lost after an extended period of time.

Thanks for the fix @Ylianst surprised more people hadn't spotted this one!