troubleshooting Question

Issue importing logs into Surftrackr

Avatar of modulok
modulok asked on
LinuxMySQL Server
15 Comments1 Solution831 ViewsLast Modified:
I have the latest version of Surftrackr (03-26-08) and an Ubuntu system that is up to date. Surftrackr uses the Django framework (version .96) and MySQL (version 5.0.51a) for the datebase.

When I run the python script that takes the data from Dansguardian access.log file (average size of 25MB) it imports it into the Surftrackr MySQL DB. It is rare that one log file finishes without a MySQL error. I am 80% sure this issue has to do with MySQL, I couldn't find any info in the KB or on Google.

Thanks,
Mike
Traceback (most recent call last):
  File "logfiles.py", line 377, in <module>
    log_parse(settings.LOGFILE)
  File "logfiles.py", line 156, in log_parse
    logger(2, 'Problem with line: "' + line + '" from file "' + log_filename + '"')
  File "logfiles.py", line 29, in logger
    message_log = Message.objects.create(date_added=datetime.datetime.now(), severity=severity, source=sys.argv[0], text=message)
  File "/usr/lib/python2.5/site-packages/django/db/models/manager.py", line 75, in create
    return self.get_query_set().create(**kwargs)
  File "/usr/lib/python2.5/site-packages/django/db/models/query.py", line 274, in create
    obj.save()
  File "/usr/lib/python2.5/site-packages/django/db/models/base.py", line 261, in save
    ','.join(placeholders)), db_values)
  File "/usr/lib/python2.5/site-packages/django/db/backends/util.py", line 18, in execute
    return self.cursor.execute(sql, params)
  File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 168, in execute
    if not self._defer_warnings: self._warning_check()
  File "/var/lib/python-support/python2.5/MySQLdb/cursors.py", line 82, in _warning_check
    warn(w[-1], self.Warning, 3)
  File "/usr/lib/python2.5/warnings.py", line 62, in warn
    globals)
  File "/usr/lib/python2.5/warnings.py", line 102, in warn_explicit
    raise message
_mysql_exceptions.Warning: Data truncated for column 'text' at row 1
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros