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

Server error which MCEC is killed and then reopened #3

Open
wayner9 opened this Issue Jan 21, 2018 · 1 comment

Comments

Projects
None yet
1 participant
@wayner9

wayner9 commented Jan 21, 2018

It seems that if the MCEC application is closed while a server is active then when you restart MCEC with the server function enabled that you get an error. It reports:

Server: Error
Server: Stopped

If I first disable the server and then exit the application this problem does not occur. If I change the port to a different number then the server can successfully run. This behavior appears to be the same in both Win7 and Win10.

Maybe the port is somehow locked?

Any ideas how to fix this? I have not tried rebooting to see if that fixes the problem, but that shouldn't have to be done.

@wayner9

This comment has been minimized.

Show comment
Hide comment
@wayner9

wayner9 Jan 21, 2018

Some further work on this. when I use netstat I can see that for some reason some previous ports for MCEC are still listening. Here is the output of netstat -a -n -o
TCP 0.0.0.0:5150 0.0.0.0:0 LISTENING 37296
TCP 0.0.0.0:5155 0.0.0.0:0 LISTENING 46952
TCP 0.0.0.0:5156 0.0.0.0:0 LISTENING 17796
TCP 0.0.0.0:5160 0.0.0.0:0 LISTENING 17320

So it looks like MCEC is not nicely closing the port when it is closed with the server active. This does NOT happen when you disable to server before closing MCEC. I can manually kill these tasks using a command such as "taskkill /f /im 17320".

It seems like after a while these processes will die off but it is hard to figure out how long this timeout is.

Why is this issue a problem? I was trying to figure out how to do some changes to the commands file. I believe that you have to restart MCEC to get it to reload the commands file. So if you close and reopen MCEC then you have this problem. I now know that you should disable the server before stopping but that isn't obvious. Is it documented anywhere? I didn't see it.

wayner9 commented Jan 21, 2018

Some further work on this. when I use netstat I can see that for some reason some previous ports for MCEC are still listening. Here is the output of netstat -a -n -o
TCP 0.0.0.0:5150 0.0.0.0:0 LISTENING 37296
TCP 0.0.0.0:5155 0.0.0.0:0 LISTENING 46952
TCP 0.0.0.0:5156 0.0.0.0:0 LISTENING 17796
TCP 0.0.0.0:5160 0.0.0.0:0 LISTENING 17320

So it looks like MCEC is not nicely closing the port when it is closed with the server active. This does NOT happen when you disable to server before closing MCEC. I can manually kill these tasks using a command such as "taskkill /f /im 17320".

It seems like after a while these processes will die off but it is hard to figure out how long this timeout is.

Why is this issue a problem? I was trying to figure out how to do some changes to the commands file. I believe that you have to restart MCEC to get it to reload the commands file. So if you close and reopen MCEC then you have this problem. I now know that you should disable the server before stopping but that isn't obvious. Is it documented anywhere? I didn't see it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment