<!-- 
RSS generated by JIRA (9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13) at Sun Jan 12 11:51: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-473] Linux users can&apos;t open to lan because it&apos;s binded to 127.0.0.1</title>
                <link>https://bugs.mojang.com/browse/MC-473</link>
                <project id="10400" key="MC">Minecraft: Java Edition</project>
                    <description>&lt;p&gt;When you click on &quot;open to lan&quot;, the game takes the loopback interface as the one to get the ip address. so it binds to 127.0.0.1 and no one but you can connect to the game.&lt;/p&gt;</description>
                <environment></environment>
        <key id="11739">MC-473</key>
            <summary>Linux users can&apos;t open to lan because it&apos;s binded to 127.0.0.1</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="grum">[Mojang] Grum (Erik Broes)</assignee>
                                    <reporter username="trufae">pancake</reporter>
                        <labels>
                    </labels>
                <created>Thu, 25 Oct 2012 16:44:23 +0200</created>
                <updated>Sun, 23 Jun 2013 16:02:40 +0200</updated>
                            <resolved>Sun, 23 Jun 2013 16:02:40 +0200</resolved>
                                    <version>Minecraft 1.4.1</version>
                    <version>Minecraft 1.4.2</version>
                    <version>Minecraft 1.4.4</version>
                                                                        <votes>9</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="76411" author="bljat" created="Sun, 23 Jun 2013 16:02:40 +0200"  >&lt;p&gt;The main issue was fixed, if you still having difficulties connecting check you firewall/router settings. For additional technical support please use the &lt;a href=&quot;http://help.mojang.com/customer/portal/articles/364794-where-can-i-find-more-help-and-technical-support-&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;Mojang Support Center&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="65141" author="bljat" created="Sun, 5 May 2013 20:00:13 +0200"  >&lt;p&gt;Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.&lt;/p&gt;</comment>
                            <comment id="44854" author="shufboyardee" created="Sat, 9 Feb 2013 21:53:26 +0100"  >&lt;p&gt;Fair enough.&lt;/p&gt;</comment>
                            <comment id="43958" author="grum" created="Wed, 6 Feb 2013 15:04:55 +0100"  >&lt;p&gt;I&apos;m 99.9999% sure it is always firewall/network configuration and obviously there is no way to detect this.&lt;/p&gt;

&lt;p&gt;There is no &apos;failing&apos; in &apos;open to Lan&apos; because you ALWAYS have a loopback device it can open a port on. This means there is no way to display such a screen.&lt;/p&gt;

&lt;p&gt;IMHO People who use a firewall should know how to use it &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="43708" author="shufboyardee" created="Tue, 5 Feb 2013 13:27:30 +0100"  >&lt;p&gt;Grum, if you are prepared to say you are 100% sure that this always happens via a user firewall/network configuration issue, perhaps then, opening to lan failure could trigger a screen explaining several troubleshooting steps the user could take, similar to how browsers often deal with network failure.  Abiding by the principle of giving helpful error messages, and making it clear that system configuration is at the heart of the matter.&lt;/p&gt;</comment>
                            <comment id="43694" author="grum" created="Tue, 5 Feb 2013 08:39:12 +0100"  >&lt;p&gt;As far as I know this problem actually &lt;b&gt;always&lt;/b&gt; is a user firewall/network configuration issue. I&apos;ll be closing this issue unless anyone can prove otherwise &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="42901" author="nnnn20430" created="Sat, 2 Feb 2013 19:38:16 +0100"  >&lt;p&gt;@Stirling IT HAS BEEN FIXED ON LINUX SINCE 1.2.5&lt;br/&gt;
I HAVE NOOO IDEA WHOO REOPEND THIS CUZE IT WORKS 100% on windows linux and mac&lt;/p&gt;</comment>
                            <comment id="42893" author="stirling" created="Sat, 2 Feb 2013 19:20:05 +0100"  >&lt;p&gt;Mojang have now fixed this but for non-linux users: &lt;a href=&quot;https://www.youtube.com/watch?v=8CaWO_tPVXE&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://www.youtube.com/watch?v=8CaWO_tPVXE&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="34640" author="liamdawe" created="Thu, 10 Jan 2013 13:16:22 +0100"  >&lt;p&gt;Just FYI using Minecraft 1.4.6 on Linux (Kubuntu 64bit, openjdk 7) I made a single player world, my mrs on her mac was able to connect to me perfectly so the issue is gone for me? But when she on her mac tried it i couldn&apos;t connect to her so is it really a Linux issue?&lt;/p&gt;</comment>
                            <comment id="33184" author="league" created="Sat, 5 Jan 2013 14:31:09 +0100"  >&lt;p&gt;@Grum is this related to this problem?&lt;br/&gt;
&lt;a href=&quot;https://mojang.atlassian.net/browse/MC-2555&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mojang.atlassian.net/browse/MC-2555&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="33167" author="grum" created="Sat, 5 Jan 2013 13:14:29 +0100"  >&lt;p&gt;If you &apos;Open to LAN&apos; the idea is that you will connect to the server via the &apos;Scanning for LAN Worlds&apos; in the Multiplayer menu. All available worlds will show up and they are found using multicast (so unless you have some crappy setup that somehow disables that &amp;#8211; you can just find the worlds in that menu). The multicast will know the right IP to connect to so you do not need to know the IP at all. I think we should perhaps disable the display of the IP when you&apos;ve turned on &apos;Open to LAN&apos;, so it just says: LAN world listening on port: xxxx.&lt;/p&gt;

&lt;p&gt;Furthermore the code binds to all available interfaces (using INADDR_ANY), this also means it should bind to 127.0.0.1 as that should exist as your local loopback device, as well as to any IPV4/6 interfaces available to java.&lt;/p&gt;

&lt;p&gt;So, if you say you have problems, please give exact details on what you are using and how you have set it up. Also be aware your local firewall might be preventing multicast or outside connections, this however is not something Mojang can solve/help with.&lt;/p&gt;</comment>
                            <comment id="33163" author="stirling" created="Sat, 5 Jan 2013 12:02:48 +0100"  >&lt;p&gt;Its not just Linux users windows users cant &lt;/p&gt;</comment>
                            <comment id="31385" author="nnnn20430" created="Sat, 29 Dec 2012 15:41:31 +0100"  >&lt;p&gt;works fine on 1.4.5 1.4.6 1.4.7 (Linux LAN)&lt;/p&gt;</comment>
                            <comment id="22269" author="smcv" created="Fri, 16 Nov 2012 21:43:03 +0100"  >&lt;p&gt;Seems to work correctly in the 1.4.5 prerelease (Linux LAN server, Linux client). Thanks!&lt;/p&gt;</comment>
                            <comment id="21797" author="dem_olli" created="Thu, 15 Nov 2012 16:38:54 +0100"  >&lt;p&gt;Seems to happen for Mac Users in 1.4.4. Take a look aat this issue: &lt;a href=&quot;https://bugs.mojang.com/browse/MC-3097&quot; title=&quot;Mac can&amp;#39;t enter LAN server because IP is binded to 127.0.0.1&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-3097&quot;&gt;&lt;del&gt;MC-3097&lt;/del&gt;&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="21777" author="funnyre" created="Thu, 15 Nov 2012 15:05:06 +0100"  >&lt;p&gt;while 0.0.0.0:&lt;span class=&quot;error&quot;&gt;&amp;#91;randomport&amp;#93;&lt;/span&gt; does mean accessible to all network interfaces, it is not at all user friendly being it a LAN server, No-one wants to type in their lan address everytime they want to play (being it the fact a random port is given everytime. it was nice the way it was pre-1.4.3&lt;/p&gt;</comment>
                            <comment id="21486" author="eddyb" created="Wed, 14 Nov 2012 18:31:41 +0100"  >&lt;p&gt;READ THIS FIRST BEFORE COMMENTING&lt;/p&gt;

&lt;p&gt;0.0.0.0 means &quot;accessible to all network interfaces&quot;, so anyone can connect if they know your real IP and the random port Minecraft gives you. If you&apos;re in a LAN, run &quot;/sbin/ifconfig&quot; in a terminal (without quotes), that will give you your local IP, then use LocalIP:PortGivenByMinecraft to connect from another PC on the LAN, to the linux LAN server.&lt;/p&gt;

&lt;p&gt;The actual problem, that Simon is trying to emphasize, happens when Minecraft tries to connect to a linux LAN server, because it uses 0.0.0.0 as a real IP (which it&apos;s not), instead of the actual IP that the broadcast (announcing a LAN server) is coming from.&lt;/p&gt;

&lt;p&gt;My reddit post with an example: &lt;a href=&quot;http://www.reddit.com/r/Minecraft/comments/136ipr/144_is_now_live_on_the_launcher_bukkit_dev_build/c71ca3h&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.reddit.com/r/Minecraft/comments/136ipr/144_is_now_live_on_the_launcher_bukkit_dev_build/c71ca3h&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="20922" author="smcv" created="Mon, 12 Nov 2012 09:18:09 +0100"  >&lt;p&gt;As I said on #&lt;a href=&quot;https://bugs.mojang.com/browse/MC-2549&quot; title=&quot;LAN worlds still broken (Linux)&quot; class=&quot;issue-link&quot; data-issue-key=&quot;MC-2549&quot;&gt;&lt;del&gt;MC-2549&lt;/del&gt;&lt;/a&gt;, it looks as though my suggestion (1) from &lt;a href=&quot;https://mojang.atlassian.net/browse/MC-473?focusedCommentId=15647&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15647&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://mojang.atlassian.net/browse/MC-473?focusedCommentId=15647&amp;amp;page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-15647&lt;/a&gt; has been done, but (2) and (3) have not. At least (3) is necessary to resolve this bug.&lt;/p&gt;</comment>
                            <comment id="20917" author="patofet" created="Mon, 12 Nov 2012 08:51:27 +0100"  >&lt;p&gt;it don&apos;t work for me too, it shows 0.0.0.0 and the other computer can&apos;t connect U.U please reopen the bug&lt;/p&gt;</comment>
                            <comment id="20750" author="garpu" created="Sun, 11 Nov 2012 20:15:10 +0100"  >&lt;p&gt;Yeah this isn&apos;t fixed for me, either.  (Arch Linux)  I even have net-tools (with ifconfig) installed, if it makes a difference.  When I open a world to LAN, the IP address comes up as 0.0.0.0 with a port. &lt;/p&gt;</comment>
                            <comment id="19581" author="nnnn20430" created="Thu, 8 Nov 2012 20:42:29 +0100"  >&lt;p&gt;it says that is it fixed on 1.4.4 i downladed it opend to lan it said:&lt;br/&gt;
local game hosted on 0.0.0.0:53962 then i tryed connect on another computer it apeard in the multiplayer menu&lt;br/&gt;
but when i tryed to join it said connection refused so its not fixed not for me anyway&lt;br/&gt;
i think its cuze server can use 0.0.0.0 to accept connections from anywere but client cant connect to 0.0.0.0 cuze client needs to use the ip of the computer it connects to&lt;br/&gt;
cuze when it displays the server in the multiplayer menu it uses 0.0.0.0&lt;/p&gt;</comment>
                            <comment id="19568" author="ilan321" created="Thu, 8 Nov 2012 20:24:33 +0100"  >&lt;p&gt;Quick fix: (On ubuntu, since I use it. Instructions may vary according to distro)(ROUTER ONLY!)&lt;br/&gt;
1) Open Terminal, type in &quot;hostname&quot;, press Enter, write it down. (Mine was &quot;Ilanz0r&quot;)&lt;br/&gt;
2) In the terminal, type in &quot;sudo gedit /etc/hosts&quot; and type in your password when asked for it.&lt;br/&gt;
3) In the text that opens, form a new line just under the first line (should be an IP and a tab afterwards, followed by a name)&lt;br/&gt;
4) On the new line, copy in your internal IP (mine is 192.168.2.105), press TAB to insert a long space, and then type in your hostname exactly, to make it look like this:&lt;br/&gt;
EXAMPLE:&lt;br/&gt;
192.168.2.105    Ilanz0r&lt;br/&gt;
5) Save it, see if it works &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
(You have to change this every time you connect to a new wifi unless you set a static IP)&lt;/p&gt;</comment>
                            <comment id="18861" author="grum" created="Tue, 6 Nov 2012 20:34:36 +0100"  >&lt;p&gt;Future will bind to &apos;null&apos; (which ends up being INADDR_ANY) now.&lt;/p&gt;</comment>
                            <comment id="18842" author="thefinn93" created="Tue, 6 Nov 2012 19:58:59 +0100"  >&lt;p&gt;#3 won&apos;t work, because the server doesn&apos;t actually listen on 0.0.0.0 or ::. It binds to the loopback interface, meaning that even if someone types your IP in manually they won&apos;t be able to connect.&lt;/p&gt;</comment>
                            <comment id="15647" author="smcv" created="Tue, 30 Oct 2012 23:58:22 +0100"  >&lt;p&gt;Further explanation of the changes I suggest:&lt;/p&gt;

&lt;p&gt;1) listen on 0.0.0.0 or :: instead of specifying a particular listening address&lt;/p&gt;

&lt;p&gt;2) when sending AD packets to the network, if they would contain 0.0.0.0, fill in something else, to be nice to unpatched versions (getLocalHost() is a reasonable fallback)&lt;/p&gt;

&lt;p&gt;3) when receiving an AD packet from the network, ignore the IP address appearing before the &quot;:&quot;, and use the IP address from which the packet was received (together with the port from after the &quot;:&quot; as usual)&lt;/p&gt;</comment>
                            <comment id="15645" author="smcv" created="Tue, 30 Oct 2012 23:53:31 +0100"  >&lt;p&gt;According to Zorander on the wiki, this might be a problem on Mac too:&lt;/p&gt;

&lt;p&gt;&quot;This is actually an issue with any OS except Windows, due to the loopback interface.&quot;&lt;/p&gt;</comment>
                            <comment id="15644" author="smcv" created="Tue, 30 Oct 2012 23:48:57 +0100"  >&lt;p&gt;Previously reported against 1.3.2 on the Minecraft wiki. Here&apos;s my more detailed report from there:&lt;/p&gt;

&lt;p&gt;&quot;&quot;&quot;&lt;br/&gt;
On Debian, /etc/hosts usually maps the laptop&apos;s own hostname to 127.0.1.1, an alternative loopback address (e.g. &quot;127.0.1.1 mylaptop.mydomain mylaptop&quot; - all of 127.0.0.0/8 is loopback).&lt;/p&gt;

&lt;p&gt;When a Minecraft-on-Debian user advertises their single-player game to the LAN, the multicast announcement comes from their LAN IP address (e.g. 192.168.0.2), but the server only listens on 127.0.1.1 and announces that address in the multicast packet, e.g. &lt;span class=&quot;error&quot;&gt;&amp;#91;AD&amp;#93;&lt;/span&gt;127.0.1.1:58388&lt;span class=&quot;error&quot;&gt;&amp;#91;/AD&amp;#93;&lt;/span&gt;, making other machines unable to join.&lt;br/&gt;
&quot;&quot;&quot;&lt;/p&gt;

&lt;p&gt;(From other people&apos;s comments here, it seems other Linuxes end up with 127.0.0.1 or 127.0.0.2.)&lt;/p&gt;

&lt;p&gt;The cause is that InetAddress.getLocalHost().getAddress() is pretty useless on Linux: it assumes that gethostname() returns a DNS name that resolves to the an address usable by other players, which isn&apos;t generally true. &lt;/p&gt;

&lt;p&gt;Here is a patch relative to the MCP 7.2 semi-deobfuscated source, hopefully it&apos;ll be easy enough to make the corresponding change in the real Minecraft source code:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.pseudorandom.co.uk/~smcv/minecraft-1.3.2-lan-server-v4.diff&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://www.pseudorandom.co.uk/~smcv/minecraft-1.3.2-lan-server-v4.diff&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is permission to do what you like with that patch, including incorporating it into Minecraft: copying and distribution of the patch, with or without modification, are permitted in any medium without royalty. The patch is offered as-is, without any warranty.&lt;/p&gt;</comment>
                            <comment id="13248" author="ezekielelin" created="Thu, 25 Oct 2012 16:55:33 +0200"  >&lt;p&gt;Just checking&lt;/p&gt;</comment>
                            <comment id="13243" author="trufae" created="Thu, 25 Oct 2012 16:54:12 +0200"  >&lt;p&gt;the ip shown is 127.0.0.1. you can&apos;t connect to localhost if you are not running minecraft in localhost &lt;img class=&quot;emoticon&quot; src=&quot;https://bugs.mojang.com/images/icons/emoticons/smile.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;</comment>
                            <comment id="13242" author="eddyb" created="Thu, 25 Oct 2012 16:52:09 +0200"  >&lt;p&gt;I forgot to mention, to workaround this problem, add &quot;external-ip local-hostname&quot; to /etc/hosts.&lt;br/&gt;
You can get the external-ip with /sbin/ifconfig and the local-hostname with /bin/hostname.&lt;/p&gt;</comment>
                            <comment id="13239" author="eddyb" created="Thu, 25 Oct 2012 16:50:13 +0200"  >&lt;p&gt;This happened to me, but for 127.0.0.2.&lt;br/&gt;
It turns out Minecraft uses the local hostname to get the IP facing LAN, but /etc/hosts only has a default 127.0.0.2 IP.&lt;br/&gt;
I&apos;m using NetworkManager and I think it fails to alias the hostname to the IP it gets from DHCP.&lt;br/&gt;
To quote from IRC:&lt;br/&gt;
  &quot;the way I did it in one of my node.js projects is I got the IP of the first externally visible network interface (node.js provides that information, Java may have something similar)&quot;&lt;/p&gt;</comment>
                            <comment id="13238" author="ezekielelin" created="Thu, 25 Oct 2012 16:49:25 +0200"  >&lt;p&gt;can you direct connect to the IP shown?&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10102">
                    <name>Duplicate</name>
                                                                <inwardlinks description="is duplicated by">
                                        <issuelink>
            <issuekey id="12329">MC-1030</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="12652">MC-1327</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14327">MC-2566</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14988">MC-3097</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                            <issuelinktype id="10103">
                    <name>Relates</name>
                                                                <inwardlinks description="relates to">
                                        <issuelink>
            <issuekey id="14310">MC-2555</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14347">MC-2583</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                <customfield id="customfield_10701" key="com.atlassian.jira.plugin.system.customfieldtypes:datetime">
                        <customfieldname>CHK</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>Mon, 4 Feb 2013 23:30:00 +0100</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10500" key="com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons">
                        <customfieldname>Confirmation Status</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10302"><![CDATA[Community Consensus]]></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_11100" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Linked</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>6.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                <customfield id="customfield_11600" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>0|i01r3r:</customfieldvalue>

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