Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Peers are not paired in next mode after one day of system uptime. #365

Open
ConnorBP opened this issue Oct 31, 2023 · 3 comments
Open

Peers are not paired in next mode after one day of system uptime. #365

ConnorBP opened this issue Oct 31, 2023 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@ConnorBP
Copy link

ConnorBP commented Oct 31, 2023

Very odd bug. Was tripping me out the other day and would definitely get in the way of running a server. I don't know the exact cause but when you leave the server on for a day the matchbox server stops pairing.

2023-10-31T14:50:12.487593Z  INFO Matchbox Signaling Server: 0.0.0.0:3536
2023-10-31T14:52:16.398687Z  INFO Client connected 127.0.0.1:57080: PeerId(a54f50ee-b9a4-4c1e-ab18-554804117039)
2023-10-31T14:52:22.059235Z  INFO Client connected 127.0.0.1:57081: PeerId(eaac19c4-4c3d-41eb-85d7-25ec5c755eed)
2023-10-31T14:52:22.062397Z  INFO a54f50ee-b9a4-4c1e-ab18-554804117039 -> "{\"NewPeer\":\"eaac19c4-4c3d-41eb-85d7-25ec5c755eed\"}"

as shown in the logs above the peers get connected but then on your clients it still says no one is paired with you in your lobby. The weirdest part is that when you restart the server program, it does not resolve itself. Only a full system reboot solves the issue. I imagine this must mean it has something to do with some kind of system time variable overflowing or something?

Ran into this issue mid extreme violence tutorial and it caused me to go backtrack so much to find the issue only to then reboot for a windows update and suddenly it works again. Same issue popped up today after I left my laptop to sleep overnight. I will try and look in the server code to see what might be the cause let me know if anyone else finds out. On a similar note, none of the games embedded in the tutorial work anymore maybe that's related to this.

EDIT: I should mention this issue is on both the latest release and current main branch commit fe95d91

Also it looks like internally the server makes a pair, but then for whatever reason the clients are never notified of this pairing.

@ConnorBP
Copy link
Author

Update: upon further testing it seems it might be a client side issue. I tried installing the matchbox server on a vps without rebooting and the same issue happened. I will now try and reboot and see if it starts working again. My current theories are maybe websocket port handles are not being released and the browser runs out of ports to give for web sockets, or some variable relating to time from the browser or client code is overflowing and breaking the handshake.

@simbleau
Copy link
Collaborator

@ConnorBP update? Logic issue or matchbox issue?

@ConnorBP
Copy link
Author

@ConnorBP update? Logic issue or matchbox issue?

I have not been able to find the source of this yet. It pops up unexpectedly when trying to connect peers on only certain subnets or external networks. I suspect something along the network is breaking the connection and matchbox or ggrs is not handling it correctly and just gets stuck waiting for the NewPeer event.

@simbleau simbleau added the help wanted Extra attention is needed label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants