Failed to bind Port Error

I receive this error when starting the server

**** FAILED TO BIND TO PORT!
[21:42:10 WARN]: The exception was: java.net.BindException: Cannot assign requested address: bind
[21:42:10 WARN]: Perhaps a server is already running on that port?

I have looked at other forums and tried using other methods like checking my port forwarding to make sure that it is 25565. Didn’t change anything. All firewalls are off even in my router. Restarted computer multiple time and there is no other servers running on the network.

I am a noob so please help

Thx

Another program on your system is using that port, apparently; (either that or you’re using some firewall software which isn’t too impressed), depending on your OS, you’ll need to use a tool such as lsof -i on *nix based OSes (MacOS/Linux), or on windows, I believe that there was a command called netstat, but I don’t really deal with windows so can’t point you too much there

1 Like

Yes I have tried that between restarts. I used the netstat command and there was nothing showing up.

Apparently in my sleep I misread this, that means that the IP address you’ve got in server.properties is invalid, generally, you wanna leave blank when self hosting unless you specifically want to bind on a specific address

Yes I am hosting this for my friends and I so how could I make my IP valid? I have just looked up on google “whats my Ip” and used that. That had worked for my previous minecraft server but for some reason not this one.

Because you’re self hosting and are behind NAT, meaning that your IP address is assigned by your router (likely some 192.168.x.x IP); Just leave server-ip in server.properties blank

I have tried this and the server works. But I want to make my friends able to join the server/

OMG it worked I am so sorry for the confusion. Thank you @electronicboy so much!

1 Like

Try this, click OK to dismiss the error message above. Next, click the Device Manger button on the System Settings tab. (Alternately you can open the Device Manger by going into Windows Control Panel and clicking on System, then clicking on Device Manager in the left side panel.)

It really is very easy, you just have to assign a fixed ipv4. For example 192.168.1.36 depending on the router, and place that value in the server properties. for example server.properties.

And anyone can join me via my public IP? BTW what does

Because you’re self-hosting and are behind NAT, meaning that your IP address is assigned by your router (likely some 192.168.x.x IP);

mean I lost a few brain cells. Yes, we do, but what does that change. You’re just answering a nonexisting question.

So do I put in my public or private IP and what do you mean by :
“depending on the router”
“for example server.properties.”

“depending on the router” - different routers use different IP ranges for the local network by default.

So do I put in my public or private (HOST COMPUTER) IP in the server.properties OR DO I LEAVE IT BLANK? I NEED TO CONNECT TO MY OTHER COMPUTER(SERVER) ON MY NETWORK! (limited to 3 replies) And anyone can join me via my public IP?

Drop the caps, I literally said to keep it blank.

Hi, Im so sorry for repeating the questioon but when i leave “server ip” my friends cant join on server. So what can u advice me? i tried wrote ipv4 ip in “server ip” and my friend still cant join.

if ur using wifi, your ipv4 may change after reconnecting ( for example if u turn off pc/laptop it may connect with different ipv4). check server IP if it is correct.
if u dont want to get same problem again u should reserve ip in ur router settings.

P.S.
u can check ur ipv4 in cmd by typing ipconfig commant