My minecraft server says it won't bind to port and I tried everything

When I created to server it worked fine. But then the next day when I tried to start the server, it did this:

This is what is says when i try to start the srver

I tried lots of things. When I typed netstat -a -o and I couldn't find any thing that used the same port as my server [which is 25565]. I shut down my PC and changed the worlds. But I couldn't find a solution.

Finally I decided to just delete the server and make a new one. This worked for a while but then the next day it did the same exact thing.

The guide i used to make my sever is

I don't know if the guide is wrong or something but this is really annoying.

I am playing the server in 1.15.2


Solution 1:

The server can't bind to the port, because it can't bind to the specified IP address in the first place.

The guide suggests to hardcode your local ip address in the server.properties file. Your server fails to bind the next day, because your IP is probably dynamic on your network, and it changed.

You could update the value of server-ip every time, or you could just leave the value empty in the server.properties file, for automatic IP detection.

server-ip=

The player should set this if they want the server to bind to a particular IP. It is strongly recommended that the player leaves server-ip blank.
Source

Solution 2:

The error means the server could not start because there is already a server using the specified port (specified in "server.properties").

Try changing your port in "server.properties" and make sure not to start two servers with the same port - you could have accidentally started the server twice.

Also, make sure your computer has 4GB of free RAM as not having enough RAM could cause more issues.