Problem with script to start Minecraft on linux

Discussion in 'Bukkit Help' started by pleasecraftme, Nov 20, 2011.

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

    pleasecraftme

    Hi, I'm french, so I'm sorry for my bad english.
    So, I was make a Bukkit Server in a Private server (online.net) which uses Linux Ubuntu 10.04.

    I tried to execute this script : https://github.com/Ahtenus/minecraft-init

    Would it be possible to adapt it to my server, or to help me configure it properly? (this script is not for craftbukkit only ?!)

    I have an account for launch craftbukkit.jar: "minecraft"
    MCPATH='/home/minecraft
    SERVICE='craftbukkit.jar'
    I use Multiverse
    I just want this little command : Start/Stop/Restart/Backup/Update/
    And the mc_update is for craftbukkit.jar only (no minecraft_server.jar)

    Again thank you for your help, I know I ask a lot :'(
     
  2. Offline

    Nitnelave

    What isn't working? what error do you have, what are you doing, what should you see? We need more info to help you.
    Et si tu veux, tu peux m'écrire en français, si t'es plus confortable.
     
  3. Offline

    pleasecraftme

    je ne pourrais poser les erreurs que tout a l'heure (la le serveur tourne mais avec Putty donc il y a des joueurs)
    Mais concrètement, il cherche a faire des updates tout seules, a chaque reboot, parfois il ne trouve pas craftbukkit.jar.
    Et la plupart du temps, il est annoncé comme "Lancer" mais il est impossible de s'y connecté.

    je suis désolé si je ne peux pas vous montrer les erreurs maintenant, et on peut reporté la question à ce soir si cela semble plus judicieux.
    Merci !
     
  4. Offline

    Nitnelave

    J'essaierai de me reconnecter ce soir, mais je vois pas pourquoi il ferait des updates.... Il éteint le serveur, le met à jour, et le redémarre automatiquement sans que tu lui aies demandé? Bizarre... Update() n'est appelé que lors de la commande.
    Il faudrait que tu décrives plus précisément ton problème.
     
  5. Offline

    pleasecraftme

    N'ayant plus personne de connecté sur le serveur, je vous propose d’accéder directement au commande pour que vous regardez les erreurs si cela vous intéresse ?
     
  6. Offline

    Nitnelave

    Non. J'ai d'autres trucs à faire, je vais y aller, mais je vais essayer de me reconnecter ce soir.
     
  7. The log would also help!
    Maybe you got some rights wrong...
    The Craftbukkit server should also be named craftbukkit-0.0.1-SNAPSHOT.jar for better compability (apparently, don't really know why)
    I could build you the initscript if you post the output of "ls -lha /home/minecraft" and a your not working script.
    (Tu peus continuer a rependre en francais si tu veus ;) Mais mez connaissance ne suffice pas pour repondre, sry ^^')
     
  8. Offline

    pleasecraftme

    The script : http://pastebin.com/b3C2zRCU (From Ahtenus)
     
  9. Mmh except for the problem that you would create the backup inside the to-be-backed-up-folder there seems to be nothing wrong with your script. (Only 1 changed line)
    Did you make it executable? (chmod +x /etc/init.d/minecraft)
    Are the PleaseCraftMe and PleaseCraftMe_nether your default worlds created by the server? (In other words, are they configured in the server.properties config?)
    What does your log look like? (/home/minecraft/server.log)
     
  10. Offline

    pleasecraftme

    Yes Pleasecraftme is my world by default.
    I have lost the .log in a backup
     
  11. You want the nether as normal world?
    Aren't there older logs in /home/minecraft/logs/?
    If not, just recreate the error by restarting the server :p Then you should have a fresh log.

    But I just saw that everything in /home/minecraft is owned by root. That may cause the errors. Try sudo chown -R minecraft /home/minecraft
    (My bad for not seeing this before)
     
  12. Offline

    pleasecraftme

    And I launch the server with ?(account)
     
  13. Initscripts are always launched by root, so sudo /etc/init.d/minecraft (if it is not in /etc/init.d you should move it there now)
     
  14. Offline

    pleasecraftme

    Thanks you very much, it's WORK! :)
    i have close Putty, but if a Open Putty with Root access, it's reboot the Server ?
     
  15. No problem :)
    Are you asking if Minecraft is stoppped when you close Putty?
    If so, no it isn't, it's running in the background, so you can close and reopen a Putty session anytime without affecting your Minecraft Server ;)
    If you want, however, restart, stop or just control the server, you can do that by using the init-script (/etc/init.d/minecraft help will show you all commands) or over the "screen" by loging into the minecraft user with Putty and typing screen -r gara in your case. There you can execute every possible command that can be executed over the chat.
     
  16. Offline

    pleasecraftme

    Okay, it's good !
    The backup doesn't work ... (wee see the message "Backup complete" but he doesn't have a backup ...)
    I will not ask for more help. I understand fully that you are tired :p
    but if you just know where it comes from, it would be very nice ;)
     
  17. What Backups?
    Full Backups of the server or World-Backups?
    The Backups of the world are stored in /home/minecraft/minebak/
    Full Server-Backups are stored in /home/serverbak/minecraft (if you changed WHOLEBACKUP= to my suggestion)
     
  18. Offline

    pleasecraftme

    Everything is configured as you have told me. and this does not mean ...
    And I run the "root" account, it executes all actions (backup, save, restart ...)
     
  19. So it just doesn't save anything in /home/minecraft/minebak/ nor /home/serverbak/minecraft/ ?
    If so, try chgrp -R minecraft /home/minecraft/minebak and chgrp -R minecraft /home/serverbak/minecraft
    Then try /etc/init.d/minecraft backup and /etc/init.d/minecraft whole-backup.
    After it finished the Backups, look into the two folders again if there are any files. If yes, it is working fine.
     
  20. Offline

    pleasecraftme

    /home/serverbak/minecraft WORK
    But /home/minecraft/minebak/ doesn't work ... RRrrRhhHhhhh
     
  21. Do you have any worlds in /home/minecraft/worldstorage?
    The Script only backups the worldstorage folder.
    If you want the main World to be backed up, do following:
    edit - typo in 4th line corrected
    Code:
    cd /home/minecraft
    /etc/init.d/minecraft stop
    chgrp -R minecraft /home/minecraft/minebak
    mv PleaseCraftMe worldstorage/PleaseCraftMe
    mv PleaseCraftMe_nether worldstorage/PleaseCraftMe_nether
    ln -s /home/minecraft/worldstorage/PleaseCraftMe /home/minecraft/PleaseCraftMe
    ln -s /home/minecraft/worldstorage/PleaseCraftMe_nether /home/minecraft/PleaseCraftMe_nether
    If your also want to increase performance execute the following afterwards:
    Code:
    /etc/init.d/minecraft ramdisk PleaseCraftMe
    /etc/init.d/minecraft ramdisk PleaseCraftMe_nether
    /etc/init.d/minecraft links
    Now /etc/init.d/minecraft start (it should take a while the first time after these commands) and everything should be running :)
     
  22. Offline

    pleasecraftme

    Everything is running !
    (of that I log in as root, everything is reset (start / stop / backup ..) this is normal?)
     
  23. What do you mean? (explain it in french if it's easier for you :p)
     
  24. Offline

    pleasecraftme

    Des que je me connecte en "root" sur Putty, le script lance toutes les options, donc en clair: il stop/start/backup/update... tout d'un coup !
    Une petite explication du ramdisk au fait? :p
     
  25. Tous ce que l'y a dans le ramdisk peut etre accéssé plus rapidement. (Ramdisk=Sur le RAM)
    Ca se lance tous de suite sans que tu fasse quelque chose?
    Ou juste de temps an temps?
    A tu mis des régles dans le Cron qu'il fasse des whole-backups?
     
  26. Offline

    pleasecraftme

    Des que je me connecte sur root, tout s'execute d'un coup. Ou quand le dédié s'éteind et se rallume, cela réinitialise également ... et cela est gênant car il charge parfois des backup sans même que je le décide
     
  27. Mmh bizarre...
    Je ne sait pas d'où ca vient :/
    Si tu veus pas que sa s'execute chaque fois que tu l'allume, execute ca: update-rc.d -f minecraft remove
     
  28. Offline

    pleasecraftme

    J'aimerais juste que quand il s'allume, le script execute juste le start, pas toute la panoplie (start/stop/backup...)
    En gros, si le serveur dédié restart, j'aimerais que le script lance juste le start (ce qui est normale) et quand je me connecte au compte, qu'il ne face rien tant que je ne fais pas de commande ... mais je ne veux pas remove :s
     
Thread Status:
Not open for further replies.

Share This Page