linuxmint / warpinator

Share files across the LAN
GNU General Public License v3.0
1.23k stars 82 forks source link

Couldn't establish duplex #99

Open stenterello opened 3 years ago

stenterello commented 3 years ago

Hi,

I'm trying to connect my laptop with my phone, but running warpinator in debug mode shows this line:

Server RPC: CheckDuplexConnection from 'Android' -- server.py (line 391)

and then

Handshake failed with fatal error SSL_ERROR_SSL: error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED.

(By the way, after some tries, it doesn't shows anymore the last message but it just hang with the "CheckDuplexConnection" one).

On my phone, the message is: Connection failed, service unavailable (Couldn't establish duplex)

Why is this happening? And there's something I can do about it?

mtwebster commented 3 years ago

What version of Warpinator? Do you have a firewall active on the laptop?

stenterello commented 3 years ago

I have version 1.2.4+uma and the firewall should be ok because I already had issues with that. Indeed, the connection between laptop and phone succeded the first time I tried with new firewall configuration.

mtwebster commented 3 years ago

Ok - honestly I'm not familiar with the phone version, but the reason I mention the firewall is that I just fixed an issue that would cause problems with firewalled users using the latest warpinator version connecting to older versions (including, I think, the phone app).

The new version (1.2.4) no longer uses 'udp' to set up a connection between two devices, but only if both are using the newer version. I should have left the main port open for both tcp and udp: https://github.com/linuxmint/warpinator/commit/6ff301b34699118b021d0656f92caadff2cb6b45

I'm not certain the phone app you're using is using the new method or not, it's just something to have a look at maybe. The developer for the phone app may also have more troubleshooting advice as well: https://github.com/slowscript/warpinator-android

stenterello commented 3 years ago

In fact, about the firewall issue I was mentioning, the solution was to open the udp port to connect with the phone. Thank you very much! I'll try to ask on the phone app page

stenterello commented 3 years ago

I explored the issue more about my laptop/phone connection and I found out that the problem is not about the Warpinator Android app but it is linked to my computer. The only hint I found to clarify the situation is the message that I already posted earlier: you can find it in the image below.

warpinator1

In fact, the problem is present even if I try to connect my laptop to other laptops with a working Warpinator (to which my phone can connect, in fact). I don't know what this particular function is trying to do, but the connection is wi-fi and it seems it is trying to establish a duplex connection anyway. I tried with the preferences set both to automatic and wi-fi, with the same result. Another hint - I suppose - is that this is happening after the first (and unique) time I managed to get the computer connected to the phone.

levi-jcbs commented 2 years ago

Maybe check if the zeroconf port 5353/udp is open. That was the problem for me, and I got a similar error message: #129

In general you could just disable your firewall to check, if it's a firewall issue.

vini-nu commented 1 year ago

My problem was also that allow-5353/udp was missing... I use PC WiFi in station-mode (hotspot). Just allowing warpinator in firewall wasn't enough, because duplex could not finish.

Wonder why Warpinator doesn't just say what ports does it need in Preferences and what rules does it create when pressing "Update firewall rules" button.

    ~  warpinator --debug                                                                                  ✔ 
2023-04-02 18:21:26,907::warpinator: Initializing Warpinator
2023-04-02 18:21:26,908::warpinator::DEBUG: UI: Creating window and status icon -- warpinator.py (line 1085)
2023-04-02 18:21:27,965::warpinator::DEBUG: Starting network monitor -- networkmonitor.py (line 52)
2023-04-02 18:21:27,967::warpinator::DEBUG: Network state changed: online = True -- networkmonitor.py (line 144)
2023-04-02 18:21:27,967::warpinator::DEBUG: New server requested for 'wlp10s0' (10.42.0.1) -- warpinator.py (line 1139)
2023-04-02 18:21:27,967::warpinator::DEBUG: Auth: Creating server credentials -- auth.py (line 231)
2023-04-02 18:21:28,220::warpinator::DEBUG: Server: starting server on 10.42.0.1 (wlp10s0) -- server.py (line 280)
2023-04-02 18:21:28,220::warpinator: Using api version 2
2023-04-02 18:21:28,220::warpinator: Our uuid: DELL
2023-04-02 18:21:28,220::warpinator::DEBUG: Starting v1 registration server (10.42.0.1) with port 42000 -- remote_registration.py (line 57)
2023-04-02 18:21:28,220::warpinator::DEBUG: Starting v2 registration server (10.42.0.1) with auth port 42001 -- remote_registration.py (line 59)
2023-04-02 18:21:28,226::warpinator: Using system zeroconf v0.39.4
2023-04-02 18:21:28,228::warpinator::DEBUG: Using selector: EpollSelector -- selector_events.py (line 54)
2023-04-02 18:21:35,480::warpinator::DEBUG: Registration Server RPC: RequestCertificate from vinideck '10.42.0.1' -- remote_registration.py (line 271)
2023-04-02 18:21:35,697::warpinator::DEBUG: Server RPC: WaitingForDuplex from 'vinideck' (api v2) -- server.py (line 406)
2023-04-02 18:21:35,841::warpinator: Server: ACTIVE
2023-04-02 18:21:35,844::warpinator::DEBUG: UI: start discovery timer (no remotes) -- warpinator.py (line 840)
2023-04-02 18:21:39,042::warpinator::DEBUG: UI: Discovery timed out (no remotes) -- warpinator.py (line 856)
2023-04-02 18:21:50,583::warpinator::DEBUG: Server RPC: WaitingForDuplex from 'vinideck' (api v2) -- server.py (line 406)
2023-04-02 18:22:05,682::warpinator::DEBUG: Server RPC: WaitingForDuplex from 'vinideck' (api v2) -- server.py (line 406)
2023-04-02 18:22:20,574::warpinator::DEBUG: Server RPC: WaitingForDuplex from 'vinideck' (api v2) -- server.py (line 406)
2023-04-02 18:22:35,475::warpinator::DEBUG: Server RPC: WaitingForDuplex from 'vinideck' (api v2) -- server.py (line 406)
2023-04-02 18:22:50,573::warpinator::DEBUG: Server RPC: WaitingForDuplex from 'vinideck' (api v2) -- server.py (line 406)
johnklint81 commented 9 months ago

My wife obtain this error message using warpinator --debug. She's on Ubuntu 22.04. Suspect this has something to do with snap? Anyways, this prevents her from connecting to or from her computer, although we can still see her on the network. I guess the solution is to ... install warpinator but not as a snap package?

Gtk-Message: 21:34:36.531: Failed to load module "xapp-gtk3-module" Gtk-Message: 21:34:36.592: Failed to load module "canberra-gtk-module"

(warpinator.py:129995): Gtk-WARNING **: 21:34:36.671: Failed to register client: GDBus.Error:org.freedesktop.DBus.Error.AccessDenied: An AppArmor policy prevents this sender from sending this message to this recipient; type="method_call", sender=":1.315" (uid=1000 pid=129995 comm="/usr/bin/python3 /snap/warpinator/current/usr/libe" label="snap.warpinator.warpinator (enforce)") interface="org.gnome.SessionManager" member="RegisterClient" error name="(unset)" requested_reply="0" destination=":1.42" (uid=1000 pid=2048 comm="/usr/libexec/gnome-session-binary --systemd-servic" label="unconfined") 2024-01-31 21:34:36,672::warpinator: Initializing Warpinator 2024-01-31 21:34:36,672::warpinator: Group Code is short, consider something longer than 8 characters. 2024-01-31 21:34:36,691::warpinator: Starting server on 192.168.1.231

(warpinator.py:129995): Gdk-CRITICAL **: 21:34:36.726: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed 2024-01-31 21:34:44,607::warpinator: Group Code is short, consider something longer than 8 characters.`

mtwebster commented 9 months ago

That looks like an extremely old version - I didn't know there was a snap, but if it's this: https://snapcraft.io/install/warpinator/ubuntu, it hasn't updated in over 3 years, and from recent comments there, it's broken.

I'd suggest the Flatpak version (maintained by the authors) or try the package here: https://github.com/linuxmint/warpinator/releases/tag/master.mint21

johnklint81 commented 9 months ago

Thanks for answer! I removed the snap and tried both the package and flatpak -- neither worked. The package yields this error

Gtk-Message: 22:02:21.878: Failed to load module "xapp-gtk3-module"
2024-01-31 22:02:21,927::warpinator::DEBUG: Migration failed - either migration already happened, or there was nothing to migrate in the first place: g-file-error-quark: No such file or directory (4) -- prefs.py (line 99)
Using landlock for incoming file isolation

Then the program shows the Waiting for connection, cannot connect icon.

johnklint81 commented 9 months ago

After installing python-qrcode package I managed to get a more (?) informative debug message. As a sidenote, I have tried shutting down the routers firewall and that made no difference. Also note that it works on my machine (TM), using LinuxMint 21.3 (same network obviously)

Gtk-Message: 22:10:32.422: Failed to load module "xapp-gtk3-module"
2024-01-31 22:10:32,471::warpinator::DEBUG: Migration failed - either migration already happened, or there was nothing to migrate in the first place: g-file-error-quark: No such file or directory (4) -- prefs.py (line 99)
Using landlock for incoming file isolation
2024-01-31 22:10:32,538::warpinator: Initializing Warpinator
2024-01-31 22:10:32,539::warpinator::DEBUG: FreeSpaceMonitor new -- util.py (line 456)
2024-01-31 22:10:32,539::warpinator::DEBUG: UI: Creating window and status icon -- warpinator.py (line 1328)
2024-01-31 22:10:32,561::warpinator::DEBUG: Starting network monitor -- networkmonitor.py (line 52)
2024-01-31 22:10:32,562::warpinator::DEBUG: Network state changed: online = True -- networkmonitor.py (line 144)
2024-01-31 22:10:33,564::warpinator::DEBUG: FreeSpaceMonitor - 476605501440 available (476,6 GB) -- util.py (line 598)
2024-01-31 22:10:33,564::warpinator::DEBUG: FreeSpaceMonitor - op needs 0 bytes, 476,6 GB available (0 bytes of which is being overwritten) -- util.py (line 542)
2024-01-31 22:10:33,564::warpinator::DEBUG: New server requested for 'eno1' (192.168.1.231) -- warpinator.py (line 1408)
2024-01-31 22:10:33,564::warpinator::DEBUG: Auth: Creating server credentials -- auth.py (line 110)
2024-01-31 22:10:33,742::warpinator::WARNING: Secure mode not enabled, restricting preferences. -- warpinator.py (line 1433)
2024-01-31 22:10:33,742::warpinator::WARNING: -- See https://github.com/linuxmint/warpinator/blob/master/README.md -- warpinator.py (line 1434)
2024-01-31 22:10:33,742::warpinator: Using grpc version 1.59.0 (bundled)
2024-01-31 22:10:33,742::warpinator: Using protobuf version 4.24.4 (bundled)
2024-01-31 22:10:33,742::warpinator::DEBUG: Server: starting server on 192.168.1.231 (eno1) -- server.py (line 339)
2024-01-31 22:10:33,742::warpinator: Using api version 2
2024-01-31 22:10:33,742::warpinator: Our uuid: SUU-E2B6A6BF5553FA74E051
2024-01-31 22:10:33,742::warpinator::DEBUG: Starting v1 registration server (192.168.1.231) with port 42000 -- remote_registration.py (line 58)
2024-01-31 22:10:33,742::warpinator::DEBUG: Starting v2 registration server (192.168.1.231) with auth port 42001 -- remote_registration.py (line 60)
2024-01-31 22:10:33,742::warpinator::DEBUG: Using NewThreadExecutor -- util.py (line 46)
2024-01-31 22:10:33,743::warpinator::DEBUG: NewThreadExecutor: Waiting on an op -- util.py (line 70)
2024-01-31 22:10:33,746::warpinator: Using zeroconf version 0.115.2 (bundled)
2024-01-31 22:10:33,747::warpinator::DEBUG: Using selector: EpollSelector -- selector_events.py (line 54)
2024-01-31 22:10:41,361::warpinator: Server: ACTIVE
2024-01-31 22:10:41,362::warpinator: >>> Discovery: new remote: DESKTOP-9OEOGQI (192.168.1.5:42000)
2024-01-31 22:10:41,362::warpinator::DEBUG: Registering with DESKTOP-9OEOGQI (192.168.1.5:42001) - api version 2 -- remote_registration.py (line 204)
2024-01-31 22:10:41,362::warpinator::DEBUG: remote-registration-thread-DESKTOP-9OEOGQI-192.168.1.5:42001-DESKTOP-9OEOGQI-2cfd2206-7106-4322-ae21-cd9c13db43ca -- remote_registration.py (line 209)
2024-01-31 22:10:41,362::warpinator::DEBUG: Remote: Attempting to register DESKTOP-9OEOGQI (192.168.1.5) -- remote_registration.py (line 225)
2024-01-31 22:10:41,364::warpinator::DEBUG: UI: start discovery timer (no remotes) -- warpinator.py (line 957)
2024-01-31 22:10:41,566::warpinator::DEBUG: Decryption failed for remote 'DESKTOP-9OEOGQI': Decryption failed. Ciphertext failed verification -- auth.py (line 89)
2024-01-31 22:10:41,566::warpinator::DEBUG: Unable to register with DESKTOP-9OEOGQI (192.168.1.5:42001) - api version 2 -- remote_registration.py (line 219)
2024-01-31 22:10:41,566::warpinator::DEBUG: Register failed, or the server was shutting down during registration, ignoring remote DESKTOP-9OEOGQI (192.168.1.5:42000) auth port: 42001 -- server.py (line 232)
2024-01-31 22:10:45,043::warpinator::DEBUG: UI: Discovery timed out (no remotes) -- warpinator.py (line 974)
2024-01-31 22:11:11,133::warpinator::DEBUG: Stopping v1 registration server. -- remote_registration.py (line 70)
2024-01-31 22:11:11,781::warpinator::DEBUG: Stopping v2 registration server. -- remote_registration.py (line 75)
2024-01-31 22:11:11,781::warpinator::DEBUG: Server: stopping discovery and advertisement -- server.py (line 393)
2024-01-31 22:11:12,033::warpinator::DEBUG: Server: terminating server -- server.py (line 413)
2024-01-31 22:11:12,033::warpinator::DEBUG: NewThreadExecutor: Shutting down -- util.py (line 133)
2024-01-31 22:11:12,033::warpinator::DEBUG: NewThreadExecutor: Shutting down - waiting on factory thread -- util.py (line 139)
2024-01-31 22:11:12,033::warpinator::DEBUG: NewThreadExecutor: Factory shutting down -- util.py (line 74)
2024-01-31 22:11:12,033::warpinator::DEBUG: NewThreadExecutor: Shutting down - waiting on workers -- util.py (line 83)
2024-01-31 22:11:12,033::warpinator::DEBUG: NewThreadExecutor: done waiting for workers, end factory thread -- util.py (line 90)
2024-01-31 22:11:12,033::warpinator::DEBUG: NewThreadExecutor: Shutdown complete -- util.py (line 141)
2024-01-31 22:11:12,033::warpinator::DEBUG: Server: server stopped -- server.py (line 420)
2024-01-31 22:11:13,034::warpinator::DEBUG: FreeSpaceMonitor - 476605087744 available (476,6 GB) -- util.py (line 598)
2024-01-31 22:11:13,034::warpinator::DEBUG: FreeSpaceMonitor - op needs 0 bytes, 476,6 GB available (0 bytes of which is being overwritten) -- util.py (line 542)
2024-01-31 22:11:13,034::warpinator::DEBUG: New server requested for 'eno1' (192.168.1.231) -- warpinator.py (line 1408)
2024-01-31 22:11:13,035::warpinator::DEBUG: Auth: Creating server credentials -- auth.py (line 110)
2024-01-31 22:11:13,222::warpinator: Using grpc version 1.59.0 (bundled)
2024-01-31 22:11:13,222::warpinator: Using protobuf version 4.24.4 (bundled)
2024-01-31 22:11:13,222::warpinator::DEBUG: Server: starting server on 192.168.1.231 (eno1) -- server.py (line 339)
2024-01-31 22:11:13,222::warpinator: Using api version 2
2024-01-31 22:11:13,222::warpinator: Our uuid: SUU-E2B6A6BF5553FA74E051
2024-01-31 22:11:13,222::warpinator::DEBUG: Starting v1 registration server (192.168.1.231) with port 42000 -- remote_registration.py (line 58)
2024-01-31 22:11:13,222::warpinator::DEBUG: Starting v2 registration server (192.168.1.231) with auth port 42001 -- remote_registration.py (line 60)
2024-01-31 22:11:13,223::warpinator::DEBUG: Using NewThreadExecutor -- util.py (line 46)
2024-01-31 22:11:13,223::warpinator::DEBUG: NewThreadExecutor: Waiting on an op -- util.py (line 70)
2024-01-31 22:11:13,224::warpinator: Using zeroconf version 0.115.2 (bundled)
2024-01-31 22:11:13,224::warpinator::DEBUG: Using selector: EpollSelector -- selector_events.py (line 54)
2024-01-31 22:11:20,833::warpinator: Server: ACTIVE
2024-01-31 22:11:20,834::warpinator: >>> Discovery: new remote: DESKTOP-9OEOGQI (192.168.1.5:42000)
2024-01-31 22:11:20,834::warpinator::DEBUG: Registering with DESKTOP-9OEOGQI (192.168.1.5:42001) - api version 2 -- remote_registration.py (line 204)
2024-01-31 22:11:20,834::warpinator::DEBUG: remote-registration-thread-DESKTOP-9OEOGQI-192.168.1.5:42001-DESKTOP-9OEOGQI-2cfd2206-7106-4322-ae21-cd9c13db43ca -- remote_registration.py (line 209)
2024-01-31 22:11:20,834::warpinator::DEBUG: Remote: Attempting to register DESKTOP-9OEOGQI (192.168.1.5) -- remote_registration.py (line 225)
2024-01-31 22:11:20,834::warpinator::DEBUG: UI: start discovery timer (no remotes) -- warpinator.py (line 957)
2024-01-31 22:11:21,038::warpinator::DEBUG: Remote: Attempting to connect to DESKTOP-9OEOGQI (192.168.1.5) - api version 2 -- remote.py (line 198)
2024-01-31 22:11:21,040::warpinator::DEBUG: Remote: waiting for duplex from 'DESKTOP-9OEOGQI' -- remote.py (line 350)
2024-01-31 22:11:21,046::warpinator::DEBUG: Remote: DESKTOP-9OEOGQI is now RemoteStatus.AWAITING_DUPLEX **** -- remote.py (line 313)
2024-01-31 22:11:30,770::warpinator::CRITICAL: Problem while awaiting duplex response - api version 2: StatusCode.DEADLINE_EXCEEDED - Server timed out while waiting for his corresponding remote to connect back to you. -- remote.py (line 258)
2024-01-31 22:11:30,770::warpinator::DEBUG: Remote: DESKTOP-9OEOGQI is now RemoteStatus.UNREACHABLE **** -- remote.py (line 313)
2024-01-31 22:11:40,854::warpinator::DEBUG: Remote: waiting for duplex from 'DESKTOP-9OEOGQI' -- remote.py (line 350)
2024-01-31 22:11:40,854::warpinator::DEBUG: Remote: DESKTOP-9OEOGQI is now RemoteStatus.AWAITING_DUPLEX **** -- remote.py (line 313)