Ubuntu console spam (unknown command)

Discussion in 'Bukkit Help' started by kurklais, Jun 24, 2014.

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

    kurklais

    Code:
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    [00:18:20] [Server thread/INFO]: Unknown command. Type "help" for help.
    Server spam this if i update my server to 1.7.5, 1.7.8 or 1.7.9
    Now i using 1.7.2 because its work..
    Please update craftbukkit ubuntu version!!!
     
  2. kurklais I doubt this has anything to do with the fact that you are running ubuntu, it all works the exact same regardless of whatever operating system you are on.

    Are you running commands? This is the default message which appears when commands are run. Perhaps your console is executing commands, causing this message to pop up.
     
  3. Offline

    kurklais


    I have tried to run it without plugins. And with basic config. I am starting craftbukkit.jar from shell script but not executing any commands. 1.7.2 is only version which works with ubuntu?

    DJSkepter

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

    Bobcat00

    Someone else had that problem and reported that it "was an auto command I had running every 300 seconds but I didnt have the plugin installed anymore!" So it's probably something you set up in the past, and now you've removed the plugin so the command it's issuing is no longer valid.
     
  5. Offline

    LHammonds

    There is nothing in 1.7.2, 1.7.5, 1.7.6 or 1.7.9 that does this by default. I only run my production servers on Ubuntu Server (12.04.1 thru 12.04.4 so far)

    To prove this to yourself, make a new folder, drop in a freshly downloaded craftbukkit 1.7.9 server and start it up.

    I guarantee that you (or your host) has something automated via plugins or crontab that is trying to issue a command. But I'm surprised the console log would not show what/who is issuing the command as well as what the command is.

    LHammonds
     
  6. Offline

    kurklais

    LHammonds I created a new folder and downloaded new 1.7.9 craftbukkit... but console says unknown command?
     
  7. Offline

    LHammonds

    That means something is running outside of Craftbukkit that is trying to send commands to it. Look in crontab.

    If you didn't put something there, then maybe your host is minecraft-specific and THEY are trying to send commands to your server.

    Does your "latest.log" file show the command being issued?
     
  8. Offline

    kurklais

    Code:
    # description "start and stop the minecraft-server"
     
    chdir /netdisk/craftbukkit
     
    exec su -s /bin/sh -c 'exec "$0" "$@"' minecraft -- /netdisk/craftbukkit/craftbukkit.sh > /dev/null
     
    start on runlevel [2345]
    stop on runlevel [^2345]
    
    LHammonds

    I am using this shell script starting craftbukkit. Actually when starting directly from shell prompt .jar seems to work (no unknow command message anymore). But I want to start it from the script, how do I fix this? This script works fine with 1.7.2.
     
  9. Offline

    LHammonds

    eh...are you saying that what you showed me in that code block is "craftbukkit.sh" ??? If so, it is recursively calling itself over and over
     
  10. Offline

    kurklais

    No, this is my craftbukkit.sh:

    #!/bin/sh
    BINDIR=$(dirname "$(readlink -fn "$0")")
    cd "$BINDIR"
    java -Xms5G -Xmx5G -jar craftbukkit.jar -o true

    The first script is called minecraft-server.conf and it is located in /etc/init/. Ubuntu uses first script to start minecraft as a service when ever server is booted. But like I said earlier this combination works only with 1.7.2. ?
     
  11. Offline

    LHammonds

    You never said if the "unknown command" showed up in the server log. That could shed a lot of light as to what some process is trying to do.

    I've never started a Minecraft server like that before. Not sure I'd want to.

    If you are willing, try this.

    Remove the "run as a service" setup and how it starts up at reboot. Make sure no instance of Minecraft is running.

    Start it up manually by typing the following:

    Code:
    java -d64 -XX:MaxPermSize=128M -Xincgc -Xmx5G -jar /path.to.your.server/craftbukkit.jar
    Wait and see if the "unknown command" shows up in the console. If so, you still have something somewhere trying to interact with your server. If not, then you have removed the "problem child"

    Once this is resolved, I'd then recommend setting up a script that will start your minecraft server and set it to run every minute of the day. If it detects the server already running, it simply exits. If not, it will try to start the server up...so even if it crashes or you issue the /stop command or reboot, the server will start right back up because of the crontab schedule and the startup script.

    I refined my scripts over time to handle various cases such as me wanting to shutdown one of the servers for longer than a minute or to have them shutdown indefinitely in preparation for a reboot (to give time for all servers to shutdown cleanly). When the script runs, it checks for several situations:

    1. Is there a "lock" file for the current script (e.g. is this same script already running?)
    2. Is java.exe already running in memory for the specific server (I use screen sessions)
    3. Does the /tmp/reboot-flag.txt file exist

    For #1, I always check for a script lock file for scripts that should only be running one at a time. If the lock file exists, I exit with an error code. If it does not exist, I create the lock file in /tmp and when the script exits at any point, it remove the lock file.

    For #2, you can do this several ways. If you only host 1 server, you can just do a "pidof java" check to see if java is running. If you have multiple servers running in screen sessions, you can check to see if a process is running for a particular user (if you use different user account for each server) such as "pgrep -u minecraft -f /opt/server/minecraft"

    For #3, I have a separate script that simply creates /tmp/reboot-flag.txt and all start scripts will cease trying to start any server while that file exists. That creation script runs 1st just before a reboot and I then shutdown all my server instances and finally reboot the server (anything in /tmp is removed upon reboot).

    LHammonds
     
Thread Status:
Not open for further replies.

Share This Page