Bukkitserver on Ubuntu need help

Discussion in 'Bukkit Help' started by digga, Aug 4, 2012.

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

    digga

    Hi,

    First of all i want to say i am quite new to ubuntu or general to linux. To describe my problem i think it's better to say what i did so far.

    - adduser minecraft
    - wget craftbukkit in his homedir
    - downloaded and configured this init script

    Ok so my the problem which occurs now is that the server starts but i doesnt generat the world. I locked up the logs and saw it always stop at this line
    I also tired to start the jar with a normal shell script, but this also ends in the same log. Does anybody know what to do here?

    Sorry for my bad english;)
     
  2. Offline

    lokpique

    Put a line in before the startup line that changes the directory to your bukkit folder.

    Basically it sounds like it's trying to start the server from another location, so it will be unable to find any of the other files.. even if it tries to generate them, as it's not pointing to the directory that they are being generated in.

    for instance, i run my server in the /srv/MineServer folder...
    so my script...

    !#/bin/bash
    cd /srv/MineServer
    java - yadda yadda yadda (i use screen so you definitely dont want that hehe)

    Try this and let me know how it works (obviously replacing /srv/MineServer with whatever the FULL folder path is to your server)
     
  3. Offline

    digga

    My craftbukkit.jar is in the folder /home/minecraft/server. The startscript is like this

    !#/bin/bash
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar

    If i run this it starts the server and the console looks like this
    After this it just stops and i can do anything
     
  4. Offline

    lokpique

    Are you sure java has access to read/write to that folder? Are you running as the user "minecraft" or are you accessing the minecraft user homefolder from another account?
     
  5. Offline

    digga

    I moved the jar to /srv/minecraftserver and started it with java -Xmx1024M -Xms1024M -jar craftbukkit.jar nogui
    but it keeps stopping after the "This server is running..."
    one time it said


    What does this mean?

    Ok, i dont know what to do know i tried everything.

    - Reinstalled Ubuntu
    - Adduser minecraft --no-create-home --disabled-login
    - mkdir /opt/minecraft/server
    - chown -R minecraft /opt/minecraft
    - su minecraft
    - cd /opt/minecraft/server
    - wget "http://dl.bukkit.org/downloads/craftbukkit/get/01249_1.2.5-R5.0/craftbukkit.jar" -O "craftbukkit.jar"
    - script /dev/null
    - screen -S minecraft
    - java -Xmx1024M -Xms1024M -jar -craftbukkit.jar

    System:
    Ubuntu 12.04
    4 GB Ram
    QuadCore AMD Opteron

    Java -version:
    java version "1.6.0_24"
    OpenJDK Runtime Environment (IcedTea6 1.11.3) (6b24-1.11.3-1ubuntu0.12.04.1)
    OpenJDK Client VM (build 20.0-b12, mixed mode, sharing)

    Any hints what to do or what is wrong?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  6. Offline

    lokpique

    Are you able to post that log file it generated?
    /srv/minecraftserver/hs_err_pid16767.log

    Is it any different if you dont use screen?

    It still honestly looks like somehow java isn't able to actually write to that folder, or is trying to write somewhere else.

    #!/bin/bash
    cd /opt/minecraft/server
    java -Xmx1024M -Xms1024M -jar craftbukkit.jar

    ^^^ use that as your script and let me know what it does. That directory change is pretty important. Also, try going into the minecraft folder and doing this...

    chmod -R 777 *

    That will ensure the full system is able to access that folder fully. If this works after that then we have at least narrowed down the cause.

    Also, I would look into switching to sun java instead of openjdk. For most applications they are both the same, except for when a program makes extensive use of memory like minecraft does. You will see MUCH larger garbage collection times with openJDK over the real thing, espeically if it breaks into your swap partition.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 27, 2016
  7. Offline

    digga

    Sorry i cant post u the hs_err log, did a reinstall of Unbuntu. I used ur Script,but it ends in the same bug.
    The Server stops after these outputs:
    I did chmod 777 alle files are displayed green now. I dont think the problem is that it cant create files, cause bukkit created the bukkit.yml, help.yml, server.log.lck, server.log and the server.properties. About the openJDK, i installed Oracle Java 7 now following this script guide.

    java -version:
    java version "1.7.0_05"
    Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
    Java HotSpot(TM) Client VM (build 23.1-b03, mixed mode, sharing)

    Now after executing the script nothing happens. :(
     
  8. Offline

    lokpique

    if you type :

    ps au

    does the console spit out any lines that contain java?
     
  9. Offline

    digga

    yes this one

    1001 6600 0.1 0.9 1174532 38776 pts/3 Sl+ 19:36 0:03 java -Xmx1024M
     
  10. Offline

    lokpique

    Ok so it did start it up. It's also running in screen too. Try using "screen -R" and see if it connects.

    Or connect with your minecraft client and see if it lets you play :)
     
  11. Offline

    digga

    Minecraft login not possible: Connection refused
    If i switch to screen it looks like this [​IMG] so i cant do anything
     
  12. Offline

    lokpique

    Try a reboot to make sure all instances of java are stopped.

    Then try running WITHOUT screen. Use the console.

    Also... have you turned off the ubuntu firewall? type "ufw -disable" from your command line. Many people don't even realize it is there.
     
  13. Offline

    digga

    I got now ubuntu firewall installed, and if i start it without screen the console is just crashing :(
     
  14. Offline

    lokpique

    Any error messages?
     
  15. Offline

    digga

    Nothing :(
    I enter the command to start cursor switches to next line and it stops there for ever

    I switched back to openJDK for trying it the core dump error occured.

    te hs_err data
     
  16. Offline

    lokpique

    Error accessing class data sharing archive. Mapped file inaccessible during execution, possible disk/network problem.

    That line explains it all, and is exactly why i recommended a full chmod +R 777 on the entire folder (and all subfolders with the -R).
     
  17. Offline

    digga

    I did this before (did it again) all files are marked green in putty. After starting with start.sh a java error orccured

     
  18. Offline

    lokpique

    Am I reading this right? Did you install ubuntu without a swap partition?
     
  19. Offline

    digga

    I did install it through the webinterface of my hoster :(

    free -m

    I tried to start a normal minecraftserver with java -Xmx500M -Xms500M -jar minecraft_server.jar nogui and it worked. But after connecting it crashed:( Second tried ended up in the same like craftbukkit.

    About the swap what do i need to do?
     
  20. Offline

    lokpique

    It should have asked you during the setup / installation. The swap on linux is a lot different than windows. WIndows just uses a file, where linux actually partitions out a section of the disk for itself.

    type free -m into the console... does it show a value for the swap file? This could be simply a case of the java log not reporting it as it might not have used it.
     
  21. Offline

    digga

    Installing Ubuntu from my host is like clicking on 1 link online and it reinstalls it. I have no opertunity to choose any swap partition :(
     
  22. Offline

    lokpique

    OH wait... this is a remote server? I thought you had ubuntu installed on a computer that is phyically with you. Is that not the case?
     
  23. Offline

    digga

    No its a virtual rented server ;) Sorry that i didnt mentioned that before
     
  24. Offline

    lokpique

    You will then have to talk to the people you rent this from, unfortunately. There are several ways they could have this setup... and diagnosing them through this forum will take AGES, where they would be able to answer you instantly.

    I would offer to telnet into it and have a look for you, but you would have to trust me with a lot, and i'm not comfortable with that aspect of it.
     
  25. Offline

    digga

    Ok, i wrote my hoster an email, about the problem. Thanks for your help sofar, rly nice that there are ppl like u;)
     
  26. Offline

    lokpique

    Always glad to give it a shot :) Let me know how it turns out!

    Also, which host are you using?
     
  27. Offline

    digga

    Strato, i tried to configure swap, but i am not permitted to use the command swapon
     
  28. Offline

    lokpique

    Depending on if they used LVM or not you wont be able to do it without rebooting to a live disk, which isn't an option for you :(

    And if you do not know what LVM means, then I would strongly suggest not touching the partitions in the least.

    What happens if you type "free -m" into the terminal?
     
  29. Offline

    digga

    this

    root@h2057119:/home/franz# free -m
    total used free shared buffers cached
    Mem: 4096 1969 2126 0 0 1913
    -/+ buffers/cache: 56 4039
    Swap: 0 0 0
     
  30. Offline

    lokpique

    Yeah no swap... but that could just mean they have it configured by other means through whatever setup they have. Sounds to me like they are running some form of VMware.

    have you tried making a folder right there in your home folder for the minecraft server?
     
Thread Status:
Not open for further replies.

Share This Page