vdirsyncer
vdirsyncer copied to clipboard
Improve error message for when status db is locked
Hello, lately I can't successfully vdirsyncer sync
my calendars because of a
database is locked
error. Synchronization works fine with android's davdroid
which talks with the same server.
Your vdirsyncer version: 0.16.4 If applicable, which server software (and which version) you're using: Nextcloud 13 Your Python version: 3.6.4 Your operating system: Arch linux Relevant debug output:
Syncing my_calendars/jucy
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/cli/tasks.py", line 63, in sync_collection
debug: collection.name) as status:
debug: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
debug: return next(self.gen)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/cli/utils.py", line 227, in manage_sync_status
debug: status = SqliteStatus(path)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/status.py", line 119, in __init__
debug: self._update_schema()
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/status.py", line 127, in _update_schema
debug: with _exclusive_transaction(self._c) as c:
debug: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
debug: return next(self.gen)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/status.py", line 13, in _exclusive_transaction
debug: c = conn.execute('BEGIN EXCLUSIVE TRANSACTION')
Syncing my_calendars/personal
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/cli/tasks.py", line 63, in sync_collection
debug: collection.name) as status:
debug: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
debug: return next(self.gen)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/cli/utils.py", line 227, in manage_sync_status
debug: status = SqliteStatus(path)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/status.py", line 119, in __init__
debug: self._update_schema()
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/status.py", line 127, in _update_schema
debug: with _exclusive_transaction(self._c) as c:
debug: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter__
debug: return next(self.gen)
debug: File "/usr/lib/python3.6/site-packages/vdirsyncer/sync/status.py", line 13, in _exclusive_transaction
debug: c = conn.execute('BEGIN EXCLUSIVE TRANSACTION')
Not happening anymore, don't know why. Sorry about the noise.
Need to improve error message, reopening as reminder for follow-up issue. If you experience this again, you need to delete a special file in your status directory. I can't think of the exact name at the moment. Sorry for the slow response.
I have this as well. which file should I delete?
Sorry, I can't remember. Please check this page: https://sqlite.org/tempfiles.html
Otherwise please give me a listing of the status dir and I can tell you.
On 22 February 2018 22:00:53 GMT+01:00, Christof Schulze [email protected] wrote:
I have this as well. which file should I delete?
-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/pimutils/vdirsyncer/issues/720#issuecomment-367820566
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
I think I found the name, the filename ends with journal
. Delete all files
with that suffix (make sure no vdirsyncer process runs) and you should be fine.
On Thu, Feb 22, 2018 at 01:00:53PM -0800, Christof Schulze wrote:
I have this as well. which file should I delete?
-- You are receiving this because you modified the open/close state. Reply to this email directly or view it on GitHub: https://github.com/pimutils/vdirsyncer/issues/720#issuecomment-367820566
@untitaker thank you - I did that cd .vdirsyncer find . -type f -name "*-journal" -exec rm {} ; and it worked.
@untitaker Same problem but it change nothing delete *-journal file in the status dir
I have the same error but there are no -journal files in the status directory. For the three tasks that fail I get
debug: File "/usr/lib/python3.7/site-packages/vdirsyncer/cli/tasks.py", line 63, in sync_collection
debug: collection.name) as status:
debug: File "/usr/lib/python3.7/contextlib.py", line 112, in __enter__
debug: return next(self.gen)
debug: File "/usr/lib/python3.7/site-packages/vdirsyncer/cli/utils.py", line 227, in manage_sync_status
debug: status = SqliteStatus(path)
debug: File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/status.py", line 119, in __init__
debug: self._update_schema()
debug: File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/status.py", line 127, in _update_schema
debug: with _exclusive_transaction(self._c) as c:
debug: File "/usr/lib/python3.7/contextlib.py", line 112, in __enter__
debug: return next(self.gen)
debug: File "/usr/lib/python3.7/site-packages/vdirsyncer/sync/status.py", line 13, in _exclusive_transaction
debug: c = conn.execute('BEGIN EXCLUSIVE TRANSACTION')
error: 3 out of 11 tasks failed.
Any idea what can be done? I only have .collections
and .items
in the status directory.
Edit: Used https://stackoverflow.com/a/3481134. I had to kill a stray vdirsyncer process.
Same here after a connection loss. Removing all items files did the trick:
find ./ -type f -name "*.items*" -exec rm {} \;
I had to kill a stray vdirsyncer process.
this did it for me
same here ... ps -ef | grep vdir
showed the process and kill -9 (pid)
did the deed