[ADMN/SEC/WEB] HawkEye [BukkitDev]

Discussion in 'Archived: Plugin Releases' started by oliverw92, Aug 15, 2011.

  1. Offline

    oliverw92

    sethgandy, phimt, matan7890 and 7 others like this.
  2. Offline

    patey

    tables arent there,i had to create the db myself
    kinda updating from datalog- i tried it, it did same thing and then i happened to see hawk eye the moment it released XD
    datalog is configured exactly alike
    i deleted datalog webserver files (btw, i can access hawkeye webpage on my site)
    just got that new version,gonna try



    oh and cooloppo- always read original post:

    HTML:
    So what are these 'unique features'?
    
        Interactive and easy-to-use web interface for searching logs
    
        Rollback previews - physically see the changes before applying them
    
        [B]Chest contents logging and rollback[/B]
    
        WorldEdit rollback - revert changes in a WorldEdit selection
    
        Logging of over 30 different events and actions
    
        Super-optimised - perform massive rollbacks of over 100,000 results with no lag
    
        In-game browsing of logs - browse multiple pages of results in Minecraft
    
        Update checking - HawkEye will tell you when updates are out and required
    
        API allowing other plugins to log and retrieve information from the database
     
  3. Offline

    oliverw92

    Ah ok no worries :p

    Please read the op - it logs chest contents, you can even roll them back.

    You have to make the database yourself. The plugin will make the tables though.
     
  4. Offline

    patey

    database is made, it doesnt appear to be even attempting to make tables,states it cant connect to db and shuts down
     
  5. Offline

    oliverw92

    Is the MySQL database on the same machine as the minecraft server?
     
  6. Offline

    patey

    nope,connects to a computer on local network
    192.168.2.11
    my web server is on one computer and game server on another, reserves more ram for minecraft
     
  7. Can you log into your mysql server using the password and username you specified from the MC server using the mysql client (you know, mysql -u $USER -p -h $SQL)?

    And did you set any SQL access restrictions on the account? I'm doing this exact setup and I've not have a problem with it.

    Excellent, will try the 1.0.1 build.

    A few comments:
    Per the wiki, "(Optional) Spout if you want chest contents logging". I was not exactly pleased to see it automagically download spout when I hadn't specified to enable container logging (I'm assuming that "container-transaction" is the config option for this) during the upgrade from DataLog. I would suggest that the default be to not enable it so that 'more paranoid than I' :) admins aren't surprised by this (undocumented that I could find) functionality, especially considering that in other threads, spout (formerly bukkitcontrib) seems to be a cause of many, many issues (my own viewpoint based on what I have seen, nothing more).

    Also, having the auto version check be optional is probably a a Good Idea(tm) as well.

    Oh boo! :)

    Logged into the server with the 1.0.1 build, brought up the tool and left clicked (I turned up debug and tried again after I first ran into this):
    Code:
    11:31:56 [INFO] [HawkEye] DEBUG: Beginning search query
    11:31:56 [INFO] [HawkEye] DEBUG: Building players
    11:31:56 [INFO] [HawkEye] DEBUG: Building worlds
    11:31:56 [INFO] [HawkEye] DEBUG: Building actions
    11:31:56 [INFO] [HawkEye] DEBUG: Building dates
    11:31:56 [INFO] [HawkEye] DEBUG: Building location
    11:31:56 [INFO] [HawkEye] DEBUG: Building filters
    11:31:56 [INFO] [HawkEye] DEBUG: Building limits
    11:31:56 [INFO] [HawkEye] DEBUG: Ordering by data_id
    11:31:56 [INFO] [HawkEye] DEBUG: Searching: SELECT * FROM `datalog` WHERE world_id IN (2,1) AND action IN (0,1,2,8,9,10,11,13,14,15,17,18,19,20,26,27,28,29) AND x = -51.0 AND y = 65.0 AND z = -6.0 LIMIT 10 ORDER BY `data_id` DESC
    11:31:56 [SEVERE] [HawkEye] Error executing MySQL query: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY `data_id` DESC' at line 1
    11:31:56 [SEVERE] com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY `data_id` DESC' at line 1
    11:31:56 [SEVERE] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    11:31:56 [SEVERE] 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    11:31:56 [SEVERE] 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    11:31:56 [SEVERE] 	at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.Util.getInstance(Util.java:382)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3593)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3525)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1986)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2140)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2620)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2570)
    11:31:56 [SEVERE] 	at com.mysql.jdbc.StatementImpl.executeQuery(StatementImpl.java:1474)
    11:31:56 [SEVERE] 	at uk.co.oliwali.HawkEye.database.SearchQuery.run(SearchQuery.java:158)
    I'm not 100% sure it's not my end at this time, I will have to do some more digging later tonight (need to head into the office inna bit), but the web interface is also not returning anything, it just sits there and spins, not returning any results.

    EDIT: Switching the orderby and limit bits seems to pass validation:
    Code:
    ...ORDER BY `data_id` LIMIT 10;
    Disabling 'max-lines' also works, for obvious reasons.

    Another thought: I noticed that when the tool is used, it automatically replaced what I was holding with the log (I didn't have one in my inventory at the time) and moved said item over to another slot, but didn't put it back once I was done.

    With DataLog, the tool item would be added to my inventory, but not place it in my hand.

    While having it automagically appear in my hand is great, having it go away and/or at least put the original item back in place when one is one with the tool would make for a very nice touch.

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

    Plague

    changelog has to show at least two versions here without a spoiler
     
  9. Offline

    Styx Reborn

    Good to have something fresh and new.
     
  10. Offline

    patey

    yes i can access mysql in the exact same way with another plugin, its not my configuration- i have tested this many times- its to do with the plugin.

    after starting fresh with hawkeye and creating the things it kept saying were missing i finally at least got a diff error:
    Code:
    2011-08-16 16:57:55 [SEVERE] [HawkEye] Error whilst attempting to get connection: java.sql.SQLException: Must specify port after ':' in connection string
    2011-08-16 16:57:55 [SEVERE] [HawkEye] Error initiating HawkEye database connection, disabling plugin
    2011-08-16 16:57:55 [INFO] [HawkEye] Version 1.0.1 disabled!
    but i repeat: i added tables myself, empty, and hawkeye doesnt appear to be filling them although sees they are there

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

    AskewDread

    Working perfectly for me, created tables etc on first run and all running nicly
    Looking at that error it seems the port part in your config might not be right?
    mysql:
    port: 3306
     
  12. Offline

    oliverw92

    I have just changed it so Spout isn't automatically downloaded - it simply gives you a warning that chest logging won't work. Realised whilst it might be good for some, it could be bad for others.

    I am going to leave the version check required - it doesn't actually affect the server in anyway and it does more good than harm in 99% of situations.

    Ooo thanks I'll fix that in the next version. About the tool thing - I guess I could make it move that whatever is in the existing slot back there. This won't be a high priority though - probably schedule it for v1.1.0

    You shouldn't create the tables yourself. You need to make the database, but the plugin will make the tables for you. Also that error suggests you haven't got the port setting right.

    I don't mean to be rude, but there a masses of plugins in the main plugin section that have only one or sometimes no change log out of a spoiler. I find it a bit ridiculous that we must have the last two versions. I mean fair enough maybe one, but why two. It just spams up the main post and makes it more of a tl;dr for people to read :\

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

    DaClowns

    @oliverw92 are there any other plugins/anything else I need for this to work Before I download it? Or can I just put it in plugins, start my server, and it will work?
     
  14. Offline

    Plague

    Then report such threads (but not like 50 at once please), they have the post against plugin thread rules.
     
  15. Offline

    oliverw92

    If you want the worldedit rollback command you need worldedit. If you want chest contents logging and rollbacks you need Spout. The current version of HawkEye downloads spout automatically, although the next version won't. For now if you don't want spout, set 'container-transaction' in the config.yml to false.

    Ok. Also, op fixed.
     
  16. Offline

    poiuyt580

    For chest logging/rollbacks, is this the client side Spout or the server side Spout?
    Also, I couldn't find anything regarding chest logging/rollbacks in the usage section of the wiki, could you explain how I would check for chest content changes or how to rollback them?
     
  17. Offline

    oliverw92

    Server-side Spout. I will be updating the wiki a little more tomorrow to explain things about Spout etc. Chest contents and rollbacks work the same as any other event. You can use the tool block to show chest changes (it shows you all additions and substractions) and it works like any other rollback (e.g. /hawk rollback p:eek:liverw92 t:1d r:5 would rollback everything including chest transactions in a 5 block radius over 1 day). If you want to rollback just transactions you can do /hawk rollback a:container-transaction r:5, for example.
     
  18. Offline

    poiuyt580

    For rolling back chest transactions, if I took 5 stone out of your chest and you want to roll that back, would it take 5 stone out of my inventory and add it back to your chest? If so, what happens if I only have 2 stone in my inventory?
     
  19. Offline

    oliverw92

    No it does not change player inventories. I guess that could happen in the future, but for now it only rolls the chest contents back.
     
  20. Offline

    poiuyt580

    So then it potentially duplicates items.
    Ok, good enough. At least this plugin looks really good :)
     
  21. Offline

    oliverw92

    To be honest - if someone is stealing on your server and you need to roll them back, they should be banned anyway. In which case use something like OpenInv to wipe their inventory :) I have slated inventory rollbacks as a possible feature for v1.1.0
     
  22. Offline

    Tmidog69

    Never thought I'd find a plugin better than big brother here it is, I mean rollbacking wolrdedit, Finally, also there's 1 things I want to recommend that bigbrother never did, Log water currents and lava currents hitting blocks such as torhces, redstone, redstone torches, flowers, repeaters, ECT. I have a FreeBuild server that people grief redstone circuits. I know the water proof redstone plugin, just ti unrealistic. Thanks :D would be awesome and great work.
     
  23. Offline

    AskewDread

    Hey, it doesnt seem to read perms_users/groups files is there anyway to fix that?
     
  24. What version of spout does this work with?
     
  25. Offline

    patey

    im running it on port 3306,default
    Code:
    mysql:
        hawkeye-table: hawkeye
        port: 3306
        player-table: hawk_players
        username: Patey
        world-table: hawk_worlds
        hostname: http://192.168.2.11
        max-connections: 10
        password: mypassword
        database: hawkeye
    dont see where i'm going wrong, i did fresh install and only built database but still saying i have to enter port thats already there :/
     
  26. Offline

    but2002

    @patey
    Host name does not include http://
     
  27. @oliverw92
    Happy to report that after about 12 hours, I am only seeing a single open connection to the SQL server. :)
     
  28. Offline

    tombik

    Do you want me to translate in Czech? HawkEye sounds still great but DataLog was...part of my life...so it's hard to tell him that he has been replaced by bird of prey :'(!
     
  29. Can you please split the Tool node into a node that allows Tool use, and a node that allows getting a free Tool block when not having one.
     
  30. Offline

    tombik

    You still have got some DataLog info (behind #) in config: https://github.com/oliverw92/HawkEye/wiki/Configuration

    Sry for spamming but WHERE IS BLACKLIST FOR ITEMS? :/ I'm using it with datalog!

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

    oliverw92

    It SHOULD already roll things like that back. Have you tried it yet?

    Sorry I don't quite get what you mean

    Should work with any version - I'm only using a tiny part of Spout

    Get rid of the http:// . MySQL does not run over HTTP

    Thattssssss a nice connection you've got there. Shame if sssssomething where to happen to it

    Thanks, fixed

    I separated it into a different plugin, sorry I should have said. You can find it here: http://forums.bukkit.org/threads/se...got-nothing-on-these-commandments-1000.31630/

    BTW guys, if you are enjoying the plugin, help me by 'up voting it' on Blockface: http://plugins.blockface.org/ (just ctrl-f hawkeye to find it on there).

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

Share This Page