How to setup a Ubuntu CraftBukkit Server (x64) running Java x64

Discussion in 'Bukkit Help' started by TnT, Jan 15, 2011.

Thread Status:
Not open for further replies.
  1. Offline

    Skadar

    I gotta say TnT that this thread helped me quite a bit getting a Minecraft server going on an Amazon EC2 instance. I'm even using your rsync script to back up to a remote machine. I guess I'm average in linux, so this really helped me out along the way.

    Would you be able to point me in the right direction for enhancing the rsync script to perhaps auto-number the minecraft backups and then delete the oldest ones automatically? It would be cool to have a rolling group of backups rather than a single entity.

    Cheers!
     
  2. Offline

    blutherz

    Hi this thread was helpfull for me too, and it also works with JAVA 7 x64
    Thank you!
     
  3. Offline

    TnT Retired Staff

    @Skadar
    I don't have one whipped up, but essentially what you would do is rsync it to your remote directory and gzip up those files into one archive based on the date. You just need to add in the archiving into your current script. PM me if you can't figure it out, I'll whip one up.
     
  4. Offline

    gainer

    Whats going on with mine? it wont load sever and im confused now. This is what shows up in cmd prompt everytime...

    [Lnet.minecraft.server.Statistic;@1995d80
    146 recipes
    [Lnet.minecraft.server.Statistic;@1995d80
    16 achievements
    16:30:26 [INFO] Starting minecraft server version Beta 1.5_02
    16:30:26 [INFO] Loading properties
    16:30:26 [INFO] Starting Minecraft server on *:25565
    16:30:26 [WARNING] **** FAILED TO BIND TO PORT!
    16:30:26 [WARNING] The exception was: java.net.BindException: Address already in
    use: JVM_Bind
    16:30:26 [WARNING] Perhaps a server is already running on that port?
    >no
    16:30:36 [SEVERE] java.lang.NullPointerException
    16:30:36 [SEVERE] at net.minecraft.server.MinecraftServer.b(MinecraftServe
    r.java:394)
    16:30:36 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftSer
    ver.java:291)
    16:30:36 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(Sour
    ceFile:394)
    16:30:36 [SEVERE] Unexpected exception
    java.lang.NullPointerException
    at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:394)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:291)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:394)
    >
     
  5. Offline

    MrPendulum

    How typical. I find this thread only now, after figuring all this out for myself >___<

    It's nice to know that I did things the right way though.

    My only question, does the "-d 64" parameter actually make any difference? This is the only thing I didn't do.
     
  6. Offline

    TnT Retired Staff

    @MrPendulum
    It doesn't hurt to try, but it is there to force the 64 bit binaries by default. Should improve performance.
     
  7. Offline

    MrPendulum

    Thanks for the answer. [diamond]

    I'm migrating to my new server tonight. In testing I'm already seeing a dramatic improvement in chunk loading performance, but that's most likely caused by jumping from a 900MHz Celeron to a dual core 1.66GHz Atom D510 ;)
     
  8. Offline

    Chasingu

    My server runs on openJDK, so I don't think this is accurate.
     
  9. Offline

    Taranis01

    @TnT
    in thinking about renting a Debian vServer (i could choose Ubuntu to, but i get Confixx for free when using Debian). Maybe im overreaching myself, since i never had anything to do with linux.
    I guess your tutorial works as well with Debian?
    Maybe i will chooso Ubuntu after all cuz i just like it and there is a great german Ubuntu-Community.
    But setting up a Minecraftserver and (maybe) also a Webserver without experience on that OS will not be easy.
     
  10. Offline

    TnT Retired Staff

    @Taranis01
    Yes, my tutorial should be pretty close for Debian.
     
  11. Offline

    ReKLiS

    i have a server on windows 7 that i want to move over to a virtualbox running ubuntu server but i have no expierence with ubuntu. I've managed to install ubuntu but i don't know how to use winscp to transfer files over. Can anyone help me?

    Nevermind figured out how to transfer files. Now i just need to transfer the server files from one os to the next

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 8, 2016
  12. Offline

    Samovar

    why do you use -d64? If you install java x64 you cant run anything in a 32-bit environment. Easy to check it with
    Code:
    java -d32 -version

    You should get something like
    Code:
    Error: This Java instance does not support a 32-bit JVM.
    Please install the desired version.
    And dont replace it with
    Code:
    -server

    "-server" option is implicit with the use of -d64 (you can find it here http://download.oracle.com/javase/1.4.2/docs/tooldocs/solaris/java.html)
     
  13. Offline

    TnT Retired Staff

    @Samovar
    The -d64 option may not help, but won't hurt either. I just haven't updated my post to reflect it.

    The -server option is useless if you run a server OS, as it will use that option by default.
     
  14. Offline

    Munrek

    If you dont use ubuntu or a debian-based distribution, you can substitute update-alternatives by ln -s :
    Code:
    cd /bin/
    ln -s /opt/java/64/jre1.6.0_27/bin/java
    
     
  15. Offline

    DerekZil

    I have a Windows 7 x64 computer.
    So if I do this I will be able to make my server run faster?
    Because when I try to run 3GBs of RAM on my regular craftbukkit server it says not enought memory, but I have 4GBs on my computer.

    Will this allow me to fix that?
     
  16. Offline

    ukballer1012

    what do I put as user and group for the command sudo chown <username>:<group> /opt/craftbukkit
     
  17. Offline

    ukballer1012

    Disregard my last question. So when I type ./start.sh this happens:
    root@V-2559:/opt/craftbukkit# ./start.sh
    Unable to access jarfile craftbukkit.jar

    Someone please help me, I've been trying to get this to work and it's really frustrating.
     
  18. Offline

    TnT Retired Staff

    @ukballer1012
    Do you have a file called craftbukkit.jar in your /opt/craftbukkit directory?

    Can you do an "ls -la /opt/craftbukkit" and paste the output please?
     
  19. Offline

    ukballer1012

    root@V-2559:~# ls -la /opt/craftbukkit
    total 8572
    drwxr-xr-x 2 root root 4096 Sep 28 01:26 .
    drwxr-xr-x 4 root root 4096 Sep 28 01:17 ..
    -rw-r--r-- 1 root root 8748701 Sep 28 01:20 craftbukkit-0.0.1-SNAPSHOT.jar
    -rwxr-xr-x 1 root root 65 Sep 28 01:26 start.sh
    root@V-2559:~#
     
  20. Offline

    TnT Retired Staff

    @ukballer1012
    Change you start.sh to have this file name: craftbukkit-0.0.1-SNAPSHOT.jar
    Instead of: craftbukkit.jar
     
  21. Offline

    ukballer1012

    I don't really understand what you're telling me to do, I'm sorry. Where is the file and how do you change its name? I'm a noob so bear with me :p
     
  22. Offline

    CeramicTitan Retired Staff

    hi, how do i install java?
    i use 'sudo apt-get install openjdk-7-jre'(without quotations)
    and i says E: Unable to locate package openjdk-7-jre
    thanks for your time
    plz help
     
  23. Offline

    Grimmy777

    why do you recommend ubuntu over say.. centos? what are the advantages?
     
  24. Offline

    TnT Retired Staff

    Mostly because I'm most familiar with it. CentOS is just fine. So are most flavors of *nix.
     
  25. Offline

    Grimmy777

    Thank you. I am going nuts trying to figure out what is lagging my server. I have managed to get memory greatly under control now and usually have more then half my memory free which is great but my cpu usage is so high. The following thread is the only one other then the main thread that seems to be using the cpu much:
    Code:
    "Thread-12" prio=10 tid=0x00002aaac00b6000 nid=0x6b3 waiting on condition [0x000000004264d000]
       java.lang.Thread.State: WAITING (parking)
            at sun.misc.Unsafe.park(Native Method)
            - parking to wait for  <0x00000006a5754fc0> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
            at java.util.concurrent.locks.LockSupport.park(LockSupport.java:186)
            at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2043)
            at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
            at org.bukkit.craftbukkit.ChunkCompressionThread.run(ChunkCompressionThread.java:39)
            at java.lang.Thread.run(Thread.java:722)
    I am guessing that this is the chunk compression thread but is it normal for it to constantly be using 10-20% cpu? This is even with load player loading around 8 players. My main thread is usually around 140% or more. Like I said, I have a lot of memory free so I don't think that is a factor. My current start command is this:

    Code:
    screen -dmS minecraft java -Xmx5750M -server -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:+CMSIncrementalPacing -XX:+AggressiveOpts -XX:+CMSParallelRemarkEnabled -XX:+DisableExplicitGC -XX:MaxGCPauseMillis=500 -XX:SurvivorRatio=16 -XX:TargetSurvivorRatio=90 -XX:+UseAdaptiveGCBoundary -XX:-UseGCOverheadLimit -XX:UseSSE=3 -XX:PermSize=128m -XX:LargePageSizeInBytes=4m -jar craftbukkit-0.0.1-SNAPSHOT.jar nogui
    I have compiled that start command from various forum threads reading different do's and do nots and then seeing what actually works best for my server. This has greatly helped my memory but my cpu does not seem to be affected.
    Here is my plugin list. Most of these are small plugins and a few of them could be taken off until needed. Please focus on the specific plugins vice the quantity. Any help you all can provide would be greatly appreciated.

    Code:
    AUTO MESSAGE
    BACKTOBODY
    BEDRESPAWN
    BEDROCKCONTROL
    BLIFT
    BLOCKPAINT
    BSHORTCUT
    CFBANNER
    CHUNKREGENERATE
    COLORME
    COMMANDSIGNS
    CONTROLLERBLOCK
    ESSENTIALS
    FACTIONS
    HAWKEYE
    ICONOMY
    JOBS
    JSONAPI
    LAGMETER
    LOCKETTE
    MCMMO
    MINECRAFTRKITPLUGIN
    MOBDISGUISE
    MOREMINECARTSTARTERPLUGIN
    MULTIVERSE-CORE
    NARROWTUXLIB
    NIGHTLIGHT
    NOCHEAT
    NOCRAFT
    NO FARM
    OBUJUSTSHUTTHEHELLUP
    OPENINV
    PERMISSIONS BUKKIT 1.2
    PERSONAL CHEST
    PORTECOULISSANTE
    REGISTER
    RESIDENCE
    SAFEFIRE
    SERVERSAVE
    SHOWCASE
    SIMPLESPLEEF
    SPAWN CONTROL
    SPOUT
    STARGATE
    STEALTHLOGIN
    SUPERPERMSBRIDGE 1.2
    SUPERPICKAXE
    VAMPIRE
    VANILLA
    VANISHNOPACKET
    VIP
    VOTIFIER
    WEATHER RESTRICTIONS
    WEBSEND
    WORLDEDIT
    
     
  26. Offline

    AKsicppy

    do chmod +x start.sh
     
  27. Offline

    monir

    What should xms and xmx be on a 24G or 16 G server ?
     
  28. Offline

    TnT Retired Staff

    I wouldn't set them any higher than 22 or 14-15 respectively. Depending on all the other functions the server does, I usually like to leave one, maybe two GB just for the tasks that aren't the main java thread.

    XMS value can be low, around 2-4GB is just fine.
     
  29. Offline

    monir

    What would be the difference if i set Xms to 2G or 4G does it work better with 4 or it dosent matter?
     
  30. Offline

    TnT Retired Staff

    Xms is the starting value for the heap size. I doubt you'll see much of a difference unless the server actually needs that many GB of heap space right off the bat. You can play with that value or remove it all together - the only time you'll see a performance difference is on freshly starting the server.
     
Thread Status:
Not open for further replies.

Share This Page