Just got this set up on my server. I had to modify the file though, at line 204 and 207 the self. was missing before the server_id but except for that it appears to be working, I'll post if I have any other troubles with it.
Whoops. I think I dry-coded that in and haven't updated it on my server yet.
yep a restarter should work but what it does is spamming your table whenever script closes instead of just updating :tongue.gif: unless your server log is very clean
however if someone have the same issue use this script :smile.gif:
#! /bin/bash
until python parser.py ~/server3/server.log; do
echo "'parser.py' crashed with exit code $?. Respawning.." >&2
sleep 1
done
it would best if parser had some sort of reconnect ability, would make the job a lot more easier, as this is more a dirty method
The python parser works well on windows, able to connect to a linux database, however, when I use this parser under windows and connecting it to a local mysql server, it is unable to insert the values, but ID goes up. However I am able to insert values into the database manually, under the same account.
EDIT: So it must be the problem of the windows mysql server,
linux python parser->linux mysql works
linux python parser->windows mysql NOT WORKING
windows python parser->linux mysql works
windows python parser->windows mysql NOT WORKING
time data 'java.lang.RuntimeException: java.net.BindException:' does not match format '%Y-%m-%d %H:%M:%S'
time data 'Caused by:' does not match format '%Y-%m-%d %H:%M:%S'
time data 'java.lang.RuntimeException: java.net.BindException:' does not match format '%Y-%m-%d %H:%M:%S'
time data 'Caused by:' does not match format '%Y-%m-%d %H:%M:%S'
time data 'java.lang.NumberFormatException: For' does not match format '%Y-%m-%d %H:%M:%S'
I made some edits to the parser.py script, like adding a DB_HOST to the mysql connect, and fixed the problem I was having, which was caused by Java exceptions printing in the server log. And I can't attach it for some reason.
- Who's online
- Total time played
- Last seen
For more information, visit the GitHub page: http://github.com/dcramer/minecraft-tools
(This is only tested on a UNIX environment)
If this becomes used i'll add some basic configuration file.
DB_USER = "minecraft"
DB_PASS = ""
DB_NAME = "minecraft"
db = MySQLdb.connect(user=DB_USER, passwd=DB_PASS, db=DB_NAME)
to this?
DB_USER = "minecraft"
DB_PASS = ""
DB_NAME = "minecraft"
DB_HOST = "192.168.1.111"
db = MySQLdb.connect(user=DB_USER, passwd=DB_PASS, db=DB_NAME, host=DB_HOST)
Whoops. I think I dry-coded that in and haven't updated it on my server yet.
however if someone have the same issue use this script :smile.gif:
it would best if parser had some sort of reconnect ability, would make the job a lot more easier, as this is more a dirty method
EDIT: So it must be the problem of the windows mysql server,
linux python parser->linux mysql works
linux python parser->windows mysql NOT WORKING
windows python parser->linux mysql works
windows python parser->windows mysql NOT WORKING
Having the same problem now.
EDIT: So here's a Dropbox link: http://dl.dropbox.com/u/139336/parser.py.zip