Inactive [INFO/WEB] Netstats v5.0.4 - Keeps track of player playtime and online status [RB 1.1-R3]

Discussion in 'Inactive/Unsupported Plugins' started by Valrix, Feb 13, 2011.

  1. Offline

    Valrix

    Netstats v5:
    COMPLETE!
    Keep up with development in BukkitDev!
    Netstats - Player Monitoring Plugin:
    Plugin Version: v5.0
    Web Version: v3.0

    Netstats watches players as they join and leave the server and keeps track of how long they've been logged into the server as well as keeping track of their current online/offline status while using very little system resources. The information is stored in a database which is defined by the user. First time using Netstats it will create the config file then disable itself until you change the config to match your database. Then you can reload or restart the server and it'll start collecting information immediately.
    Source Code: Netstats

    OLD CHANGELOG (open)

    Version 4.7
    • Bug fixes
    • If you don't supply a "database" in the config it will attempt to make it's own database named "NetStats" then create the table "netstats" inside it.
    • Fixed repetitive code and unnecessary MySQL connections when doing multiple queries one-after-another (reduces database calls, speeds up the code, and uses less resources).
    • Reduced code complexity (simplified certain calls and removed hacky functions to improve code performance by around 5-10% in my tests)
    Version 4.6
    • Fixed the bug that happened when trying to change the name of your stats table.
    • Fixed the bug that messed up everyone's total play time (sorry)
    • Code improvements and uses less code for database calls
    Version 4.5
    • Fixed the bug where folders weren't being made.
    Version 4.4
    • Converts the total play time to be saved as seconds instead of milliseconds to increase maximum play time. This will now match the PHP code, so if you changed it, change it back.
    • Now disables and re-enables itself instead of reloading the server when doing a wipe
    • Some code improvements
    Version 4.3
    • No longer requires the /lib/ folder since CB already contains the needed drivers
    • v5 is close to being ready and will bring large speed improvements
    Version 4.2
    • Fixes the bug that creates .stats folders instead of files.
    Version 4.1
    • Many code improvements to improve speed and memory usage.
    • Thanks to @jascotty2 for the code to fix how player and mob kills are handled
    Version 4.0
    • Many bug fixes
    • Changed how total play time was saved to the database
    • Fixed a bug with timed events
    • A new and improved Web update is nearly finished
    Version 3.9
    • Should work with RB 617
    Version 3.8
    • Fixed an issue with how files were handled.
    Version 3.7
    • Fixes issue of logged-in users being shown as offline after a reload
    • Fixed file creation bug where .stat files weren't being made properly
    Version 3.6
    • Fixed a bug where, depending on your region, your IP address was logged twice in the database. This was more of an issue with how the IP address was being grabbed than a problem with how it was stored.
    • Few other small fixes to prevent possible future bugs.
    Version 3.5
    • Changed how paths are managed by the plugin to be more OS-independent, hopefully fixing all "file not found" errors.
    • Removed checking if a database password exists or not.
    Version 3.4
    • Improved error logger that create a special log file with the exact info I'll need to find out what caused the problem.
    • Numerous bug fixes and speed tweaks
    Version 3.3
    • Added tracking of distance traveled
    • Added tracking of number of monsters a player has killed
    • Added tracking of number of other players a player has killed
    • Added the date of when the player first joined the server (after this version of Netstats has been installed, will only be correct after a full wipe of other stats)
    • Database will auto-build if it doesn't exist, otherwise it'll add columns if they're needed (so you don't have to do anything to update your database)
    • Config file now auto-updates and allows for comments (they need their own line however)
    • Many other code improvements and fixes to help it run faster and more efficiently.
    Version 3.2
    • Fixed the problem with saving to the database that everyone's been getting. (Only need the JAR)
    Version 3.1
    • Changed the namespace to com.sparkedia.valrix since I did the Java bit.
    Version 3.0
    • Rebuild of v1 to be more efficient.
    • Customized tracking based on "true" or "false"
    • What you don't want tracked won't be watched which improves performance
    • Timed updates (default is 90 seconds)
    • Fixed updating based on total actions user has done (default is 32)
    • Numerous performance tweaks
    • A "pretty" config file
    • Improved web script performance and added customized tracking (make it match your main config, variables are named the same for simplicity)
    • Web view tells when a player is still online and makes their name green if online, red if offline
    • Uses the "hybrid" method of player data saving like v1 to put less strain on the database
    • When saving to a database it is done dynamically so that only changed things are saved to cut down on the code needed and make smaller, faster calls to the database when saving (this was a big improvement on all previous versions)
    • Table name has been changed to "netstats" to not conflict with any other tables
    • NOTICE: You will need to remove your old data since it is outdated and the table is named differently with a few field name changes so make sure to use the .sql file to add it to your database. Please, before complaining about losing all the old data, realize that there's a 99% chance that it's wrong.
    Version 2.0
    • Complete revamp!
    • Now uses only flatfiles to store data, no more database issues!
    • Lots of code removed and improved for faster speed and less resource use
    • Customizable timed updates (default is every 30 seconds)
    • Customized tracking also reduces resource use by registering (or not registering) events as per your config so it only watches events that you want it to.
    • Web script will search for your CraftBukkit server when you first look at the web page.
    • You can choose where the server will save every player's .stats file by setting the "path" option in the config. The path is relative to your main server folder (where the world folder should be at). So if you set "path=../players/" then the .stats files will be in a folder called "players" in the folder that your server is in.
    • Table of player data is built depending on what your tracking and will change as you change the Netstats config file, nice and easy!
    • There are a few rules to setting paths that are listed above, make sure to read them!
    Version 1.8
    • Various code fixes and changes to improve how it runs.
    • Creates a new blank config file if it can't find one.
    • Only JAR has been changed. Get the newest one above, which I'll just reference from now on since it's faster than posting the same link over and over again.
    Version 1.7
    • Changed how files are accessed which should fix the "Too many files open" bug on Linux machines. Update the [JAR]
    Version 1.6
    • Hopefully fixed bug with connecting multiple times to a property file for each user. Only [JAR] needs updating.
    Version 1.5
    • Fixed a critical bug where user property files (where it saved your data before moving it to the database) wasn't re-defined when the plugin was reloaded. Now it looks for it after everything you do to make sure your data is always being recorded. Only the [JAR] needs to be updated.
    Version 1.4
    • Updated the files to work with the new constructor. You'll need only the [JAR] for this update.
    Version 1.3
    • Fixed a bug with how the plugin saves user data after a server crash
    • Added an Update.sql to add new columns to database table [Web.zip] (only for those upgrading from v1.2)
    Version 1.2
    • Added tracking of blocks broken
    • Added tracking of blocks placed
    • Added tracking of player deaths
    • Added more frequent tracking of total time online
    • Implemented new "safety" storage system
    • New storage system reduces number of database calls
    • Improved the way data is stored to database to take less code
    • The table of data is now ordered by who is online
    Version 1.1
    • Added tracking of player's last used IP address
    Version 1.0
    • Release of Netstats
    WEB CHANGELOG (open)

    Version 2.1
    • Some code cleanup and fixes as well as a better auto-updater that makes sure that the updater is the latest version before doing the actual update process.
    • Localization support for 7 different languages.
    • File name changes to be more netstats-specific which will prevent clashes of CSS and other pages.
    • Better include() and require() calls so a page is only added once which speeds up all the pages and keeps them from destroying each other.
    Version 2.0
    • Improved layout
    • Automatic code updates
    Version 1.0
    • Initial release of web code

    Donations: Don't forget to give amd3th some love too since he helped in making Netstats and came up with the idea (you rock!) as well as @marshall007 since he's been awesome by helping me in his spare time.
     
    Phaedrus, Niemand, D-Lew and 5 others like this.
  2. Am running it off MySQL 5.0.92 and its working fine. besides the mob and player kills not updating but thats all.
     
  3. Offline

    ThaMunsta

    Yeah I just tried a free MySQL host thats using 5.1 and no such luck. I still get the error I mentioned above. The only thing this fixed is the get.php file because
    Code:
    date_default_timezone_set(date_default_timezone_get());
    is now supported.

    I will keep trying. I really want this plugin to work! Looks fantastic on SharpShot's page... BLAH

    Well... It works if MySQL is local. I was hoping I could use a remote database but that's ok. Love this plugin!

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

    reckst4r

    Hello, it says i need to upload players.sql in the readme file, but i dont have a players.sql it aint in the zip file and aint generated when i run the server. How should i get it?
     
  5. Offline

    looklee

  6. Offline

    DerManuel

    Would it be possible to upload a version of netstat with

    log.severe("SQL: "+"UPDATE "+table+" SET "+sql);

    in Database.java, line 110 ?

    Then I can reproduce the error and (try to) tell you where exactly the problem occurs.
     
  7. Offline

    zazra

    i am kinda missing the .sql file...
     
  8. Here. Use this in your SQL

    Code:
    CREATE TABLE IF NOT EXISTS `netstats` (
      `id` int(11) NOT NULL auto_increment,
      `player` varchar(50) NOT NULL,
      `enter` bigint(20) NOT NULL default '0',
      `seen` bigint(20) NOT NULL default '0',
      `total` bigint(20) NOT NULL default '0',
      `logged` tinyint(1) NOT NULL default '0',
      `ip` varchar(40) NOT NULL,
      `broken` int(11) NOT NULL default '0',
      `placed` int(11) NOT NULL default '0',
      `deaths` int(11) NOT NULL default '0',
      `mobskilled` int(11) NOT NULL default '0',
      `playerskilled` int(11) NOT NULL default '0',
      `joindate` bigint(20) NOT NULL default '0',
      `distance` double NOT NULL default '0',
      PRIMARY KEY  (`id`)
    ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=0 ;
    Would it be possible to add groups to the mod, This would mean you can display players based on groups.
     
  9. Offline

    zazra

    Thnx!
     
  10. Offline

    Valrix

    Oh, wait I think I know what's wrong. I forgot that I had to change around some of the names in the database to make them work correctly and I don't think the plugin changes those for you. That's why the error is happening when it tries to store "seen=" because it doesn't see any column named "seen". A definite way to fix this is to just delete your table and it'll generate a new table for you and all the errors should stop. This is what I suggested before since to have an accurate Join Date you'd have to wipe all previous data. If you're not interested in having a Join Date, then just change around the database to look like this:

    Code:
      `id` int(11) NOT NULL auto_increment,
      `player` varchar(50) NOT NULL,
      `enter` bigint(20) NOT NULL default '0',
      `seen` bigint(20) NOT NULL default '0',
      `total` bigint(20) NOT NULL default '0',
      `logged` tinyint(1) NOT NULL default '0',
      `ip` varchar(40) NOT NULL,
      `broken` int(11) NOT NULL default '0',
      `placed` int(11) NOT NULL default '0',
      `deaths` int(11) NOT NULL default '0',
      `mobskilled` int(11) NOT NULL default '0',
      `playerskilled` int(11) NOT NULL default '0',
      `joindate` bigint(20) NOT NULL default '0',
      `distance` double NOT NULL default '0',
    
    "name" was changed to "player", "logout" was changed to "seen", "status" was changed to "logged", and everything after "deaths" should be added automatically by the plugin.

    Sorry for not realizing this sooner guys, that's my fault. Once you change those then everything should work. Once again, really sorry.

    I fixed the tracking of mob and player killing so they'll be tracked now. I'm still testing a few other database things to see if there can be any other problems and I'll try to resolve those. Also, I think I'll make a new class or function to create special log files and store those in /Netstats/logs/ and just have it post a "[SEVERE]: Netstats encountered an error, posting it to <logfile>.log" inside the Terminal window to cut down the clutter and when you need to post a bug report you can simply upload the file to the thread. In the log file I will have it store the error, what command or storage call caused it, etc. so I can try to find out exactly what did it. It may even contain what version of MySQL you're running, the server version, and so on so you won't have to explain it to me or have me ask, it'll tell me everything I need to know about the problem you're having. I'm going to work on that now before the update so if you guys run into any problems, I'll be able to sort them out (hopefully) easier and faster.

    Also, if you're willing to be a "crash test dummy" for Netstats whose job will be to get the newest version and try it out for me, fully accepting anything it may break, to make sure I have multiple testing environments and rub out any kinks before fully deploying it and having everyone break their server, please let me know and give me the best form of contacting you so whenever I need some testers you'll be the first few to know and I can have you try it out for me. I try and test as much as I can on my own, but that's only one person on a very specific setup, which can only test so much.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  11. I can test them but it would be limited. Its a live server.

    Ill send you a pm later on with my contact details.
     
  12. Offline

    ThaMunsta

    I can test as well. I finally sorted out my issues and have the current version running stable. Only a few friends playing on mine so its no biggie if things crap out on them.
    I'm also curious how I could get it to track player economy. SharpShot has it with iConomy i think but I am using the EssentialsEco plugin. Only slightly curious how difficult it would be.
     
  13. Offline

    Valrix

    I was thinking of trying to hook into it to provide some economy statistics as well. Once I figure out just how easy/hard it is to do then I'll try to do that. It's possible that it could just be done with PHP and have it access the iConomy table which would be much, much easier. Thing is I don't use many other plugins besides my own and only when I do testing, so I'd have to play around with it a bit my self to see what gets put in the table and then grabbing that data from the database is the easy part.

    I've done some fixes and improvements where the only thing you'll need for the actual plugin is the .jar, from there it'll automatically generate the config and create the folders it needs for you. It also downloads the connector for you and puts it in a folder called "lib" in the base server directory which seems to be the new standard of where to put things like the database connectors and shared files, etc. If it sees that the connector already exists it will just use that one instead of downloading a new one, just make sure not to change the names of the files or folders otherwise it'll keep creating them again and again. This means you can delete the previous one from the Netstats folder to get you some space back.

    Also, when an error occurs Netstats will generate a log file that you can simply upload and post the message that was given in the command prompt here. The log file will tell me what version of CraftBukkit you're running, the version of your MySQL server, which plugin version you're using, the error that occurred, and sometimes the exact MySQL that went wrong so I will be able to precisely find the problem. Only thing it doesn't tell me is what OS you're running, so just supply that with your post and the file.

    For those who are willing to do the testing for me, I've now got a "beta" folder in my DropBox that will be used for plugins that aren't quite ready to be released (mainly for bug testing). If you're bold, you may grab it anyway, but if something/everything breaks, it's not my fault. Either way, here it is: Netstats v3.4b

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 8, 2016
  14. To add money am using Iconomy in SQL mode. This is so I can get the data from the database.

    Am assuming you have the table in the same database as netstats.
    Add this below the while loop in the get.php file. You might have to change the SQL settings.
    PHP:
    $money mysql_query("SELECT * FROM iConomy WHERE username = '$name'");
    while(
    $row mysql_fetch_array($money)){
    $ibalance $row['balance'];
    };
    $ibalance number_format($ibalance);
    Now you just need to display this information. use $ibalance to display the money


    Works fine no errors. Ill report back after later when the server has had more activity.

    Edit.

    Blocks removed and places are being reset. Players are losing their total blocks removed.
     
  15. Offline

    firewalled

    Logged in players at the time of /RELOAD lost their stats (partial).

    I get some very strange queries, resulting in errors in the console:
    Code:
    18:01:09 [SEVERE] [Netstats]: Could not set data, MySQL error for: com.mysql.jdb
    c.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL synt
    ax; check the manual that corresponds to your MySQL server version for the right
    syntax to use near 'seen=1301328069845, total=169823814 WHERE player='Ashaari''
    at line 1
    18:01:18 [SEVERE] [Netstats]: Could not set data, MySQL error for: com.mysql.jdb
    c.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL synt
    ax; check the manual that corresponds to your MySQL server version for the right
    syntax to use near 'seen=1301328078345, total=169830970 WHERE player='Ashaari''
    at line 1
    18:01:23 [SEVERE] [Netstats]: Could not set data, MySQL error for: com.mysql.jdb
    c.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL synt
    ax; check the manual that corresponds to your MySQL server version for the right
    syntax to use near 'seen=1301328083142, total=169834267 WHERE player='Ashaari''
    at line 1
    18:01:45 [SEVERE] [Netstats]: Could not set data, MySQL error for: com.mysql.jdb
    c.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL synt
    ax; check the manual that corresponds to your MySQL server version for the right
    syntax to use near 'seen=1301328104189, total=169855314 WHERE player='Ashaari''
    at line 1
    I had a hard time finding out what caused these errors, enabling logging on the MySQL end reveals what the problem is:
    Code:
    110328 18:00:14  2933 Connect  [EMAIL][email protected][/EMAIL] on minecraft
                    2933 Query    /* mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name$
                    2933 Query    SHOW COLLATION
                    2933 Query    SET NAMES latin1
                    2933 Query    SET character_set_results = NULL
                    2933 Query    SET autocommit=1
                    2933 Query    SET sql_mode='STRICT_TRANS_TABLES'
                    2933 Query    UPDATE netstats SET seen=1301328014189, total=44194936 WHERE player='Durnanski'
                    2933 Quit
                    2934 Connect  [EMAIL][email protected][/EMAIL] on minecraft
                    2934 Query    /* mysql-connector-java-5.1.6 ( Revision: ${svn.Revision} ) */SHOW VARIABLES WHERE Variable_name ='language' OR Variable_name = 'net_write_timeout' OR Variable_name = 'interactive_timeout' OR Variable_name$
                    2934 Query    SHOW COLLATION
                    2934 Query    SET NAMES latin1
                    2934 Query    SET character_set_results = NULL
                    2934 Query    SET autocommit=1
                    2934 Query    SET sql_mode='STRICT_TRANS_TABLES'
    [B]                2934 Query    UPDATE netstats SET seen=1301328014189, total=44194936 WHERE player='Durnanski';seen=1301328014189, total=169765314 WHERE player='Ashaari'[/B]
                    2934 Quit
    
    Looks like it is trying to do some fancy multi-update in one query (the ;seen=)

    Oh, using the 3.4b on MySQL 5.1 (Linux)
     
  16. Offline

    vsTerminus

    @firewalled same issue here on 3.3

    mysql Ver 14.14 Distrib 5.5.9, for Linux (x86_64) using readline 5.1
    Linux Fenix 2.6.37-ARCH AMD Phenom(tm) II X2 555 Processor

    Code:
    11:38:33 [SEVERE] [Netstats]: Could not set data, MySQL error for: 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 'placed=placed+29, distance=distance+80.99557605750245, seen=1301330313452, total' at line 1
    11:38:33 [SEVERE] [Netstats]: Could not set data, MySQL error for: 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 'placed=placed+29, distance=distance+80.99557605750245, seen=1301330313452, total' at line 1
    
    etc.
     
  17. Offline

    Lord Chaos

    Any news on the SQL errors. I've had to completely disable netstats for the time being until its fixed or it simply floods the console with errors.
     
  18. Offline

    AreLam

    So staying on 3.2 looks like the best solution for me ATM... (Judging from posts) :/
     
  19. Offline

    reckst4r

    Hello, i get this error everytime i start up my server
    Code:
    20:31:18 [SEVERE] [Netstats] Your database settings aren't set. Disabling Netsta
    ts.
    20:31:18 [INFO] [Netstats] v3.3 has been disabled.
    But it is the right settings :/
    config.txt:
    Code:
    # Netstats Properties File
    host=localhost
    database=mcstats
    username=root
    password=
    oldTable=
    newTable=
    actions=32
    updateRate=90
    # Optional things to track. True = track, False = don't track
    trackIP=true
    trackBroken=true
    trackPlaced=true
    trackDeaths=true
    trackMonsterKills=true
    trackPlayerKills=true
    trackDistanceWalked=true
    
     
  20. Offline

    Valrix

    This does look a bit suspicious. There's another way I can do it that'll make it a bit slower, but may help with this. It seems that the version you're running or maybe your OS is handling the query in an odd way.

    I'll check on the block reset as well. Those with only MySQL issues it would be more helpful if you grabbed the newest beta version since that has a more advanced error logger that create a log file for you to upload to me that'll give me a lot of data. Regardless I'm going to try a different save method.
     
  21. Offline

    reckst4r

    Hey, Valrix i see you just answered vsTerminus 7 minutes ago, and that you're online so can you please answer before you log off?
     
  22. Offline

    firewalled

    From what I see, using 3.2 is the way to go right now, yes.
    That one worked pretty well on my server
     
  23. Offline

    Valrix

    Updated the beta version that should fix those pesky issues of it not saving the blocks placed/broken and if your version isn't creating an error log, then it's not the beta. Here's the link again for everyone, I'll also go put a link to it in the main post for testers to find it easier. Netstats Beta

    You don't have a password set. I have it check for a password, but it doesn't take into account you not having a password. I'll have it check for "null" as your password and if you put that it'll just use nothing instead of null. Best way I can think of going around it while still making sure all the info goes in.

    EDIT: Just updated the beta to accept "null" as an empty password.

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

    Nathan C

    Code:
    15:22:45 [INFO] Freed 113.65789031982422 MB.
    15:23:08 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    15:23:08 [SEVERE] [Netstats]: Error occurred when checking MySQL Version. Please inform Valrix jdev19.
    15:23:08 [SEVERE] java.lang.NullPointerException
    15:23:08 [SEVERE]       at com.sparkedia.valrix.Netstats.ErrorLog.save(ErrorLog.java:53)
    15:23:08 [SEVERE]       at com.sparkedia.valrix.Netstats.Database.update(Database.java:159)
    15:23:08 [SEVERE]       at com.sparkedia.valrix.Netstats.NetRepeater.run(NetRepeater.java:47)
    15:23:08 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    15:23:08 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:345)
    15:23:08 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    15:23:08 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    15:23:08 [SEVERE] Unexpected exception
    java.lang.NullPointerException
            at com.sparkedia.valrix.Netstats.ErrorLog.save(ErrorLog.java:53)
            at com.sparkedia.valrix.Netstats.Database.update(Database.java:159)
            at com.sparkedia.valrix.Netstats.NetRepeater.run(NetRepeater.java:47)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:345)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    EDIT: That locks the whole server up, but I can still use commands from in console.

    BETA version.

    MySQL version 5.0.51
     
  25. Offline

    Valrix

    No error log was created in the /logs folder?
     
  26. Offline

    firewalled

    The former (first?) 3.4b tried to generate an error log here, but failed to do so.
    I tried creating the logs/ dir, but same error message.
    Code:
    2011-03-28 22:41:39 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    2011-03-28 22:41:39 [SEVERE] [Netstats]: Couldn't find file plugins/Netstats/logs/NetErr_2011-03-28_10:41:39.log
    java.io.FileNotFoundException: plugins\Netstats\logs\NetErr_2011-03-28_10:41:39.log (The filename, directory name, or volume label syntax is incorrect)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileWriter.<init>(Unknown Source)
    at com.sparkedia.valrix.Netstats.ErrorLog.save(ErrorLog.java:38)
    at com.sparkedia.valrix.Netstats.ErrorLog.<init>(ErrorLog.java:29)
    at com.sparkedia.valrix.Netstats.Database.update(Database.java:153)
    at com.sparkedia.valrix.Netstats.NetRepeater.run(NetRepeater.java:47)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:345)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    2011-03-28 22:41:39 [SEVERE] [Netstats]: Error occurred when checking MySQL Version. Please inform Valrix jdev19.
    2011-03-28 22:41:39 [SEVERE] [Netstats]: Couldn't find file plugins/Netstats/logs/NetErr_2011-03-28_10:41:39.log
    java.io.FileNotFoundException: plugins\Netstats\logs\NetErr_2011-03-28_10:41:39.log (The filename, directory name, or volume label syntax is incorrect)
    at java.io.FileOutputStream.open(Native Method)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileOutputStream.<init>(Unknown Source)
    at java.io.FileWriter.<init>(Unknown Source)
    at com.sparkedia.valrix.Netstats.ErrorLog.save(ErrorLog.java:38)
    at com.sparkedia.valrix.Netstats.Database.update(Database.java:159)
    at com.sparkedia.valrix.Netstats.NetRepeater.run(NetRepeater.java:47)
    at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:345)
    at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    
    Edit: Guess my post some what answers the question right above.

    Just played for around 5 minutes (sole player on the server, and joined after update to most recent beta), no errors in console, blocks placed/broken seem okay etc.

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

    Nathan C

    It creates a file named NetErr_2011-03-28_04_19_56

    with this inside
    Code:
    # Netstats Error Log
    CraftBukkit Version: git-Bukkit-0.0.0-535-ge61f4ef-b545jnks (MC: 1.3)
    Netstats Version: 3.4
    
    It's really heartbreaking, since everything works, but it has to crash on this error. :'(

    Here's the more full error, but I think the one on the bottom has to do with the authentication servers being down?
    Code:
    16:24:15 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    16:24:15 [SEVERE] [Netstats]: Error occurred when checking MySQL Version. Please inform Valrix jdev19.
    16:24:15 [SEVERE] java.lang.NullPointerException
    16:24:15 [SEVERE]       at com.sparkedia.valrix.Netstats.ErrorLog.save(ErrorLog.java:53)
    16:24:15 [SEVERE]       at com.sparkedia.valrix.Netstats.Database.update(Database.java:159)
    16:24:15 [SEVERE]       at com.sparkedia.valrix.Netstats.NetRepeater.run(NetRepeater.java:47)
    16:24:15 [SEVERE]       at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
    16:24:15 [SEVERE]       at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:345)
    16:24:15 [SEVERE]       at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
    16:24:15 [SEVERE]       at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    16:24:15 [SEVERE] Unexpected exception
    java.lang.NullPointerException
            at com.sparkedia.valrix.Netstats.ErrorLog.save(ErrorLog.java:53)
            at com.sparkedia.valrix.Netstats.Database.update(Database.java:159)
            at com.sparkedia.valrix.Netstats.NetRepeater.run(NetRepeater.java:47)
            at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:122)
            at net.minecraft.server.MinecraftServer.h(MinecraftServer.java:345)
            at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:272)
            at net.minecraft.server.ThreadServerApplication.run(SourceFile:366)
    16:25:25 [SEVERE] java.net.ConnectException: Connection timed out
    16:25:25 [SEVERE]       at java.net.PlainSocketImpl.socketConnect(Native Method)
    16:25:25 [SEVERE]       at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
    16:25:25 [SEVERE]       at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
    16:25:25 [SEVERE]       at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
    16:25:25 [SEVERE]       at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
    16:25:25 [SEVERE]       at java.net.Socket.connect(Socket.java:529)
    16:25:25 [SEVERE]       at java.net.Socket.connect(Socket.java:478)
    16:25:25 [SEVERE]       at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
    16:25:25 [SEVERE]       at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
    16:25:25 [SEVERE]       at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
    16:25:25 [SEVERE]       at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
    16:25:25 [SEVERE]       at sun.net.www.http.HttpClient.New(HttpClient.java:306)
    16:25:25 [SEVERE]       at sun.net.www.http.HttpClient.New(HttpClient.java:323)
    16:25:25 [SEVERE]       at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)
    16:25:25 [SEVERE]       at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)
    16:25:25 [SEVERE]       at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)
    16:25:25 [SEVERE]       at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)
    16:25:25 [SEVERE]       at java.net.URL.openStream(URL.java:1010)
    16:25:25 [SEVERE]       at net.minecraft.server.ThreadLoginVerifier.run(ThreadLoginVerifier.java:24)
    
    Oh, this also ALWAYS seems occurs when someone joins or leaves, if that helps out.

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

    Valrix

    Alright, I'm gonna try something else to check the MySQL version since that doesn't seem to be working right. If that also gives an error then I'll just have to remove that from the code completely. I'll post here again once I've updated the beta.
     
  29. Offline

    firewalled

    I just played for 20 more minutes (sole player) and it seems to work flawlessly. Things updating, no errors in console (latest 3.4b)
     
  30. Offline

    Valrix

    And yes, that does help because when someone joins it's only one function being called off so I don't have to look around. I might know the problem already though.

    Alright, I just did away with checking the MySQL version automatically which should fix a few problems. Those who are doing testing for me, please grab the latest beta and I will be back in around an hour. I've got shopping to do! If you find any problems, etc. Just send a tweet my way.

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

    Nathan C

    Yep, that seem to do the trick. It is updating great, and no more crashes.

    EDIT:

    Code:
    # Netstats Error Log
    CraftBukkit Version: git-Bukkit-0.0.0-535-ge61f4ef-b545jnks (MC: 1.3)
    Netstats Version: 3.4b
    MySQL Error: 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 ';distance=distance+654.9216745578688, seen=1301350101340, total=101911 WHERE pla' at line 1
    Offending Statement: UPDATE stats SET broken=broken+5, placed=placed+3, distance=distance+102.30232840976751, seen=1301350101340, total=351205 WHERE player='NateN34';distance=distance+654.9216745578688, seen=1301350101340, total=101911 WHERE player='Prevailz';broken=broken+1, placed=placed+1, distance=distance+106.1961397407223, seen=1301350101340, total=356797 WHERE player='pilover';broken=broken+36, distance=distance+50.742125783789206, seen=1301350101340, total=357776 WHERE player='Anwe';distance=distance+65.56275091043081, seen=1301350101340, total=338152 WHERE player='Nickiscool231';distance=distance+0.8544449853797479, seen=1301350101340, total=333165 WHERE player='NuclearXeroX';distance=distance+172.61577560959373, seen=1301350101340, total=355173 WHERE player='Devian50';broken=broken+4, placed=placed+2, distance=distance+42.95588412487946, seen=1301350101340, total=356122 WHERE player='Alabar3000';
    
    Those error logs come in groups of four big groups as more players join, every once in a while.
    Code:
    17:17:40 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    17:17:40 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    17:17:40 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    17:17:40 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    17:17:40 [SEVERE] [Netstats]: Severe database error. Saving error log to plugins/Netstats/logs
    
    No crashes though, just those errors, which is good :D
     

Share This Page