<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sat Jan 11 07:15:14 UTC 2025

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Mojang Studios Jira</title>
    <link>https://bugs.mojang.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en</language>    <build-info>
        <version>9.12.2</version>
        <build-number>9120002</build-number>
        <build-date>10-01-2024</build-date>
    </build-info>


<item>
            <title>[BDS-752] Bedrock server fails to bind (ip4 ipv6 port reported as 0)</title>
                <link>https://bugs.mojang.com/browse/BDS-752</link>
                <project id="11700" key="BDS">Bedrock Dedicated Server</project>
                    <description>&lt;p&gt;Bedrock server aborts at start:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;~ $ ./bedrock_server&#160;
NO LOG FILE! - setting up server logging...
[2019-04-06 19:27:55 INFO] Starting Server
[2019-04-06 19:27:55 INFO] Version 1.10.0.7
[2019-04-06 19:27:55 INFO] Level Name: Bedrock level
[2019-04-06 19:27:55 INFO] Game mode: 0 Survival
[2019-04-06 19:27:55 INFO] Difficulty: 1 EASY
[2019-04-06 19:27:59 INFO] IPv4 supported, port: 0
[2019-04-06 19:27:59 INFO] IPv6 supported, port: 0
[2019-04-06 19:27:59 ERROR] Network port occupied, can&apos;t start server.
Quit correctly
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;Snippet of the strace below. ipv6 was disabled on this system, other daemons including OpenVPN bind to UDP ports without issue&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;bind(7&amp;lt;UDP:[22049]&amp;gt;, {sa_family=AF_INET, sin_port=htons(19132), sin_addr=inet_addr(&lt;span class=&quot;code-quote&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;)}, 16) = 0
setsockopt(7&amp;lt;UDP:[22049]&amp;gt;, SOL_SOCKET, SO_RCVBUF, [262144], 4) = 0
setsockopt(7&amp;lt;UDP:[22049]&amp;gt;, SOL_SOCKET, SO_LINGER, {l_onoff=0, l_linger=0}, 8) = 0
setsockopt(7&amp;lt;UDP:[22049]&amp;gt;, SOL_SOCKET, SO_SNDBUF, [16384], 4) = 0
setsockopt(7&amp;lt;UDP:[22049]&amp;gt;, SOL_SOCKET, SO_BROADCAST, [1], 4) = 0
getsockname(7&amp;lt;UDP:[22049]&amp;gt;, {sa_family=AF_INET, sin_port=htons(19132), sin_addr=inet_addr(&lt;span class=&quot;code-quote&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;)}, [128-&amp;gt;16]) = 0
setsockopt(7&amp;lt;UDP:[22049]&amp;gt;, SOL_IP, IP_HDRINCL, [0], 4) = -1 ENOPROTOOPT (Protocol not available)
getsockname(7&amp;lt;UDP:[22049]&amp;gt;, {sa_family=AF_INET, sin_port=htons(19132), sin_addr=inet_addr(&lt;span class=&quot;code-quote&quot;&gt;&quot;0.0.0.0&quot;&lt;/span&gt;)}, [128-&amp;gt;16]) = 0
sendto(7&amp;lt;UDP:[22049]&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;\0\0\0\0&quot;&lt;/span&gt;, 4, 0, {sa_family=AF_INET, sin_port=htons(19132), sin_addr=inet_addr(&lt;span class=&quot;code-quote&quot;&gt;&quot;127.0.0.1&quot;&lt;/span&gt;)}, 16) = 4
socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP) = -1 EAFNOSUPPORT (Address family not supported by protocol)
close(7&amp;lt;UDP:[22049]&amp;gt;) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; = 0
write(1&amp;lt;/dev/pts/0&amp;lt;&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; 136:0&amp;gt;&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;[2019-04-06 19:23:51 INFO] IPv4 &quot;&lt;/span&gt;..., 51[2019-04-06 19:23:51 INFO] IPv4 supported, port: 0
) = 51
write(3&amp;lt;/home/minecraft/Debug_Log.txt&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;[2019-04-06 19:23:51 INFO] IPv4 &quot;&lt;/span&gt;..., 51) = 51
write(1&amp;lt;/dev/pts/0&amp;lt;&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; 136:0&amp;gt;&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;[2019-04-06 19:23:51 INFO] IPv6 &quot;&lt;/span&gt;..., 51[2019-04-06 19:23:51 INFO] IPv6 supported, port: 0
) = 51
write(3&amp;lt;/home/minecraft/Debug_Log.txt&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;[2019-04-06 19:23:51 INFO] IPv6 &quot;&lt;/span&gt;..., 51) = 51
fcntl(4&amp;lt;/home/minecraft/worlds/Bedrock level/db/LOCK&amp;gt;, F_SETLK, {l_type=F_UNLCK, l_whence=SEEK_SET, l_start=0, l_len=0}) = 0
close(4&amp;lt;/home/minecraft/worlds/Bedrock level/db/LOCK&amp;gt;) = 0
close(6&amp;lt;/home/minecraft/worlds/Bedrock level/db/MANIFEST-000033&amp;gt;) = 0
close(5&amp;lt;/home/minecraft/worlds/Bedrock level/db/000035.log&amp;gt;) = 0
munmap(0x7f4830a67000, 190) &#160; &#160; &#160; &#160; &#160; &#160; = 0
munmap(0x7f4830a3b000, 190) &#160; &#160; &#160; &#160; &#160; &#160; = 0
write(1&amp;lt;/dev/pts/0&amp;lt;&lt;span class=&quot;code-object&quot;&gt;char&lt;/span&gt; 136:0&amp;gt;&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;[2019-04-06 19:23:51 ERROR] Netw&quot;&lt;/span&gt;..., 71[2019-04-06 19:23:51 ERROR] Network port occupied, can&apos;t start server.
) = 71
write(3&amp;lt;/home/minecraft/Debug_Log.txt&amp;gt;, &lt;span class=&quot;code-quote&quot;&gt;&quot;[2019-04-06 19:23:51 ERROR] Netw&quot;&lt;/span&gt;..., 71) = 71
munmap(0x7f482dc28000, 299008)&#160; &#160; &#160; &#160; &#160; = 0
&#160;
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment>Clear Linux&lt;br/&gt;
&lt;br/&gt;
~ $ java -version&lt;br/&gt;
&lt;br/&gt;
openjdk version &amp;quot;1.8.0-internal&amp;quot;&lt;br/&gt;
&lt;br/&gt;
OpenJDK Runtime Environment (build 1.8.0-internal-_2019_03_08_14_35-b00)&lt;br/&gt;
&lt;br/&gt;
OpenJDK 64-Bit Server VM (build 25.71-b00, mixed mode)&lt;br/&gt;
&lt;br/&gt;
&amp;#xA0;&lt;br/&gt;
&lt;br/&gt;
Bedrock Server&amp;#xA0; &amp;#39;1.10.0.7&amp;#39;</environment>
        <key id="234396">BDS-752</key>
            <summary>Bedrock server fails to bind (ip4 ipv6 port reported as 0)</summary>
                <type id="1" iconUrl="https://bugs.mojang.com/secure/viewavatar?size=xsmall&amp;avatarId=18903&amp;avatarType=issuetype">Bug</type>
                                    <status id="5" iconUrl="https://bugs.mojang.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="7">Invalid</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="omkhar">Omkhar</reporter>
                        <labels>
                    </labels>
                <created>Sun, 7 Apr 2019 01:33:45 +0200</created>
                <updated>Fri, 7 Feb 2020 17:07:11 +0100</updated>
                            <resolved>Fri, 7 Feb 2020 17:07:11 +0100</resolved>
                                    <version>1.8.1.2</version>
                                                            <votes>2</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="616046" author="troy.hatchard" created="Wed, 18 Dec 2019 22:46:46 +0100"  >&lt;p&gt;I had this issue and it was caused by the server not being shut down properly. My solution was to find the process ID and kill it. In linux this should look like:&#160;&lt;/p&gt;

&lt;p&gt;Command:&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;ps -ejH | grep bedrock
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Output:&#160;&lt;/p&gt;

&lt;p&gt;1996 1996 1810 pts/1 00:00:08 bedrock_server&lt;/p&gt;

&lt;p&gt;This is your bedrock server process. So to stop this you just kill the process using the PID, which in my case is 1996.&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;kill 1996&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then restart your server again and it should work just fine&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="585987" author="krolik" created="Tue, 24 Sep 2019 13:13:39 +0200"  >&lt;p&gt;Probably had the same problem with 1.12.1.1 on debian 10 VM within Windows 10, but solved it by using sudo command.&lt;/p&gt;</comment>
                            <comment id="564598" author="vjunetxuuftofi" created="Thu, 11 Jul 2019 04:11:36 +0200"  >&lt;p&gt;I am having the same issue with 1.12.0.28 on Ubuntu 18.04. Removing the level-name from the config file does not work for me, and I am running from the terminal. My ipv4 and ipv6 ports are different.&lt;/p&gt;</comment>
                            <comment id="559384" author="rossco" created="Mon, 24 Jun 2019 06:53:12 +0200"  >&lt;p&gt;I had this same error with v1.11.4.&#160; In my case, the error was not related to the message displayed.&#160; I had specified the name of a world in the &lt;tt&gt;server.properties&lt;/tt&gt; file (&lt;tt&gt;level-name=My World&lt;/tt&gt;). When I removed the &lt;tt&gt;level-name&lt;/tt&gt; line from my config, the server ran without problem.&lt;/p&gt;

&lt;p&gt;&lt;del&gt;I&apos;m running this in a docker image and on further inspection, I noticed that the folder names mapped through from my Windows machine had extra single quotes surrounding the folder names. I have to investigate further as to why this is happening, but is probably related to Docker itself.&lt;/del&gt;&lt;/p&gt;</comment>
                            <comment id="558763" author="robotnik" created="Fri, 21 Jun 2019 01:09:40 +0200"  >&lt;p&gt;I&apos;m having the same issue as well. The server says the port is occupied on startup, even though the lsof command does not show anything occupying the port&lt;/p&gt;</comment>
                            <comment id="551201" author="okmaster" created="Mon, 27 May 2019 12:18:53 +0200"  >&lt;p&gt;If you enable the socket option &quot;IPV6_V6ONLY&quot; (see&#160;&lt;a href=&quot;https://serverfault.com/a/408670&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://serverfault.com/a/408670&lt;/a&gt;) ipv4 and ipv6 can use the same ports on linux and the error is gone.&lt;/p&gt;</comment>
                            <comment id="550605" author="omkhar" created="Sat, 25 May 2019 04:39:39 +0200"  >&lt;p&gt;As entertaining as some of these suggestions are, I just strace&apos;d the start up again, this seems to be the relevant lines:&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;tt&gt;socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP) = 7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;&lt;/tt&gt;&lt;tt&gt;bind(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, {sa_family=AF_INET, sin_port=htons(19134), sin_addr=inet_addr(&quot;0.0.0.0&quot;)}, 16) = 0&lt;/tt&gt;&lt;tt&gt;setsockopt(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, SOL_SOCKET, SO_RCVBUF, &lt;span class=&quot;error&quot;&gt;&amp;#91;262144&amp;#93;&lt;/span&gt;, 4) = 0&lt;/tt&gt;&lt;tt&gt;setsockopt(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, SOL_SOCKET, SO_LINGER, {l_onoff=0, l_linger=0}, 8) = 0&lt;/tt&gt;&lt;tt&gt;setsockopt(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, SOL_SOCKET, SO_SNDBUF, &lt;span class=&quot;error&quot;&gt;&amp;#91;16384&amp;#93;&lt;/span&gt;, 4) = 0&lt;/tt&gt;&lt;tt&gt;setsockopt(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, SOL_SOCKET, SO_BROADCAST, &lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;, 4) = 0&lt;/tt&gt;&lt;tt&gt;getsockname(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, {sa_family=AF_INET, sin_port=htons(19134), sin_addr=inet_addr(&quot;0.0.0.0&quot;)}, &lt;span class=&quot;error&quot;&gt;&amp;#91;128-&amp;gt;16&amp;#93;&lt;/span&gt;) = 0&lt;/tt&gt;&lt;tt&gt;&lt;font color=&quot;#FF0000&quot;&gt;setsockopt(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, SOL_IP, IP_HDRINCL, &lt;span class=&quot;error&quot;&gt;&amp;#91;0&amp;#93;&lt;/span&gt;, 4) = -1 ENOPROTOOPT (Protocol not available)&lt;/font&gt;&lt;/tt&gt;&lt;tt&gt;getsockname(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, {sa_family=AF_INET, sin_port=htons(19134), sin_addr=inet_addr(&quot;0.0.0.0&quot;)}, &lt;span class=&quot;error&quot;&gt;&amp;#91;128-&amp;gt;16&amp;#93;&lt;/span&gt;) = 0&lt;/tt&gt;&lt;tt&gt;sendto(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;, &quot;\0\0\0\0&quot;, 4, 0, {sa_family=AF_INET, sin_port=htons(19134), sin_addr=inet_addr(&quot;127.0.0.1&quot;)}, 16) = 4&lt;/tt&gt;&lt;tt&gt;&lt;font color=&quot;#FF0000&quot;&gt;socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP) = -1 EAFNOSUPPORT (Address family not supported by protocol)&lt;/font&gt;&lt;/tt&gt;&lt;tt&gt;close(7&amp;lt;UDP:&lt;span class=&quot;error&quot;&gt;&amp;#91;33556&amp;#93;&lt;/span&gt;&amp;gt;) &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; = 0&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="550216" author="microondas222" created="Thu, 23 May 2019 19:24:58 +0200"  >&lt;p&gt;I had this problem because I had the port for both ipv4 and ipv6 set to the same port. I changed the ports to be different and then it would work. This is on Ubuntu.&lt;/p&gt;</comment>
                            <comment id="545853" author="beardinasuit" created="Sat, 11 May 2019 20:35:05 +0200"  >&lt;p&gt;Same thing here.&lt;/p&gt;

&lt;p&gt;Tried v1.11.2.1 on a Ubuntu 18.04.02 VM within Windows 10 and it works fine.&lt;/p&gt;

&lt;p&gt;When using docker on Windows with a Ubuntu 18.04.02, I&apos;m getting&#160; &quot;Network port occupied, can&apos;t start server.&quot;&lt;/p&gt;</comment>
                            <comment id="545772" author="stijnm" created="Sat, 11 May 2019 16:15:02 +0200"  >&lt;p&gt;I was seeing this error in Ubuntu 18.04.2 when using a desktop shortcut file to run bedrock server 1.11.2.1. Interestingly, exactly the same shortcut settings worked (except for the path) for the 1.10.0.7 server.&lt;/p&gt;

&lt;p&gt;Without changing a thing, I was able to run the 1.11.2.1 server by just launching it manually, i.e., going in the terminal to the folder and running the start command &apos;LD_LIBRARY_PATH=. ./bedrock_server&apos;.&lt;/p&gt;</comment>
                            <comment id="539745" author="omkhar" created="Fri, 26 Apr 2019 18:40:32 +0200"  >&lt;p&gt;This issue occurs for me with a brand new installation. I presume this would be a vanilla world. &lt;/p&gt;</comment>
                            <comment id="539665" author="adam.baligian@icloud.com" created="Fri, 26 Apr 2019 15:19:41 +0200"  >&lt;p&gt;I have this issue when trying to use worlds that are created from downloaded world templates. If I use a vanilla generated world, it works fine.&lt;/p&gt;</comment>
                            <comment id="539092" author="omkhar" created="Thu, 25 Apr 2019 02:58:32 +0200"  >&lt;p&gt;The link you cite doesn&#8217;t provide a resolution.&#160;&lt;/p&gt;</comment>
                            <comment id="539037" author="ackis81@gmail.com" created="Wed, 24 Apr 2019 22:52:57 +0200"  >&lt;p&gt;Possibly some help:&#160;&lt;a href=&quot;https://www.minecraftforum.net/forums/support/minecraft-bedrock-support/2957523-bedrock-server-not-launching-when-run-as-a-service&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.minecraftforum.net/forums/support/minecraft-bedrock-support/2957523-bedrock-server-not-launching-when-run-as-a-service&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="535181" author="rhenthecraterboy" created="Sun, 14 Apr 2019 22:20:37 +0200"  >&lt;p&gt;Im having this same problem&#160;on windows and cant seem to find an answer, if this could get more attention that would be great.&#160;&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                    <customfield id="customfield_11700" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i0yfnj:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                    </customfields>
    </item>
</channel>
</rss>