[SOLVED] MC Server: Windows 7 + Bukkit + 64-bit Java

Discussion in 'Bukkit Help' started by Christopher Tarter, May 18, 2011.

  1. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Greetings all. I originally posted my problem over on the official Minecraft Forums (http://www.minecraftforum.net/viewtopic.php?f=10&t=355278), but haven't found an answer yet. It appears that these server-oriented forums are a bit more active, so hopefully someone has the solution.

    The difficulties I'm having are connecting to my MC server when running Bukkit through 64-bit Java. Everything works fine with 32-bit Java.

    My MC server specs:
    Windows 7 Enterprise Edition 64-bit SP1
    Intel 3.00Ghz Core2 Duo
    6GB RAM
    160GB HD
    10GB Page file

    Firewall set to allow exceptions across port 25565

    Minecraft server 1.6.6

    java version "1.6.0_25"
    Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
    Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)

    Bukkit version: git-Bukkit-0.0.0-766-g3fc0460-b818jnks (MC: 1.6.6)

    Essentials version: 2.2.22

    32-bit Java batch file:
    Code (Text):
    1. @ECHO OFF
    2. SET BINDIR=%~dp0
    3. CD /D "%BINDIR%"
    4. "%ProgramFiles(x86)%\Java\jre6\bin\java.exe" -Xincgc -Xmx1536m -Xms1536m -jar craftbukkit-0.0.1-SNAPSHOT.jar
    5. PAUSE
    64-bit Java batch file:
    Code (Text):
    1. @ECHO OFF
    2. SET BINDIR=%~dp0
    3. CD /D "%BINDIR%"
    4. "%ProgramFiles%\Java\jre6\bin\java.exe" -Xincgc -Xmx3072m -Xms3072m -jar craftbukkit-0.0.1-SNAPSHOT.jar
    5. PAUSE
    The server appears to launch fine and reports no errors with either batch file. The only difference is between the allocated memory for java and the specific java environment being called (32 vs 64 bit).

    The reason behind the desire to run the 64-bit Java over the 32-bit version is that the 32-bit Java environment is limited to 1.5GB of memory, while the 64-bit Java is capable of utilizing a higher memory range in excess of 1.5GB (I'd like to use around 3GB).

    Server output log for 32-bit batch executable:
    Code (Text):
    1. 148 recipes
    2. 16 achievements
    3. 23:06:28 [INFO] Starting minecraft server version Beta 1.6.6
    4. 23:06:28 [INFO] Loading properties
    5. 23:06:28 [INFO] Starting Minecraft server on *:25565
    6. 23:06:28 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-766-
    7. g3fc0460-b818jnks (MC: 1.6.6)
    8. 23:06:28 [INFO] Preparing level "world"
    9. 23:06:28 [INFO] Preparing start region for level 0
    10. 23:06:28 [INFO] Preparing start region for level 1
    11. 23:06:29 [INFO] Preparing spawn area: 32%
    12. 23:06:29 [INFO] Loaded Essentials build 2.2.22 by Zenexer, ementalo, Aelux, Bret
    13. tflan, KimKandor, snowleo, ceulemans and Xeology
    14. 23:06:29 [INFO] Loaded EssentialsChat build 2.2.22 by Zenexer, ementalo, Aelux,
    15. Brettflan, KimKandor, snowleo, ceulemans and Xeology
    16. 23:06:29 [INFO] Loaded EssentialsGeoIP build 2.2.22 by Zenexer, ementalo, Aelux,
    17.  Brettflan, KimKandor, snowleo, ceulemans and Xeology
    18. 23:06:29 [INFO] This product includes GeoLite data created by MaxMind, available
    19.  from http://www.maxmind.com/.
    20. 23:06:29 [INFO] GroupManager - INFO - Scheduled Data Saving is set for every 10
    21. minutes!
    22. 23:06:29 [INFO] GroupManager version 1.0(alpha-5) is enabled!
    23. 23:06:29 [INFO] Loaded EssentialsProtect build 2.2.22 by Zenexer, ementalo, Aelu
    24. x, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    25. 23:06:29 [INFO] Loaded EssentialsSpawn build 2.2.22 by Zenexer, ementalo, Aelux,
    26.  Brettflan, KimKandor, snowleo, ceulemans and Xeology
    27. 23:06:29 [INFO] [Runecraft] Rune blacklist with 0 runes loaded.
    28. 23:06:29 [INFO] [Runecraft] World 'world': id changed to 0
    29. 23:06:30 [INFO] [Runecraft] Runecraft 2.7 initialized.
    30. 23:06:30 [INFO] [Runecraft] World 'world_nether': id changed to 1
    31. 23:06:30 [INFO] Runecraft plugin version 0.4 is enabled!
    32. 23:06:30 [INFO] Fake Permissions version 2.7.2 is enabled!
    33. 23:06:30 [INFO] Done (0.180s)! For help, type "help" or "?"
    34. >mem
    35. 23:07:47 [INFO] Maximum memory: 1,532 MB
    36. 23:07:47 [INFO] Minimum memory: 1,409 MB
    37. 23:07:47 [INFO] World "world": 625chunks,92entities
    38. 23:07:47 [INFO] Nether "world_nether": 625chunks,0entities
    Server output log for 64-bit batch executable:
    Code (Text):
    1. 148 recipes
    2. 16 achievements
    3. 23:08:54 [INFO] Starting minecraft server version Beta 1.6.6
    4. 23:08:54 [INFO] Loading properties
    5. 23:08:54 [INFO] Starting Minecraft server on *:25565
    6. 23:08:54 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-766-
    7. g3fc0460-b818jnks (MC: 1.6.6)
    8. 23:08:54 [INFO] Preparing level "world"
    9. 23:08:54 [INFO] Preparing start region for level 0
    10. 23:08:55 [INFO] Preparing start region for level 1
    11. 23:08:55 [INFO] Preparing spawn area: 60%
    12. 23:08:56 [INFO] Loaded Essentials build 2.2.22 by Zenexer, ementalo, Aelux, Bret
    13. tflan, KimKandor, snowleo, ceulemans and Xeology
    14. 23:08:56 [INFO] Loaded EssentialsChat build 2.2.22 by Zenexer, ementalo, Aelux,
    15. Brettflan, KimKandor, snowleo, ceulemans and Xeology
    16. 23:08:56 [INFO] Loaded EssentialsGeoIP build 2.2.22 by Zenexer, ementalo, Aelux,
    17.  Brettflan, KimKandor, snowleo, ceulemans and Xeology
    18. 23:08:56 [INFO] This product includes GeoLite data created by MaxMind, available
    19.  from http://www.maxmind.com/.
    20. 23:08:56 [INFO] GroupManager - INFO - Scheduled Data Saving is set for every 10
    21. minutes!
    22. 23:08:56 [INFO] GroupManager version 1.0(alpha-5) is enabled!
    23. 23:08:56 [INFO] Loaded EssentialsProtect build 2.2.22 by Zenexer, ementalo, Aelu
    24. x, Brettflan, KimKandor, snowleo, ceulemans and Xeology
    25. 23:08:56 [INFO] Loaded EssentialsSpawn build 2.2.22 by Zenexer, ementalo, Aelux,
    26.  Brettflan, KimKandor, snowleo, ceulemans and Xeology
    27. 23:08:56 [INFO] [Runecraft] Rune blacklist with 0 runes loaded.
    28. 23:08:56 [INFO] [Runecraft] World 'world': id changed to 0
    29. 23:08:56 [INFO] [Runecraft] Runecraft 2.7 initialized.
    30. 23:08:56 [INFO] [Runecraft] World 'world_nether': id changed to 1
    31. 23:08:56 [INFO] Runecraft plugin version 0.4 is enabled!
    32. 23:08:56 [INFO] Fake Permissions version 2.7.2 is enabled!
    33. 23:08:56 [INFO] Done (0.200s)! For help, type "help" or "?"
    34. >mem
    35. 23:09:07 [INFO] Maximum memory: 3,067 MB
    36. 23:09:07 [INFO] Minimum memory: 2,940 MB
    37. 23:09:07 [INFO] World "world": 625chunks,91entities
    38. 23:09:07 [INFO] Nether "world_nether": 625chunks,0entities
    I'll be happy to provide you with any other information that might lead to an answer. I figure at this point, I'm just over looking something simple. Thank you in advance, I appreciate your efforts.

    Short version for TL;DR people:
    32-bit server: client connects fine
    64-bit server: client unable to connect
     
  2. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Updated server and bukkit versions; bumping for hopeful solution.
    Added Mem report to server log.
     
  3. Offline

    vYN

    My BukkitDev Profile
    My Plugins (3)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    try to lower "-xms" to 2GB. totaly random suggestion by me.. xD I can't see anything wrong here..
     
  4. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I've tried dropping the allocated memory as low as 512MB for the 64-bit client. Still no success for clients/players to connect to the 64-bit java server.

    I haven't found any indication that the standard Minecraft client can't connect to a 64-bit java run server. All information I've come across so far says that a 32-bit java application should work fine within a 64-bit java environment; similar to running 32-bit programs in a 64-bit operating system.
     
  5. Offline

    Phaedrus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    have you tried uninstalling all your java versions and just installing 64 bit?

    have you tried without essentials or other plugins?
     
  6. Offline

    vYN

    My BukkitDev Profile
    My Plugins (3)
    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    My server is running on 64-Bit java. and i know many of my players are just using a 32-bit java on the client side. and everything is just running fine.
     
  7. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    All plugins removed and tested. Still unable to connect.
    Removing all Java now, and will install ONLY the 64-bit environment. I'll post the update in a moment.
     
  8. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Thanks Gudfaren for the info. That's been my exact understanding, is that it should be possible without error. Still trying to debug the issue and figure out why mine isn't behaving properly.
     
  9. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Uninstalled all versions of java. Restarted the system. Reinstalled only the 64-bit Java client. Still unable to connect.

    Client Message:
    Code (Text):
    1.   Connecting to the server...
    2.  
    3.   Failed to connect to the server
    4.  
    5.   Connection timed out: connect
    Server just sits back and stares blankly without noticing the attempts.
     
  10. Offline

    Phaedrus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Can you try creating a fresh server setup in an empty folder. Fresh world and everything.
     
  11. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Created a new folder with the following three items only:
    -Minecraft_Server.exe (ver. 1.6.6) (I suppose this doesn't even need to be present)
    -craftbukkit-0.0.1-SNAPSHOT.jar (build 818)
    -RUN.bat (Batch file calling 64-bit Java environment with 3GB Memory)

    Server runs normal. Still unable to connect with client.

    Server log:
    Code (Text):
    1.  
    2. 148 recipes
    3. 16 achievements
    4. 00:45:07 [INFO] Starting minecraft server version Beta 1.6.6
    5. 00:45:07 [INFO] Loading properties
    6. 00:45:07 [WARNING] server.properties does not exist
    7. 00:45:07 [INFO] Generating new properties file
    8. 00:45:07 [INFO] Starting Minecraft server on *:25565
    9. 00:45:07 [INFO] This server is running Craftbukkit version git-Bukkit-0.0.0-766-
    10. g3fc0460-b818jnks (MC: 1.6.6)
    11. 00:45:07 [WARNING] Failed to load ban list: java.io.FileNotFoundException: banne
    12. d-players.txt (The system cannot find the file specified)
    13. 00:45:07 [WARNING] Failed to load ip ban list: java.io.FileNotFoundException: ba
    14. nned-ips.txt (The system cannot find the file specified)
    15. 00:45:07 [WARNING] Failed to load ops: java.io.FileNotFoundException: ops.txt (T
    16. he system cannot find the file specified)
    17. 00:45:07 [WARNING] Failed to load white-list: java.io.FileNotFoundException: whi
    18. te-list.txt (The system cannot find the file specified)
    19. 00:45:07 [INFO] Preparing level "world"
    20. 00:45:08 [INFO] Preparing start region for level 0
    21. 00:45:09 [INFO] Preparing spawn area: 4%
    22. 00:45:10 [INFO] Preparing spawn area: 16%
    23. 00:45:12 [INFO] Preparing spawn area: 32%
    24. 00:45:13 [INFO] Preparing spawn area: 40%
    25. 00:45:14 [INFO] Preparing spawn area: 48%
    26. 00:45:15 [INFO] Preparing spawn area: 56%
    27. 00:45:16 [INFO] Preparing spawn area: 61%
    28. 00:45:17 [INFO] Preparing spawn area: 69%
    29. 00:45:18 [INFO] Preparing spawn area: 73%
    30. 00:45:19 [INFO] Preparing spawn area: 81%
    31. 00:45:20 [INFO] Preparing spawn area: 93%
    32. 00:45:20 [INFO] Preparing start region for level 1
    33. 00:45:21 [INFO] Preparing spawn area: 4%
    34. 00:45:22 [INFO] Preparing spawn area: 4%
    35. 00:45:23 [INFO] Preparing spawn area: 8%
    36. 00:45:25 [INFO] Preparing spawn area: 12%
    37. 00:45:26 [INFO] Preparing spawn area: 12%
    38. 00:45:27 [INFO] Preparing spawn area: 16%
    39. 00:45:28 [INFO] Preparing spawn area: 20%
    40. 00:45:29 [INFO] Preparing spawn area: 20%
    41. 00:45:30 [INFO] Preparing spawn area: 24%
    42. 00:45:32 [INFO] Preparing spawn area: 24%
    43. 00:45:33 [INFO] Preparing spawn area: 28%
    44. 00:45:34 [INFO] Preparing spawn area: 32%
    45. 00:45:36 [INFO] Preparing spawn area: 36%
    46. 00:45:37 [INFO] Preparing spawn area: 40%
    47. 00:45:38 [INFO] Preparing spawn area: 40%
    48. 00:45:39 [INFO] Preparing spawn area: 40%
    49. 00:45:41 [INFO] Preparing spawn area: 44%
    50. 00:45:42 [INFO] Preparing spawn area: 48%
    51. 00:45:43 [INFO] Preparing spawn area: 52%
    52. 00:45:44 [INFO] Preparing spawn area: 53%
    53. 00:45:46 [INFO] Preparing spawn area: 61%
    54. 00:45:47 [INFO] Preparing spawn area: 65%
    55. 00:45:48 [INFO] Preparing spawn area: 69%
    56. 00:45:49 [INFO] Preparing spawn area: 73%
    57. 00:45:50 [INFO] Preparing spawn area: 73%
    58. 00:45:51 [INFO] Preparing spawn area: 77%
    59. 00:45:52 [INFO] Preparing spawn area: 81%
    60. 00:45:54 [INFO] Preparing spawn area: 85%
    61. 00:45:55 [INFO] Preparing spawn area: 89%
    62. 00:45:56 [INFO] Preparing spawn area: 93%
    63. 00:45:57 [INFO] Preparing spawn area: 97%
    64. 00:45:58 [INFO] Done (5.040s)! For help, type "help" or "?"
    65.  
     
  12. Offline

    Bashoogers

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I do that before.
    If u delete all files. It can be annoying to running the server.
    Try every time restart the CDM!
     
  13. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I believe that's essentially what I just tested for Phaedrus. I tried starting up the server using only the Craftbukkit jar file and the RUN batch file, with no plugins, and allowed it to generate any additional items it needed along with a new world file. Unfortunately, I'm still unable to connect.
     
  14. Offline

    Bashoogers

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Is your port forwarded?
     
  15. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    The system's firewall is set to allow all traffic across port 25565, regardless of type or request. The system is also using a static IP address accessible from any location (not on a home network or behind a basic router). Configuring port forwarding isn't needed.

    Testing the connection with the 32-bit java environment, clients can connect just fine. So the port (and computer) is perfectly accessible.
     
  16. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I've also tried client connections from 4 different computers in three different locations.
     
  17. Offline

    Phaedrus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Can you post the contents of your server.properties file?

    Also try disabling the windows firewall entirely as well as any anti-virus product you may have running.
     
  18. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Server Properties for the "clean" server:
    Code (Text):
    1.  
    2. #Minecraft server properties
    3. #Wed Jun 01 00:45:08 CDT 2011
    4. level-name=world
    5. allow-nether=true
    6. view-distance=10
    7. spawn-monsters=true
    8. online-mode=true
    9. spawn-animals=true
    10. max-players=20
    11. server-ip=
    12. pvp=true
    13. level-seed=
    14. server-port=25565
    15. allow-flight=false
    16. white-list=false
    17. spawn-protection=16
    18.  
    Server Properties for the original server setup:
    Code (Text):
    1.  
    2. #Minecraft server properties
    3. #Thu May 26 08:44:00 CDT 2011
    4. level-name=world
    5. hellworld=false
    6. allow-nether=true
    7. view-distance=10
    8. spawn-monsters=true
    9. online-mode=true
    10. spawn-animals=true
    11. max-players=20
    12. server-ip=
    13. pvp=true
    14. level-seed=
    15. server-port=25565
    16. allow-flight=false
    17. white-list=false
    18. spawn-protection=16
    19.  
    I've just disabled the firewall (Windows Firewall) and AV (MS Security Essentials) and will be restarting the system next.
     
  19. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Phaedrus, you're a genius.

    Success - Disabling the firewall across Domain, Home/Work, and Public profiles allows the clients to connect to the server.
    I suppose I just assumed the firewall wasn't an issue since the 32-bit client worked perfectly fine with the firewall on and the port exception enabled. Now my next question is...

    Why is the firewall wall blocking traffic associated with the 64-bit Java environment and allowing the 32-bit hosted services? The port exception I have configured is for a specific port # with no association tied to a particular service or application.

    While I'd be happy to leave the firewall down; we have our networks department which does random scans across the network to identify "vulnerabilities". The system will eventually show up as having it's firewall disabled.

    Since the issue has been identified - any idea what additional settings need to be configured to make the firewall happy with 64-bit java?
     
  20. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    And SOLVED.

    Apparently, when Java 32-bit and 64-bit were installed, they both made their own firewall exceptions (for a total of 4 exceptions). However, both exceptions were pointing to the 32-bit Program Files(x86) location of Java. Why the 64-bit version didn't create it's own proper pathing, I haven't a clue.

    When they were uninstalled, neither of them were removed.

    Now that only the 64-bit Java environment is installed, I re-examined the Java firewall exceptions and manually pointed all exceptions to the directory of the 64-bit Java.

    So either the Windows firewall was screwing me over, or someone at Java doesn't have the 64-bit firewall exception path set correctly by default.

    ---

    Feel free to cross-reference with the Minecraft forum thread (http://www.minecraftforum.net/topic/326475-solved-mc-server-windows-7-bukkit-64-bit-java/) should you experience any similar issues. The answers might be found within.
     
  21. Offline

    Phaedrus

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    I'd blame java. They don't always properly register the java path variable either. It gets especially messy with both 32 and 64 bit versions installed.

    glad to see you got it sorted out.
     
  22. Offline

    lawngnome

    dev.bukkit.org profile:
    CFUSERNAME
    My Plugins (CFCOUNT)
    Minecraft account:
    MCUSERNAME
    Yea, it looks like Java screwed me on this one. I didn't see the error until we narrowed it down to a firewall issue and even then until I started going through the firewall settings one-by-one. Interestingly enough, Java also only makes exceptions to the incoming rules and none outgoing.

    Thanks for all your assistance helping me track down the issue!
     

Share This Page