[ADMIN] CraftBukkit Initscript for CentOS/Fedora/Ubuntu

Discussion in 'Bukkit Tools' started by Super Jamie, Feb 19, 2012.

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

    Java Script

    Hi try to run root and then you look in on your minecraft account and then you run the code. still error? then try to move it to your desktop (every minecraft file) then typ the code so is directed to your desktop.
     
  2. Offline

    asakofdonuts

    thanks so much was looking for something just like this, i'm running fedora 19 64bit and it seems to work just fine. was able to start the server, backup, check status, and check info. I also am using openjdk and haven't had any issues.

    THANKS FOR THIS

    Code:
    [root@localhost /]# minecraft status
    * CraftBukkit status: Running (pid 10765).
     
    [root@localhost /]# minecraft info
    - Java Path          : /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.60-2.4.3.0.fc19.x86_64/jre/bin/java
    - Start Command      : java -Xms1024M -Xmx8192M -Djava.net.preferIPv4Stack=true -XX:MaxPermSize=128M -XX:UseSSE=3 -XX:-DisableExplicitGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=4 -XX:+AggressiveOpts -XX:+UseCompressedStrings -jar craftbukkit.jar nogui
    - Server Path        : /home/bukkit/craftbukkit
    - World Name        : world
    - Process ID        : 10765
    - Screen Session    : minecraft
    - Memory Usage      : 2024 Mb (2072864 kb)
    - Active Connections :
    Proto Recv-Q Send-Q Local Address          Foreign Address        State
    tcp        0      0 0.0.0.0:25565          0.0.0.0:*              LISTEN
     
    [root@localhost /]# minecraft backup
    * CraftBukkit is running. Commencing save...
    * Notifying users of save...
    * Setting server read-only...
    * Saving map named "world" to disk...
    * [OK] Map saved.
    * Backing up CraftBukkit map named "world"...
    * Syncing "/home/bukkit/craftbukkit/world" to "/home/bukkit/backups/world"
    * Syncing "/home/bukkit/craftbukkit/world_nether" to "/home/bukkit/backups/world_nether"
    * Syncing "/home/bukkit/craftbukkit/world_the_end" to "/home/bukkit/backups/world_the_end"
    * Creating compressed backup...
    * [OK] Backed up map "world".
    * [OK] Backed up map "world_nether".
    * [OK] Backed up map "world_the_end".
    * Backing up the CraftBukkit server executable...
    * [OK] Backed up executable.
    * CraftBukkit is running. Re-enabling saves...
     
  3. Offline

    lorenzorota

    I had to reinstall everything due to data loss and I keep getting this:

    Code:
    [lorenzorota@fore-craft ~]$ mc start
    * CraftBukkit was not already running. Starting...
    * Using map named "world"...
    su: user “lorenzorota” does not exist
    * Checking CraftBukkit is running...
    * [ERROR] Could not start CraftBukkit.
    nevermind fixed it a long time ago
     
  4. Offline

    cannafix

    i just cant get this to work.
    if a use a minecraft command i get this:

    * [ERROR] Settings file /etc/sysconfig/minecraft is not applying. Can't run!
    Check your options are uncommented and you haven't copied the <<COMMENT block.

    my /etc/sysconfig/minecraft look like this:

    SERVERNAME="MineDawgsZ"
    SERVICE="craftbukkit.jar"
    SERVER_URL="http://cbukk.it/craftbukkit.jar"
    USERNAME="bukkit"
    MCPATH="/home/bukkit/craftbukkit"
    CPU_COUNT="1"
    BACKUPPATH="/home/bukkit/backups"
    BACKUPS_TO_KEEP="7"
    SCRNAME="minedawgz"
    INVOCATION="java -Xms512M -Xmx512M -Djava.net.preferIPv4Stack=true -jar $SERVICE nogui"

    tried as root and as bukkit.


    anybody have a solution as i have no more ideas how to fix it?
    ps im a linux noob.
     
  5. Offline

    Super Jamie

    You also need the line which says SETTINGS_FILE_WORKING="1"
     
  6. Offline

    cannafix

    thanks that worked.. when do you implement the say command in it?

    also i have some problem with the script.

    1. when i run the script with the user bukkit i cant join the server not even if i use the java command. seems that the user bukkit cant run it like the root user can?

    im getting this in my crash-report
    http://dev.bukkit.org/paste/yrta6fmq28s1ub0h/
    2. How do i make i start by itself when my os is restarting..
    what am i doing wrong?

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

    requiemzz

    Im getting the following error:
    Code:
    [bukkit@localhost ~]$ minecraft start
    * CraftBukkit was not already running. Starting...
    * Using map named "world"...
    bash: line 1: -XX:MaxPermSize=128M: command not found
    bash: line 2: -XX:+UseParallelOldGC: command not found
    bash: line 3: -XX:+AggressiveOpts: command not found
    * Checking CraftBukkit is running...
    * [ERROR] Could not start CraftBukkit.
    [bukkit@localhost ~]$ 
    Any ideas?
     
  8. Offline

    Super Jamie

    Thanks for the reminder. I have added it with today's update.

    I think we might have replied on GitHub, but your INVOCATION line is spread across multiple lines, like this:
    Code:
    INVOCATION="java -Xms1024M -Xmx1024M -Djava.net.preferIPv4Stack=true
    -XX:MaxPermSize=128M -XX:UseSSE=3 -XX:-DisableExplicitGC
    -XX:+UseParallelOldGC -XX:ParallelGCThreads=$CPU_COUNT
    -XX:+AggressiveOpts -XX:+UseCompressedStrings -jar $SERVICE nogui"
    Make it one line, like this:
    Code:
    INVOCATION="java -Xms1024M -Xmx1024M -Djava.net.preferIPv4Stack=true -XX:MaxPermSize=128M -XX:UseSSE=3 -XX:-DisableExplicitGC -XX:+UseParallelOldGC -XX:ParallelGCThreads=$CPU_COUNT -XX:+AggressiveOpts -XX:+UseCompressedStrings -jar $SERVICE nogui"
    So your bukkit user can't run the script, or can't join the server to play the game?
    If bukkit can't run the script, follow the chmod and sudo steps in the Installation Guide.
    If your bukkit user can't join the server, that's a server permissions problem, you need a valid minecraft.net or Curse account, and to add your user to white-list.txt. That's just basic server admin you need to do to any Minecraft server, even the Mojang one.

    This is a Java problem. Disable all plugins. If it still happens, report it to the Bukkit devs.
    Follow the Installation Guide. You need to add the script to chkconfig, then chkconfig it on.

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

    requiemzz


    we did. That worked thanks.
     
Thread Status:
Not open for further replies.

Share This Page