[Tool] CraftBukkit Server Manager [Mac & Linux]

Discussion in 'Bukkit Tools' started by PierreLouis, Jun 17, 2012.

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

    PierreLouis

    Could you try and replace:
    Code:
      ping -t 1 -c 1 google.com > /dev/null 2>&1
      if [ "$?" -eq 0 ]; then
        Online=true
        mode="-o true"
      else
        ping -t 2 -c 1 awardspace.com > /dev/null 2>&1
        if [ "$?" -eq 0 ]; then
          Online=true
          mode="-o true"
        else
          Online=false
          mode="-o false"
        fi
      fi
    With:
    Code:
      Online=true
      mode="-o true"
      if [ -z "$SSH_CLIENT" ]; then
        ping -t 1 -c 1 google.com > /dev/null 2>&1
        if [ "$?" -ne 0 ]; then
          ping -c 1 awardspace.com > /dev/null 2>&1
          if [ "$?" -ne 0 ]; then
            Online=false
            mode="-o false"
          fi
        fi
      fi
    If you're connected via ssh, it just skips the check.
    It should fix your issue, if it does, I'll do a proper update. :)
     
  2. Offline

    gustebeast

    It launches but it doesnt act normally. It doesnt ask "would you like to update cb", and when it starts up the info that states the cb version is in red text. Ill post some screenshots...

    This is what it looks like when I start it on my home computer...
    [​IMG]
    (debian server) This is the what it looks like. I have a craftbukkit.jar already in the folder...
    [​IMG]

    This is what it looks like when I change the setting in the launch config to dl spigot (switch from cb to spigot)
    [​IMG]

    And yes I did edit the launcher config
     
  3. Offline

    PierreLouis

    Oh, SpiGot changed it's domain...
    It's no longer "nyancraft.com:8080", but "ci.ecocitycraft.com".
    Just update, I changed it in the script, and it works now! :)
     
  4. Offline

    gustebeast

    can you update the download location on your main page, the automatic updater wont work for me untill I get the script working.

    Heres a video of what is happening to me...

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

    PierreLouis

    Right, sorry. It's updated.

    Thanks, I'll have a look!
    Also, is Transmit any good? I use ForkLift, which is pretty good but loses the connection all the time...
     
  6. Offline

    gustebeast

    I love transmit, one of my favorite applications

    With current version. I have all the normal files in the server folder except there is no craftbukkit.jar or spigot.jar. I run the command, no update questions, no nothing. Just goes straight to the bi-screen area. Server doenst start and it says "could not check for updates" in red.

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

    PierreLouis

    Thank you for letting me ssh in, the fix is out (1.0.6)! :)
     
  8. Offline

    gustebeast

    I started the script on my main server (large world file) and while running I typed /backup
    In the Script-Menu screen I got this error
    Code:
    Traceback (most recent call last):
      File "./script/MCQuery.py", line 127, in <module>
        port = int(sys.argv[2])
    ValueError: invalid literal for int() with base 10: '25565\n25565'
    rsync: link_stat "/home/gtb/minecraft/world/level.dat_new" failed: No such file or directory (2)
    IO error encountered -- skipping file deletion
    rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1060) [sender=3.0.7]
    I havent yet gotten a "Backup Complete" message so Im not sure if it stopped trying or if it is just taking a very long time (its been about 5 minutes).

    Edit:
    I deleted the script folder and regen'd it. I tried the backup command again and got this error.
    Code:
    Traceback (most recent call last):
      File "./script/MCQuery.py", line 127, in <module>
        port = int(sys.argv[2])
    ValueError: invalid literal for int() with base 10: '25565\n25565'
    Edit2:
    Strange, after running for a while, the script no longer accepts commands. When I type "list" into the prompt I get an "unknown command" prompt in the server log. I did this a few times and noticed a small error fly bye, I checked and found the same error as above, the MCQuery one.

    Edit3:
    Ok, now its just getting creepy. When it was in this state where I cant type any commands, certain strings end up going through, I assume its based on length of the message, for instance, typing "asehfkluashefkdf" outputs this to the server log
    Code:
    /give <player> <item|numeric> [amount <enchantmentname[:level]> ...]
    While this "asehfkluashefkdfasehfkluashefkdf" outputs the player list. Wtf??

    Edit4:
    It seems the "doesnt accept commands" glitch only happens when I try to use the /restart command from consol. Recently I have been always using /exit then restarting manually and I havent gotten the glitch yet.

    New development. I tried setting up backup with a scheduled restart. I switched the plugin option to false, and waiting for the scheduler. Right on time the server went down. I waited 5 minutes, but the server never came up. Eventually I ssh'd into the server and typed "screen -r Minecraft-Schedule". Heres the only thing I saw on the screen...
    Code:
    kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
    I then checked the backups folder and the backed up world file was there. It had backed up (at least partially) I couldnt check to see if any files were missing. If it wasnt through backing up, then the backup takes too long. Sure, I have a decent sized world file, but copying it and pasting shouldnt take more than 30 seconds or a minute tops.

    EDIT: Important new discovery!
    I think the backup may have worked fine, just the server cant restart itself. I turned off backup and did a regular schedule restart. It went down fine, but never came back up. And low and behold, when I screen'd in I saw the same error as above.

    And finally, could you remove the -(000/300)- part from the server-script part? It takes up space and doesnt update. Its not too much trouble to just type /list

    PierreLouis
    Did your comment disappear or have you just not yet seen my messages?

    Oh PierreLouis , where art thou?
     
  9. Offline

    D1G1T4L3CH0

    It seems the download link is giving a 404... I was really looking forward to using this and looking at the source, since I actually made my own, but it's nowhere near as advanced as this.
     
  10. Offline

    gustebeast

    Sorry, but Pierre hasn't been online since december 1st. I doubt he will ever be able to update the download.
     
  11. Offline

    D1G1T4L3CH0

    You are probably right, But that's only two months. Maybe he's been busy with life and plans to get back to this... I'm hoping anyway.

    On a side note, I might be able to pick this up as long as it's written in bash. Anyone have a copy of it?
     
  12. Offline

    gustebeast

    I was able to find a version. It is quite buggy, but it works. Besides the issues I have stated above, it has also had trouble when dealing with very large server.log files. Say when you restart a server after running it for 3 days.

    http://pastebin.com/sXA9rWpu
     
  13. Offline

    D1G1T4L3CH0

    Hey thanks a lot gustebeast!
    I'll be looking at it in more depth later. I have started my own script and put it on GitHub. But this will probably help me add some features to my own and figure out how certain things are done. My script on github is mc-shell. It's not very advanced and the code is pretty sloppy, it just does what I initially needed it to do. But since it's on github, anyone can help.
     
  14. Offline

    PierreLouis

    Hey guys, sorry for not updating you...
    I had lost my password for my Curse account, and just didn't come here when that happened.
    Then I lost interest with time.
    Anyways, I just updated the link to download the script.
    I'm not sure if I'll start this project up again, but we'll see! :)
     
  15. Offline

    gustebeast

    he has risen from the dead!


    But seriously, over time this script has deteriorated. I have had to make changes myself to keep it afloat. The first thing you should do if you want to stabalize the script is look at the posts I've made since you left. It would be awesome if you could at least bring the script back into working order.
     
  16. Offline

    PierreLouis

    I'll definitely do that, but you'll have to wait for this week-end at least, because I have a major exam tomorrow (I'm here to procrastinate ;) )!
     
  17. Offline

    gustebeast

    sounds good
     
  18. Offline

    PierreLouis

    Do you have bugs in mind? I didn't find much...
    I've fixed the updates.
     
  19. Offline

    gustebeast

    Well the backup and automatic restart features do not work. Here is how it should work...

    Automatic system restarts every 12 hours. 1 minute before that time it says "Restarting in 1 Minute". The server then goes down. The script stays open though, and while the server is off it does a backup of the world folders and all the plugin folders. There should be in the configuration a blacklist for both of these. Plugin folders that you dont want the system to backup (dynmap for example), and worlds that you dont want it to backup (world_the_end). Once the system is done backing up, it starts back up the server. There is another feature that would also be cool for this which would be automatically updating during the restarts. That way my server would always be up to date and I would never have to restart it. The issue that arrises here is that when big updates (1.4.7 -> 1.5.1) occur, it often breaks plugins, and it would be bad if that happened automatically. I'm not sure if this is possible, but the ideal situation would be that it would only automatically update if the version available was for the same version of minecraft that the server is currently using. Perhapse this could be done by analyzing the .jar file name? Once again though, this last feature would just be a nice addition, not completely necessary. Finally, the whole restart/backup process should be able to run on a linux computer with no GUI.

    The other thing that has come up is that the script seems to be quite slow at exiting and starting up. I think this may have something to do with a large server.log.

    Also for server.log's, It makes sense for the script to work with small log files because it makes the process faster, but it is kind of annoying to have my logs cleared every time I exit out. Could you make it so that instead of deleting the old log file it moves it into a folder called 'logs'. That way if someone wants me to check them for advertising or something, I have a record to go to.

    Im almost certain this is not doable, but just in case I will say it. It would be usefull if I could scroll back through the chat log that appears above the script menu. That way I could see the tops of error messages and such. The key detail though is that it would have to be supported in a screen session which I am fairly sure is impossible.

    Finally, a few things about the input line in the script menu. The player list info thing - ( 00/50 ) - doesnt work on my linux computer for some reason. I would be fine just removing it if you arnt up for fixing it. Im not sure if this is fixable, but the command line where you type stuff clears every 10 seconds or so. It doesnt delete what you are typing, but just hides it. So if I press enter it still types the command. The issue is if I am typing some long command and it clears, I forget where I was so I need to retype the whole thing. Lastly, when I press the up arrow, instead of displaying the previous command I typed it displays ^[[A. When I press enter it does work, but it would be nice to see the message before I type it. All of these script menu fixes are small issues that would just improve useability. Not nearly as important as the issues listed above.

    P.S.
    Could you explain how the LauncherAliases.properties works? I try typing /example and example into the command line and both just return "Unknown Command" in the log.
     
  20. Offline

    PierreLouis

    I haven't responded to everything, I'll get back to you with more later. :)

    I'll look into speeding things up. Can't promise huge perfomance increases, but I'll go for it!

    It's not supposed to clear them, it just moves it to the temp folder, and brings it back once it's done (adding the new entries). It works when I try it.
    Maybe that's because you had an old version, after the 1.0.7 update this should work. (I hope so!)

    I could add a command that opens the log in yet another screen, where you just type exit to get out of.

    You should enable query in server.properties, it should then work.
    If it isn't; I threw a quick hack together that counts the number of times "player joined the game" and "player left" texts appear and do the maths. It's kind of clunky, but gets it right most of the time.
    Because of the log issues you seem to have, this probably doesn't work.

    I have to clear the screen to update the status bar with the server's info.
    Press delete, it'll bring back what you were typing.
    I can't really fix this, unless I move the status bar to it's separate screen. I had tried that, but didn't like the look because of the white bar separating the screens.

    Lastly, when I press the up arrow, instead of displaying the previous command I typed it displays ^[[A. When I press enter it does work, but it would be nice to see the message before I type it. All of these script menu fixes are small issues that would just improve useability. Not nearly as important as the issues listed above.[/quote]

    They're case sensitive. Try "/Example"
    I'll see what I can do about that.
     
  21. Offline

    gustebeast

    5 conversations at the same time

    I am not sure 100% on whether that function is working. Personally though I would rather it work the way I described. With your method, if you want to have logs going back several days, you would need to have a huge server.log file. This means it takes a long time to open up and view (remember I use a remote linux box so I need to download everything via ftp). Thats why my preferable method would just move the old server.log to a log folder on start up, and create a new one.

    No worries, I'll just use ftp to view the full log file if need be. I was only suggesting the idea in case if it was a simple fix.

    First off, I do have query enabled so that is not the issue. As for your counting method, I dont think it is the way to go, it's too clunky. Querying makes the most sense, and it does work on mac computers and probably windows as well, so I wouldnt bother trying to edit the player count feature further.

    This relates to the player count indicator aswell. Personally, I do not get much benefit from the status bar in general. Im sure it would be usefull in a few situations, like if the world indicator is red or something. For me, the bar causes a lot more costs than benefits. I understand that some users would like to keep the bar though, so my suggestion is just to add a new setting in the config. 'status-bar: false'. This would remove the status bar and stop the 10 second updates. That way it would function as just a normal input field for me.
    You didnt comment about the ^[[A issue, but I think that this change would fix that aswell.

    I tried /Example, still got the "unknown command" message.


    Finally, what about the backup/scheduel fix? Does it sound doable?
     
  22. Offline

    PierreLouis

    I'll try this out.

    It's really basic, I'll add it. :)

    I know it's bad, I just threw that in because I could do it, and it did work ok.
    But the script defaults to query, so if it sees it's enabled, it'll use that.

    Good idea! I implemented that.
    But I don't think there's a way for me to enable you to use arrows to go back to other commands...
    I could write my own shell, and use it for the prompt; but I won't get into that now.

    I figured this out, the script didn't check for the command prefix when using aliases.
    So in your case "Example" should work, even though you set "CommandPrefix" to "/".
    I fixed it.

    I'm working on it right now! :)
    The world backups have a whitelist, so if you don't want to backup "world_the_end", just remove it from "BackupList".
     
  23. Offline

    gustebeast

    In my LauncherAliases.properties, I have this line.

    tester="say This is an example alias
    say You can have multiple lines!"

    When I go to the script, both 'tester' and '/tester' just give the unknown command message.

    This also reminds me. I think it would make more sense to have the aliases file in the script folder.

    Ah I see, but will you add a similar system for the plugin backup feature aswell? I suggest blacklist because people are usually adding/removing plugins fairly regularly. The blacklist wouldnt need to be constantly updated.
     
  24. Offline

    PierreLouis

    Does the update (1.0.8) fix the aliases?
    I'll make it a blacklist then.
     
  25. Offline

    gustebeast

    It keeps renaming the configuration to "LaunchServer-old.properties". I reconfigure the new one it gives me, but after I restart it renames it again.

    Also the Aliases do not appear to be working. I tried /Example and Example, both returned unknown command.

    Most importantly, I cant use the command prompt any more. It is just stuck on "waiting to initialize". Can you just remove that? The way it worked before didnt seem to be a problem.


    Edit:
    I switched enable-query=false and the both the initialize and -old.properties issues stopped occuring.
     
  26. Offline

    Hushed

    Is there any chance I can get a link to a copy of the latest version of this?
     
  27. Offline

    gustebeast

    Script is currently in development. It isnt even written in bash anymore. Its a python based script with a web interface.
     
Thread Status:
Not open for further replies.

Share This Page