Editing
Tutorials/Setting up a server
(section)
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== FAQ (frequently asked questions) == '''Q: I have a problem which is not answered in here! What should I do to?''' A: Go to the [http://www.minecraftforum.net/forum/152-server-support/ Minecraft Forums] and post your problem there. To help you, they need the following information: * Operating system * Version of Java * One machine or multiple computers * Exact description of the problem * Steps you have taken to solve the problem * Any errors you encountered * Screenshots of the problem (if possible) * Anything else that might help us to solve your problem - there almost never is too much information (passwords would be too much information!) And please, if we were able to help you, post where the problem was exactly and what the fix was for that. Other people will appreciate that (and we will be able to get a grip on the common problems)! ---- '''Q: On a Windows computer, when I double click the batch file it opens a command prompt window, but quickly disappears and the server does not start.''' A: Right-click your .bat program and hit edit; add a new line and type <code>pause</code> save and run the file. If it says invalid path, it is probably due to an incorrect path to java.exe/javaw.exe or your ''Minecraft'' server jar file. You may just need to change <code>/jre7/</code> to <code>/jre6/</code> . Or search your system for java.exe/javaw.exe and adjust the path accordingly. (It's probably under <code>c:\program files</code> or <code>c:\program files (x86)</code>.) Also, you must have the ''offline'' version of Java installed—not just the Java plug-in for your browser. ---- '''Q: Whenever I try to get the server up, it says "Failed to bind to port!".''' A: The most common reason this happens is because you put an IP address in the server-ip field in your server.properties file. If the IP you specify isn't the same as any of your network interfaces, (your wireless or wired IPv4 from ipconfig/ifconfig/ip a) ''Minecraft'' will throw the port binding failure message. By leaving it blank, you let it bind to all interfaces. You will then be able to connect using localhost and people on your wired/wireless network (in the same subnet) can connect using the computers/server's (private) IP address. Alternatively, the error can mean that you have tried to use a port that is already in use or that you do not have permission to use (ports < 1024 are privileged and require root/Administrator access to bind to). You can try a different port by changing it in your <code>server.properties</code> file in this line: <code>server-port=25565</code>. Note: You should avoid using the following ports for your server as some ISPs may block these ports for security reasons and you shouldn't be running the ''Minecraft'' server as root (in the case of a Linux type OS and ports < 1024): *21 (Used by most FTP Servers) *22 (Used by Secure Shell daemon) *25 (Used by Mail Servers for SMTP) *53 (Used by DNS Servers) *80 (Used by most Web Servers) *110 (Used by most Mail Servers for POP3) *115 (Used by Simple File Transfer Protocol) *143 (Used by Mail Servers for IMAP) *443 (SSL port for Web Servers) *3306 (Used by most MySQL Servers) Generally avoid any port below number 1024, since those ports are generally referred as [[wikipedia:List of TCP and UDP port numbers#Well-known ports|well-known ports]] and are registered with the IANA for important services. ---- '''Q: I tried to run the server with Solaris/OpenSolaris and got the following error:''' java.io.InterruptedIOException: Operation interrupted at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at java.net.SocketInputStream.read(SocketInputStream.java:182) at java.io.FilterInputStream.read(FilterInputStream.java:66) at gq.a(SourceFile:131) at ji.g(SourceFile:197) at ji.c(SourceFile:17) at oq.run(SourceFile:84) 2011-05-31 16:57:26 [INFO] /:44673 lost connection A: For whatever reason, out of all of the operating systems, only Solaris throws that exception when a thread interrupts a connection. A workaround is to change the default behavior on the command line: java -Xmx1G -Xms32M -XX:-UseVMInterruptibleIO -XX:+UseConcMarkSweepGC \ -XX:+CMSIncrementalPacing -XX:ParallelGCThreads=$CPU_COUNT -XX:+AggressiveOpts\ -jar minecraft.jar --nogui This instructs Java to use an interruptible IO stack instead of the default IO that is sensitive to interrupted threads. ---- '''Q: When I try to connect to my server this is what it says:''' <pre style="width: 384px"> Connection lost The server responded with an invalid server key </pre> A: This error is usually caused when the server sends an unrecognized function to the client, which may be caused by using unrecognized server software, unbalanced client / server versions or modifications to the client. ---- '''Q: I cannot break/place any blocks!?''' A: This is most usually caused by interacting with blocks in a protected area. If you are trying to interact near spawn, most likely it has been protected, by the ''Minecraft'' server software; either build away from it or get [[Operator|operator status]]. ---- '''Q: My server runs fine, but I cannot connect to it!''' A: This could be caused by a series of issues. Please post a thread using the template provided above. ---- '''Q: How do you give a .jar server more ram?''' A: Change the numbers in the server launch command "-Xmx1G -Xms1G". The -Xms part specifies how much memory the server starts with, and the -Xmx part is the maximum amount of memory the server can use. <code>-Xmx1G -Xms2G</code> = 1GB <code>-Xmx2G -Xms1G</code> = 2GB And so on. ---- '''Q: Why is the server CPU constantly at full load?''' A: Some users are experiences full CPU load on the server. This may be caused by the GUI (graphic user interface) window. Run the server with the <code>--nogui</code> option to disable this window. ---- '''Q: Help! How do you find out your server's IP address?''' A: Read [[#Connecting to the Minecraft server]] ---- '''Q: I port forwarded and allowed java.exe in my firewall and it's still not working!''' A: Your modem might be acting as a router as well. If you switch ISP's or upgrade your connection to the Internet, you may get issued a modem/router combination (which might explain why it worked in the past). You can verify this by looking for the WAN IP of your router. If it's a private IP, you'll need to log into the modem/router your ISP issued to you, and configure port forwarding to the WAN IP of your router. ---- '''Q: I turned off my firewall on my router/modem how does it still not work???!!! However, port forwarding sites report they can "see" me?? What's going on???!!''' A: Turning off your firewall on your router/modem means you essentially disabled port forwarding. Port forwarding is actually a subset of firewall rules. If no rule exists on that port (for example 25565), the firewall will ignore/drop the connection attempt (hence, you get a connection timed out). If there is a rule, it should pass on the connection to whatever computer is configured to receive the initial connection attempt. When you disable the router/modem firewall and test your public (non RFC 1918) IP address on a port forwarding-checking website, the website will hit your router/modem, and your router/modem will respond, yes you can see me. This is another reason why disabling your firewall is bad; you incorrectly believe that people outside your network can connect to your ''Minecraft'' Server on your computer, when really, they're trying to connect to the router/modem itself. To solve this, the next step is to confirm if your port forwarding (rules) are correct. By Google-ing "minecraft server checker" you'll be able to check if you configured your network correctly such that users outside your network running the ''Minecraft'' client can indeed connect to your computer through your router/modem. ''Note: You may need to be careful about the ''Minecraft'' Query - It may use layer 4, the transport layer - UDP to query your server. Many Internet and Youtube guides will only tell you to port forward TCP (this guide outlines that you do both).'' ---- '''Q: What is connection timed out and connection refused?''' A: Simply put, connection timed out is when a firewall ignores a connection attempt (ignores the intial connection packet with the SYN flag in the 3-way handshake). Connection refused is when there's no process listening on the port; therefore, the operating system lets the client (in the standard client-server model) know their connection attempt did not work. The default configuration on all Windows computers (the home version) and (just about) all (SOHO) routers is to drop or time out the connections. [https://superuser.com/questions/356043/windows-7-firewall-causing-remote-connection-to-time-out-should-refuse-connecti This is called "stealth mode" and you can read more about it on superuser.] Here's a brief summary: "The idea is that refusing a connection instead of timing it out will tell an attacker that there actually is a computer on that IP-Address. With the connection attempt timing out, the hope is that the attacker will ignore the computer." [https://serverfault.com/questions/725262/what-causes-the-connection-refused-message You can read more about connection refused on serverfault. ] So if your error message is a connection timed out, it's usually a firewall problem - you either need to allow Java in the Windows firewall or port forward. If the error message is a connection refused, perhaps your ''Minecraft'' server has not started properly or you turned off the firewall on your router instead of port forwarding. As always, you can always ask the Minecraft Forum if you are uneasy or unsure about something, particularly if opening the command prompt/terminal and running commands makes you nervous. Connection filtered and connection closed is another way of saying timed out and refused, respectively.
Summary:
Please note that all contributions to Kiiw may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Kiiw:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Navigation menu
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Namespaces
Page
Discussion
English
Views
Read
Edit
View history
More
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Tools
What links here
Related changes
Special pages
Page information