[BDS-2823] Network port occupied, can't start server Created: 17/Jan/20  Updated: 06/Mar/20  Resolved: 05/Mar/20

Status: Resolved
Project: Bedrock Dedicated Server
Affects Version/s: 1.14.0.9
Fix Version/s: None

Type: Bug
Reporter: Phillip Aaron Goettsch Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None
Environment:

Windows 10 Home version 1903 OS build 18362.592


Attachments: File server.properties    

 Description   

Unable to launch BDS in windows 10. Version is listed as 1.14.1.4 though this bug report does not show that as a released version. I have confirmed that the default port is not being used by any other services. I have opened the port in windows firewall.

After starting the .exe the following output is received:

NO LOG FILE! - setting up server logging...
NO LOG FILE! - [2020-01-17 11:11:11 INFO] Starting Server
NO LOG FILE! - [2020-01-17 11:11:11 INFO] Version 1.14.1.4
NO LOG FILE! - [2020-01-17 11:11:11 INFO] Session ID efefd3a0-36e5-4a10-bc1d-ed536e9f4079
NO LOG FILE! - [2020-01-17 11:11:11 INFO] Level Name: Bedrock level
NO LOG FILE! - [2020-01-17 11:11:11 INFO] Game mode: 0 Survival
NO LOG FILE! - [2020-01-17 11:11:11 INFO] Difficulty: 2 NORMAL
NO LOG FILE! - [2020-01-17 11:11:13 ERROR] Network port occupied, can't start server.



 Comments   
Comment by James Dessart [ 06/Mar/20 ]

@IonicEcko Removing the quotation marks does allow it to work. Thanks!

Comment by IonicEcko [ 05/Mar/20 ]

Always good when its the simple stuff (but also not because you want to kick yourself).

Happy Minecrafting!

Ionic

Comment by Phillip Aaron Goettsch [ 05/Mar/20 ]

Holy smokes! Yes, it just needed to be run as admin. I don't have any specific accounts on the computer, so I rarely think about this. Thank you for the help. I bet it would have worked fine some time ago if I had just put the folder somewhere else. That's what I get for trying to be organized.

Comment by IonicEcko [ 05/Mar/20 ]

skwirl42 you shouldn't be encasing your level name with inverted commas, does it work if you remove those?

Comment by IonicEcko [ 05/Mar/20 ]

@Phillip - I noticed you're running the server from C:\Program Files (x86)\, have you confirmed that the user running the software has permission to create and modify files in that location without the need to elevate? The error in your screenshot appears to be a write error.

Can you try right clicking bedrock_server.exe and clicking "Run as Administrator"

Ionic

Comment by James Dessart [ 05/Mar/20 ]

Did a bit more experimenting and it seems in 1.14.30.2 when I had double quotes in the level name setting it wouldn't start up. Seems it's not a fan of quoted strings, although I can't imagine why that would affect the network connection.

With 1.14.32.1 I got the following output when I tried to put double quotes in the level name, so maybe this is happening in 1.14.30.2 and just isn't showing all the errors:

NO LOG FILE! - setting up server logging...
[2020-03-04 21:35:41 INFO] Starting Server
[2020-03-04 21:35:41 INFO] Version 1.14.32.1
[2020-03-04 21:35:41 INFO] Session ID 3ed5e3a9-f4ec-4a56-b63f-79a463349d98
[2020-03-04 21:35:41 INFO] Level Name: "Bedrock level"
[2020-03-04 21:35:41 INFO] Game mode: 0 Survival
[2020-03-04 21:35:41 INFO] Difficulty: 1 EASY
[2020-03-04 21:35:41 INFO] opening worlds/"Bedrock level"/db
[2020-03-04 21:35:41 WARN] LevelDB worlds/"Bedrock level"/db status NOT OK(IO error: _wfopen_s failed to open file for: WriteTruncateCreateBinary(wb). ErrorCode: 22 - 'Invalid argument'). Trying repair.
[2020-03-04 21:35:41 ERROR] Failed to open LevelDB!
[2020-03-04 21:35:41 ERROR] IO error: _wfopen_s failed to open file for: WriteTruncateCreateBinary(wb). ErrorCode: 22 - 'Invalid argument'
[2020-03-04 21:35:41 ERROR] Network port occupied, can't start server.

Comment by James Dessart [ 05/Mar/20 ]

I commented out the entire server and level name lines from the file, not just my changes to those settings. I've attached my server.properties file, if you want to give it a try.

Comment by Phillip Aaron Goettsch [ 04/Mar/20 ]

James Dessart,

Removing the names made no difference in my attempts. Thank you for the suggestion however. keeping my fingers crossed.

Comment by Phillip Aaron Goettsch [ 04/Mar/20 ]

IonicEcko,

I have not adjusted anything in windows at that level. I tried the new version for BDS, but continue to have issues. It is even generating some new problems, but I think those stem from not being able to make a connection. I have not tried 1.14.32.1 in safe mode yet, so I am not sure what you hope to gain from a copy of my directory as it is straight default from the download. I have attached it though. I also included a screen shot of the BDS window showing the errors.

Here is a link to the zipped file in my dropbox: https://www.dropbox.com/s/lv9wm3xi6nl34s8/BDS%201.14.32.1.zip?dl=0

 

Comment by IonicEcko [ 04/Mar/20 ]

In that same vein, on your Windows machine do you have IPv6 disabled or anything not "out of the box" like that?

Can you try 1.14.32.1 and see if the issue is still present.

If so, can you zip the entire server directory and share it so I can chuck it on my WS2019 box that has my other servers and see how it behaves? I've never experienced it not launch like this.

Comment by James Dessart [ 01/Mar/20 ]

An update, after reading some of the comments on https://bugs.mojang.com/browse/BDS-752 I tried removing the server and level name from my server.properties and suddenly it runs fine for me. Apart from not having a server name.

Comment by James Dessart [ 01/Mar/20 ]

I've come across this issue, as well. I imagine it's the same Windows processes using it on my machine, but running in Safe Mode is not an option for me. I'm attempting to run bedrock server version 1.14.30.2 with default network settings, on Windows 10 Home, Version 10.0.18362.

I have a Java server running, so I tried running BDS without, but no luck.

Comment by Phillip Aaron Goettsch [ 08/Feb/20 ]

I’d be happy to work with you on this. I am running complete defaults. I did notice that the problematic ports aren’t always the same number. For your information I encounter this issue on two separate machines.

Comment by IonicEcko [ 07/Feb/20 ]

Hey Phillip,

Are you using the default ports in the server.properties file or alternate ports? I have 3 servers (running on 19132, 19134 and 19136 IPv4) all on the same Windows box that haven't had any issues so it might help the devs if we can get some more information for them on your particular setup.

Ionic

Comment by Phillip Aaron Goettsch [ 07/Feb/20 ]

Looks like the issue is continuing in 1.14.2.1. I am able to get BDS to run in safemode with networking enabled and have had a stable server running for more than a week. 

Comment by IonicEcko [ 07/Feb/20 ]

Hi Phillip,

Are you still having this issue? I run numerous Bedrock servers on a Windows box and haven't seen this issue. Not to say it doesn't exist, just working out if it is environment specific for you or in some way random.

Comment by Phillip Aaron Goettsch [ 21/Jan/20 ]

Update to my issue.

After speaking about the problem on the Discord server, I attempted to load the BDS while in Windows Safe Mode with Networking. Doing resulted in expected execution of the program. I noted the following information while the BDS was active:

  1. BDS requires ports 49664 and 49665 for UDP besides the editable ports from the server.properties file.
  2. The ports 49664 and 49665 are claimed by Windows Start-up Application (WinInit.exe) and Local Security Authority Process (lsass.exe). These two application are only using TCP.
  3. During a normal start-up windows will not allow these ports to be used by BDS, but does allow it during Safe Mode start-up.
  4. These applications cannot be terminated without shutting down Windows OS.
  5. BDS does not allow for the use of different ports in this portion of the application.

 

Generated at Sat Jan 11 07:23:04 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.