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

Strange "**** FAILED TO BIND TO PORT!" Error #14

Closed
cblake18 opened this issue May 4, 2020 · 3 comments
Closed

Strange "**** FAILED TO BIND TO PORT!" Error #14

cblake18 opened this issue May 4, 2020 · 3 comments

Comments

@cblake18
Copy link

cblake18 commented May 4, 2020

Hi gekigek99, I came across this script yesterday and was excited to see it was exactly what I was looking for with the server I'm currently hosting.

However, I'm having an issue when trying to join the server after launching the script. As soon as I attempt to connect, the error message:

"**** FAILED TO BIND TO PORT!
[00:23:44] [Server thread/WARN]: The exception was: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: Address already in use
[00:23:44] [Server thread/WARN]: Perhaps a server is already running on that port?"

comes up and stops the server immediately.

What I tryed:

I have made sure that no other instances of the server are running
I have made sure that nothing else is assigned to that port.
I have also tried using several different ports
I have edited the ports within the server.properties file as well as the python script.

What I noticed:

The server also runs flawlessly when I do not run it with the python script and there is no error message.

Any suggestions would be greatly appreciated. Thank you!

@gekigek99
Copy link
Member

check that only one python script is running at a time.

use this command to check what port are being used with this:
netstat -tulpn | grep LISTEN
you should find a what program is using that port that the python script is trying to bind to.

update me on your findings

@cblake18
Copy link
Author

cblake18 commented May 12, 2020

Thanks for the reply man. It turns out I shoulda just done a little research on the difference between the listener and target port.

I had them set as the same thing (25565) which obviously caused me to get the “failed to bind to port” error.
Once I changed them and set the listener and target IP to my local IP, the script worked great.

Maybe someone else can learn from my stupid mistake lol. Thanks again.

@gekigek99
Copy link
Member

gekigek99 commented May 12, 2020

no worries!
good that you solved the problem!
(I hate this very silly problems that end up wasting your entire day ahahah)
I modified your question so that it's easyer to look up also for other people

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants