MeshCentralRouter icon indicating copy to clipboard operation
MeshCentralRouter copied to clipboard

Wine network disconnects

Open zhuravlev-alexey opened this issue 1 year ago • 12 comments

Hello! I'm running MeshCentralRouter in wine on Linux. The application starts and works, but there are constant disconnections. When working via ssh:

Bad packet length 525484407.ks
ssh_dispatch_run_fatal: Connection to 127.0.0.1 port 49507: Connection corrupted

When connecting via RDP via xfreedp:

[16:59:46:704] [455206:455207] [WARN][com.freerdp.core.transport] - Unhandled SSL error (where=16392, ret=532 [fatal, bad record mac])
[16:59:46:704] [455206:455207] [ERROR][com.freerdp.core.transport] - BIO_read returned an error: error:1C800066:Provider routines::cipher operation failed
[16:59:46:704] [455206:455207] [ERROR][com.freerdp.core.transport] - BIO_read returned an error: error:0A000119:SSL routines::decryption failed or bad record mac
[16:59:46:705] [455206:455207] [ERROR][com.freerdp.core] - transport_read_layer:freerdp_set_last_error_ex ERRCONNECT_CONNECT_TRANSPORT_FAILED [0x0002000D]
[16:59:46:705] [455206:455207] [INFO][com.freerdp.client.common] - Network disconnect!

When using other clients the problem also arises: rdesktop, remina Everything works fine for my colleagues on Windows.

It seems that the connection interruptions are due to increased traffic, such as windows scrolling or intensive console updates.

My system parameters: Ubuntu 22.04.4 LTS wine-7.12 (Staging) MeshCentral 1.1.24 MeshCentralRouter 1.8.8795

zhuravlev-alexey avatar Jun 27 '24 14:06 zhuravlev-alexey

i have a similar issue with wine on my OSX, when i connect, it says the SSL is invalid would i like to ignore so i click ignore and it works perfectly fine so it does indeed work on linux/mac so im not too sure how to fix this issue as the app is designed for windows to begin with

you could try updating ur wine to the latest stable of 9 as im running 9 at the moment https://wiki.winehq.org/Ubuntu

si458 avatar Jun 27 '24 14:06 si458

Updating to the latest version of wine-9.11 (Staging) did not help.

zhuravlev-alexey avatar Jun 27 '24 15:06 zhuravlev-alexey

ive just tried wine on my ubuntu 22 vm and i cant get SSH to work at all?

  1. installed wine 9,
  2. used winetricks to create new prefix in 32bit (not 64)
  3. used winetricks to install dotnet48 (in 32bit prefix)
  4. ran router in 32bit prefix, logged in ok,
  5. right clicked device selected ssh
  6. set path for ssh as /usr/bin/ssh
  7. click accept ssh key in wine window that pops up
  8. get message saying Host key verification failed

si458 avatar Jun 27 '24 15:06 si458

i have a similar issue with wine on my OSX, when i connect, it says the SSL is invalid would i like to ignore so i click ignore and it works perfectly fine so it does indeed work on linux/mac so im not too sure how to fix this issue as the app is designed for windows to begin with

you could try updating ur wine to the latest stable of 9 as im running 9 at the moment https://wiki.winehq.org/Ubuntu

It seems you are talking about a certificate warning that occurs on first run. Everything is ok with this. The problem occurs when forwarding ports; the connection is established, but after a while it breaks.

ive just tried wine on my ubuntu 22 vm and i cant get SSH to work at all?

It works for me, but the connection is interrupted either immediately or after a while. I launch MeshkentralRouter with the command: wine /opt/MeshCentralRouter/MeshCentralRouter.exe

To connect manually in the terminal: ssh username@localhost -p <port_number_from_MeshCentralRouter>

Wine is installed according to the manual: https://wiki.winehq.org/Ubuntu

I tried deleting the prefix - it didn't help.

zhuravlev-alexey avatar Jun 27 '24 15:06 zhuravlev-alexey

@zhuravlev-alexey ah right ok! using the ssh username@localhost -p <port_number_from_MeshCentralRouter> works!

what sort of activity are you doing? ive been running top -cd1 for a few mins and it hasnt disconnected once yet?

also i believe when using the SSH option, its meant to open an ssh window for you, but im guessing the Host key verification failed im getting is coming from inside wine as its not opening the ssh window properly, but thats a different bug anyways!

si458 avatar Jun 27 '24 15:06 si458

one thing you could try is using meshcmd instead and see if thats more stable, as that doesnt need wine! its a nodejs app thats built into an application/binary https://ylianst.github.io/MeshCentral/meshcmd/#meshcentral-tcp-port-mapping

si458 avatar Jun 27 '24 16:06 si458

what sort of activity are you doing? ive been running top -cd1 for a few mins and it hasnt disconnected once yet?

For example, I ran restic, apt - any programs that generate significant output to stdout. To be sure to reproduce the error, try the command cat /dev/urandom

also i believe when using the SSH option, its meant to open an ssh window for you, but im guessing the Host key verification failed im getting is coming from inside wine as its not opening the ssh window properly, but thats a different bug anyways!

I think this is another error that is not related to the problem described.

one thing you could try is using meshcmd instead and see if thats more stable, as that doesnt need wine! its a nodejs app thats built into an application/binary

I tried, but I couldn't get it to work. I receive an error message: Unable to connect to server: {"message":"TLS Handshake Error"} Perhaps this is due to the reverse proxy, but this needs to be dealt with separately in the corresponding issue.

zhuravlev-alexey avatar Jun 27 '24 16:06 zhuravlev-alexey

For example, I ran restic, apt - any programs that generate significant output to stdout. To be sure to reproduce the error, try the command cat /dev/urandom

ive been running the command for 5 mins now and its not disconnected once?

whats the specs/os of your meshcentral server? what nodejs version is the meshcentral server?

whats the spec/os of your remote device running the command?

si458 avatar Jun 27 '24 16:06 si458

MeshCentral server VM: Intel Cascade Lake ​vCPU: 2 (100%) RAM: 6 ГБ lxc Debian 12 MeshCentral 1.1.24 nodejs v18.19.0

It’s confusing that colleagues who use Windows don’t have similar problems. Now I launched Windows in VirtualBox, installed MeshkentralRouter and connected through the paths. It cat /dev/urandom about 4 hours!

It seems that this is something specific to the platform (wine or Linux)

zhuravlev-alexey avatar Jun 27 '24 20:06 zhuravlev-alexey

@zhuravlev-alexey I think it might be something to do with ur computer? I just can't figure out what? Did u launch the Windows vm on your computer or a different device? As I said I just tried my ubuntu 22.04 vm with wine 9 and it's working no problems it ran for like 45mins non-stop? How long does it take before it disconnects on ur computer?

si458 avatar Jun 27 '24 21:06 si458

Did u launch the Windows vm on your computer or a different device?

The virtual machine was running on the same device.

As I said I just tried my ubuntu 22.04 vm with wine 9 and it's working no problems it ran for like 45mins non-stop? How long does it take before it disconnects on ur computer?

Sounds great, unfortunately for me when running output-intensive commands it causes the connection to drop within 10-20 seconds. At the same time, on a VM with Windows running on the same device, it can work for several hours.

I tried to reproduce your setup:

  1. wine 9 is already installed
  2. Using winetricks created a new prefix in 32bit (not 64)
  3. I can't install dotnet48 using winetricks, an error message appears: warning: This package (dotnet48) is broken in wine-9.11. Broken since 5.18. See https://bugs.winehq.org/show_bug.cgi?id=49897 for more info. Use --force to try anyway.

How did you install dotnet48? I want to try to reproduce your installation. Perhaps the problem is in dotnet48 or the wine architecture.

zhuravlev-alexey avatar Jun 28 '24 06:06 zhuravlev-alexey

im using wine 9.0, the stable version not the staging or dev versions!

si458 avatar Jun 28 '24 08:06 si458