-
Notifications
You must be signed in to change notification settings - Fork 263
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
[Bug]: Errors and bad state when starting server on unavailable port #4519
Comments
On further experimentation (not sure why I didn't try this already), this problem only appears when certain port numbers are chosen for the server, including the default port number |
Is it possible that some other application is using 51234 port as a the
source port for a connection?
…On Sun, Dec 3, 2023 at 8:24 PM Cora Grant ***@***.***> wrote:
On further experimentation (not sure why I didn't try this already), this
problem only appears when certain port numbers are chosen for the server,
including the default port number 51234 but also including e.g. 51235 and
51236. I'm not sure why, since according to netstat I do not have any
applications listening on these ports. It's also not an issue with
ephemeral port numbers in general, as 54321 works fine.
—
Reply to this email directly, view it on GitHub
<#4519 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALWDPKL7W3L62VTRP53VMDYHTNY3AVCNFSM6AAAAABAFAOCKKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMZXGU4DSOBWHE>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
--
Marco Bizzarri
|
Again using My current thoughts:
|
Thought (2) is very important. It's too easy to accidentally reuse a port by accident - I've done it a lot - and we should be handle this case gracefully. And instead of three technical errors, there should be one clear and user-friendly message displayed. For diagnosing your particular issue, can you share how you're using |
I've gone back to investigate this again today, but unfortunately can't reproduce it: starting a server on the default port For future reference, Setting aside my elusive issue with the default port number for now, I think I'd like to either close this issue and open a new one focused on the "glitch state" and errors from trying to start a server on an already-used port, or rewrite this issue's title/OP to be about that instead. Which would be preferred? I'm leaning towards the first one (new issue). |
Since the bulk of the OP applies regardless, let's just keep using this bug report to track it. |
I've updated the issue title and OP. Hopefully the conversation is not too confusing for anyone coming here in the future. |
Possibly related to #3790. |
Describe the Bug
When attempting to start a server using a port number that is already in use, the app shows multiple errors and enters a strange "half-started" state that can only be fixed by restarting the app (as attempting to shut down the server gives another error).
To Reproduce
netstat -nq -p tcp
can be used to find one)When I do this, I immediately get the following three error popups in succession:
The map view then becomes solid black, and the app enters a state where it looks like it's connected to a server as "Anonymous User" instead of the name I entered in the Start Server dialog, and does not have GM privileges (most menu options are disabled). When I start a second instance of MapTool, a server appears in the LAN list as the username I entered (and in the RPTools.net list if I enter an alias), but trying to connect gives a "connection refused" error immediately.
When I choose File > Disconnect from Server..., I get a confirmation window saying I'm running a server and that this will disconnect all clients. If I confirm this, I get the following error popup:
After this, the message "You have disconnected." appears in the chat pane, but the app still thinks I'm connected and the start/connect options are disabled; I can "Disconnect from Server" repeatedly and each time the above error comes up. The only way to escape this state is to close the app entirely.
Expected Behaviour
When trying to start a server on an unavailable port, the app should give an error message explaining this, and not proceed any further.
MapTool Info
1.13.2 (Windows, MSI, fresh install)
Desktop
Windows 10 version 22H2 (build 19045.3693)
Additional Context
Here is my "Gather Debug Information", with some data redacted:
The text was updated successfully, but these errors were encountered: