[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: Pinging? (was: The status and future of Mixminion network)



Hi,

Nick wrote:
> Huh. It worked okay for me last time I was running it. What
> goes wrong when you try? Remember, "it crashes fiercely" is not
> much of a bug report.

You're right, sorry for being too sloppy...

First, one additional observation:
I've downgraded to SQLite 2.8.16-r4 and pysqlite 0.5.1 and now
it seems to work. Downgrading pysqlite alone did not help, and
pysqlite 2.3 needs SQLite >=3.1, at least with Gentoo Linux.

Second, nonetheless a more complete bug report for using the
current versions of SQLite (3.3.17) and pysqlite (2.3.3):

1. Python is not able to "import sqlite" and does not start the
   pinger. ("Running a pinger requires Python 2.2 or later, and
   the pysqlite module").

2. Change Pinger.py as follows. (Well, I should have mentioned
   at least this before...)

===== Beginn =====

--- Pinger.py.old       2007-09-26 22:01:52.000000000 +0200
+++ Pinger.py   2007-09-26 22:02:00.000000000 +0200
@@ -47,7 +47,7 @@
      succeedingMidnight, UIError, writePickled

 try:
-    import sqlite
+    from pysqlite2 import dbapi2 as sqlite
 except ImportError:
     sqlite = None

===== Ende =====

3. Then I found the following in mixminiond.log.

===== Beginn =====

Sep 26 22:17:26.458 +0200 [FATAL] Exception while configuring server
Sep 26 22:17:26.495 +0200 [FATAL] Traceback (most recent call last):
    File "/usr/lib/python2.4/site-packages/mixminion/server/ServerMain.py", line 1201, in runServer
    server = MixminionServer(config)
    File "/usr/lib/python2.4/site-packages/mixminion/server/ServerMain.py", line 673, in __init__
    self.pingLog = mixminion.server.Pinger.openPingLog(
    File "/usr/lib/python2.4/site-packages/mixminion/server/Pinger.py", line 1529, in openPingLog
    db = DATABASE_CLASSES[database](location)
    File "/usr/lib/python2.4/site-packages/mixminion/server/Pinger.py", line 114, in __init__
    self._theConnection = sqlite.connect(location, autocommit=0)
  TypeError: 'autocommit' is an invalid keyword argument for this function
Sep 26 22:17:26.496 +0200 [FATAL] Shutting down because of exception: exceptions.TypeError

===== Ende =====

4. From there, things went worse, as I tried to "fix" the SQLite
   wrapper. My Python skills are close to non-existent, but the
   pretty syntax was quite alluring... ;-)

> If the DB code is in fact broken, the next step is somebody
> fixing it. After that, there needs to be feedback from the
> pinger code to the directory code, so that servers are marked
> as down when the pinger thinks they're unreliable.

How is this step done at the moment? As far as I know, the
directory already does not recommend unreliable nodes.

> Whoever can make the code work should gets to write it for
> any database they want. ;) I'd be sad if it stopped working for
> pysqlite, but hey: I'm not putting enough time into that, so I
> don't think I get to complain.

In any case, you might still have some credits from previous
work, and from pointing people into the right direction... ;-)

Ciao

Tobias
-- 
mbox:admin@tainaron