moxie0 / Convergence

An agile, distributed, and secure alternative to the Certificate Authority system.
http://convergence.io
623 stars 127 forks source link

SQLite thread error/bug? #82

Closed 4ZM closed 12 years ago

4ZM commented 12 years ago

Running server rev: 5da2d1bbddc9e6b6bf3ce7c1e2cd1b353ea5af66

Get the following crash:

Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 286, in addCallbacks self._runCallbacks() File "/usr/lib/python2.7/site-packages/twisted/internet/defer.py", line 542, in _runCallbacks current.result = callback(current.result, _args, _kw) File "/usr/lib/python2.7/site-packages/twisted/internet/base.py", line 426, in _continueFiring callable(_args, _kwargs) File "/usr/lib/python2.7/site-packages/twisted/enterprise/adbapi.py", line 393, in finalClose self._close(conn) --- --- File "/usr/lib/python2.7/site-packages/twisted/enterprise/adbapi.py", line 439, in _close conn.close() sqlite3.ProgrammingError: SQLite objects created in a thread can only be used in that same thread.The object was created in thread id -1226474640 and this is thread id -1218700992

4ZM commented 12 years ago

Running the server (sparvnastet.org/2011/sparvnastet.notary) in foreground seems to be working.

sudo convergence-notary -f -i 194.14.172.49 -p 80 -s 443 -c /var/sparvnastet.org/convergence/sparvnastetnotary.pem -k /var/sparvnastet.org/convergence/sparvnastetnotary.key

The error above occurred when starting the server with the /etc/init.d/convergence script (updating the script with the args above, except for the -f).

moxie0 commented 12 years ago

Yeah, that stack trace is a problem in Twisted, is harmless, and is only printed on shutdown. Sounds like you were running the startup script with arguments pointing to the wrong cert/key.