<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 12:03:09 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>[MC-4010] Unable to stop server when it fails to bind port</title>
                <link>https://bugs.mojang.com/browse/MC-4010</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;Sometimes I have few servers running on my PC (which are played on via LAN). Today I was purging my HDD and deleting old servers (I have many directories with servers and their configs and maps). Many of them had port 25565 (the default one) set in server.properties file. And I had already one server running on that port (and there were 3 players there so I couldn&apos;t stop it). So several times I got the FAILED TO BIND PORT message. Then every time I wrote &quot;stop&quot; in the terminal with the screen attached under which the server was running. And no time I succeeded. The server is unable to stop itself after getting command &quot;stop&quot; when it&apos;s unable to bind port. But when is receives SIGTERM signal, it terminates correctly. Here is the server log:&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;2012-11-30 19:01:44 \[INFO\] Starting minecraft server version 1.4.4
2012-11-30 19:01:44 \[INFO\] Loading properties
2012-11-30 19:01:44 \[INFO\] Default game type: SURVIVAL
2012-11-30 19:01:44 \[INFO\] Generating keypair
2012-11-30 19:01:45 \[INFO\] Starting Minecraft server on *:25565
2012-11-30 19:01:45 \[WARNING\] **** FAILED TO BIND TO PORT!
2012-11-30 19:01:45 \[WARNING\] The exception was: java.net.BindException: Adresa je u&#382;&#237;v&#225;na
2012-11-30 19:01:45 \[WARNING\] Perhaps a server is already running on that port?
2012-11-30 19:01:48 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:49 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:50 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:51 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:52 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:52 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:53 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:53 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:01:54 \[INFO\] An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
2012-11-30 19:02:06 \[INFO\] Stopping server
2012-11-30 19:02:06 \[INFO\] Saving worlds
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;There you can see that I started the server, then it failed to bind port and I was writing stop, which didn&apos;t do anything. Then, in 19:02:06 I opened htop and terminated it via signal.&lt;/p&gt;

&lt;p&gt;I was angry and repeating the command, as you can see. It&apos;s not pleasure when this happens many times to me. I had to detach screen every time and start htop, then terminate the server and exit htop. If the bug was fixed I would only have to just write &quot;stop&quot; when this happens. Please, fix this issue. I hope it doesn&apos;t depend on some server core mechanics, and it is only one forgotten if() to check something&apos;s status or something.&lt;/p&gt;</description>
                <environment>OS: Debian 6.0&lt;br/&gt;
Java version: 1.7.0 for Linux 2.6-amd64&lt;br/&gt;
Using minecraft_server.jar downloaded from Minecraft.net</environment>
        <key id="16324">MC-4010</key>
            <summary>Unable to stop server when it fails to bind port</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="4">Incomplete</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="human123">Tom&#225;&#353; Varga</reporter>
                        <labels>
                            <label>linux</label>
                            <label>multiplayer</label>
                            <label>server</label>
                    </labels>
                <created>Fri, 30 Nov 2012 21:31:08 +0100</created>
                <updated>Thu, 17 Mar 2016 16:27:57 +0100</updated>
                            <resolved>Thu, 17 Mar 2016 16:27:57 +0100</resolved>
                                    <version>Minecraft 1.4.4</version>
                    <version>Minecraft 1.4.5</version>
                    <version>Minecraft 1.6.4</version>
                    <version>Minecraft 13w42a</version>
                    <version>Minecraft 1.7.1</version>
                    <version>Minecraft 1.7.2</version>
                    <version>Minecraft 13w47e</version>
                    <version>Minecraft 13w48a</version>
                    <version>Minecraft 13w48b</version>
                    <version>Minecraft 13w49a</version>
                    <version>Minecraft 1.7.3</version>
                    <version>Minecraft 1.7.4</version>
                    <version>Minecraft 14w02c</version>
                    <version>Minecraft 14w03a</version>
                    <version>Minecraft 14w03b</version>
                    <version>Minecraft 14w04a</version>
                    <version>Minecraft 14w04b</version>
                                                                        <votes>2</votes>
                                    <watches>5</watches>
                                                                            <comments>
                            <comment id="295170" author="JIRAUSER71590" created="Thu, 17 Mar 2016 16:27:57 +0100"  >&lt;p&gt;No response for over a year.&lt;/p&gt;</comment>
                            <comment id="206577" author="galaxy_2alex" created="Thu, 30 Oct 2014 17:54:13 +0100"  >&lt;p&gt;Is this still a concern in the &lt;em&gt;current Minecraft version&lt;/em&gt;? If so, please &lt;em&gt;update the affected versions&lt;/em&gt; in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.&lt;/p&gt;

&lt;p&gt;Keep in mind that the &quot;Resolved&quot;-Status on this ticket just means &quot;Answered&quot;, and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been deliviered.&lt;/p&gt;</comment>
                            <comment id="133857" author="jar_" created="Thu, 23 Jan 2014 14:08:45 +0100"  >&lt;p&gt;Confirmed for Minecraft &lt;b&gt;14w03b&lt;/b&gt;.&lt;/p&gt;</comment>
                            <comment id="133856" author="jar_" created="Thu, 23 Jan 2014 14:08:23 +0100"  >&lt;p&gt;Attached &lt;b&gt;latest.log&lt;/b&gt; and &lt;b&gt;server.properties&lt;/b&gt;.&lt;/p&gt;</comment>
                            <comment id="121446" author="ezekielelin" created="Tue, 26 Nov 2013 21:23:48 +0100"  >&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;Ezekiels-Mac:~ ezekielelin$ /Applications/Server/SnapshotWorld/launch_server.command; exit;
2013-11-26 15:21:56,297 ERROR Unable to rename file /Applications/Server/SnapshotWorld/logs/latest.log to /Applications/Server/SnapshotWorld/logs/2013-10-29-1.log - logs/latest.log (No such file or directory)
[15:21:56] [Server thread/INFO]: Starting minecraft server version 1.7.2
[15:21:56] [Server thread/INFO]: Loading properties
2013-11-26 15:21:56,452 WARN Unable to delete logs/2013-10-29-1.log.
[15:21:56] [Server thread/INFO]: Default game type: SURVIVAL
[15:21:56] [Server thread/INFO]: Generating keypair
[15:21:57] [Server thread/INFO]: Starting Minecraft server on *:25565
[15:21:57] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[15:21:57] [Server thread/WARN]: The exception was: java.net.BindException: Address already in use
[15:21:57] [Server thread/WARN]: Perhaps a server is already running on that port?
stop
[15:23:01] [Server thread/INFO]: An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
[15:23:01] [Server thread/ERROR]: Couldn&apos;t process command
java.lang.NullPointerException
	at bk.a(SourceFile:85) ~[minecraft_server.1.7.2.jar:?]
	at y.a(SourceFile:340) ~[minecraft_server.1.7.2.jar:?]
	at y.a(SourceFile:335) ~[minecraft_server.1.7.2.jar:?]
	at bs.b(SourceFile:19) ~[minecraft_server.1.7.2.jar:?]
	at z.a(SourceFile:58) [minecraft_server.1.7.2.jar:?]
	at lj.aw(SourceFile:298) [minecraft_server.1.7.2.jar:?]
	at lj.a(SourceFile:228) [minecraft_server.1.7.2.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:366) [minecraft_server.1.7.2.jar:?]
	at ky.run(SourceFile:617) [minecraft_server.1.7.2.jar:?]
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="112102" author="ezekielelin" created="Thu, 17 Oct 2013 23:04:32 +0200"  >&lt;p&gt;Reopening, still an issue.&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;
[17:04:17] [Server thread/INFO]: Starting minecraft server version 13w42a
[17:04:17] [Server thread/INFO]: Loading properties
[17:04:17] [Server thread/INFO]: Default game type: SURVIVAL
[17:04:17] [Server thread/INFO]: Generating keypair
[17:04:17] [Server thread/INFO]: Starting Minecraft server on *:25565
[17:04:17] [Server thread/WARN]: **** FAILED TO BIND TO PORT!
[17:04:17] [Server thread/WARN]: The exception was: java.net.BindException: Address already in use
[17:04:17] [Server thread/WARN]: Perhaps a server is already running on that port?
stop
[17:04:19] [Server thread/INFO]: An unknown error occurred &lt;span class=&quot;code-keyword&quot;&gt;while&lt;/span&gt; attempting to perform &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; command
[17:04:19] [Server thread/ERROR]: Couldn&apos;t process command
java.lang.NullPointerException
	at bk.a(SourceFile:84) ~[minecraft_server.13w42a.jar:?]
	at y.a(SourceFile:338) ~[minecraft_server.13w42a.jar:?]
	at y.a(SourceFile:333) ~[minecraft_server.13w42a.jar:?]
	at br.b(SourceFile:19) ~[minecraft_server.13w42a.jar:?]
	at z.a(SourceFile:58) [minecraft_server.13w42a.jar:?]
	at li.av(SourceFile:292) [minecraft_server.13w42a.jar:?]
	at li.a(SourceFile:222) [minecraft_server.13w42a.jar:?]
	at net.minecraft.server.MinecraftServer.run(SourceFile:366) [minecraft_server.13w42a.jar:?]
	at kx.run(SourceFile:617) [minecraft_server.13w42a.jar:?]


&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="26041" author="human123" created="Sat, 1 Dec 2012 08:30:52 +0100"  >&lt;p&gt;No. I was using `screen` so as to be able to close the terminal window without terminating server. You can see &lt;a href=&quot;http://linux.die.net/man/1/screen&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://linux.die.net/man/1/screen&lt;/a&gt; for more information. If I clicked the close button, the screen would just detach from the terminal and both, the screen and the server, would run farther, in the background.&lt;/p&gt;

&lt;p&gt;I don&apos;t think this issue can be closed just because it has solution in some situations like when you use Minecraft_Server.exe or when you execute the server directly in a terminal.&lt;/p&gt;

&lt;p&gt;You&apos;re saying the server is not really running, so it cannot stop. So just one condition to check if the server is running when typing &quot;stop&quot; command would be enough. It could function like now if the server is running and just send SIGTERM to itself when it isn&apos;t running. Simple, not opressing workaround.&lt;/p&gt;</comment>
                            <comment id="25961" author="fuj1n" created="Sat, 1 Dec 2012 01:59:47 +0100"  >&lt;p&gt;If it failed to bind port, just use the close button on the top right corner on Windows and Linux or top left for Mac, as the error occurs because the server is not really running when it fails to bind it.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="70995">MC-45447</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="53884" name="latest.log" size="1328" author="Jar_" created="Thu, 23 Jan 2014 14:08:23 +0100"/>
                            <attachment id="53885" name="server.properties" size="646" author="Jar_" created="Thu, 23 Jan 2014 14:08:23 +0100"/>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Tue, 31 Dec 2013 21:05:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10303"><![CDATA[Confirmed]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                        <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|i0k0t3:</customfieldvalue>

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