Ubuntu

Desktopcouch doesn't replicate with json_encode error 500

Reported by Till Sachau on 2010-10-22
54
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Ubuntu One Servers
High
Unassigned
desktopcouch
High
Unassigned
couchdb (Ubuntu)
High
Unassigned
erlang (Ubuntu)
High
Unassigned

Bug Description

The bookmark-sync feature of UbuntuOne doesn't work for me on two different computers running Ubuntu Maverick. I already tried using a new account after cleaning all desktop-couch related files - suspecting some serverside error - but it still doesn't work.

However, the feature is - of course - enabled and replication works well for contacts and tomboy-notes. Only the bookmarks and a db called '_users' are affected.

Apparently the db's exist on server and client - but can not be replicated. The error given in desktop-couch-replication.log is (long lines, therefore separated by a blank line for readability):

2010-10-22 11:18:28,382 DEBUG asking 'http://localhost:35108/' to replicate {'url': 'https://couchdb.one.ubuntu.com/u%2F1f8%2F8d3%2F738677%2Fbookmarks', 'auth': {'oauth': {dbus.String(u'consumer_secret'): 'HiddenHiddenHiddenHiddenHidden', dbus.String(u'token'): dbus.String(u'cNJsnqBUWobwNhGndYCHmirQGJfMpVWUgTmyFZqzVyeQodKMJb'), dbus.String(u'consumer_key'): dbus.String(u'JHntcJE'), dbus.String(u'name'): dbus.String(u'Ubuntu One @ karpov'), dbus.String(u'token_secret'): 'HiddenHiddenHiddenHiddenHiddenHiddenHiddenHiddenHi'}}} to bookmarks

2010-10-22 11:18:29,302 ERROR can't replicate 'u/1f8/8d3/738677/bookmarks' 'http://localhost:35108/' <== {'source': {'url': 'https://couchdb.one.ubuntu.com/u%2F1f8%2F8d3%2F738677%2Fbookmarks', 'auth': {'oauth': {dbus.String(u'consumer_secret'): 'HiddenHiddenHiddenHiddenHidden', dbus.String(u'token'): dbus.String(u'cNJsnqBUWobwNhGndYCHmirQGJfMpVWUgTmyFZqzVyeQodKMJb'), dbus.String(u'consumer_key'): dbus.String(u'JHntcJE'), dbus.String(u'name'): dbus.String(u'Ubuntu One @ karpov'), dbus.String(u'token_secret'): 'HiddenHiddenHiddenHiddenHiddenHiddenHiddenHiddenHi'}}}, 'target': 'bookmarks'}
Traceback (most recent call last):

  File "/usr/lib/pymodules/python2.6/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 288, in replicate
    content=record)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 985, in post
    **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in _request
    raise ServerError((status_code, error))
ServerError: (500, ('json_encode', '{bad_term,<0.10712.0>}'))

For the _users-db the error is different (here the short version, see log for full message):
2010-10-22 11:18:30,185 INFO Connecting to http://localhost:35108/.
2010-10-22 11:18:30,186 ERROR can't create/verify '_users' None:35108 oauth=None

complete desktop-couch-replication.log is attached.

Till Sachau (till-sachau) wrote :
visibility: private → public
Ted Gould (ted) wrote :

I also get this with my contacts DB and gwibber_accounts.

summary: - Desktopcouch doesn't replicate bookmarks
+ Desktopcouch doesn't replicate with json_encode error 500
Eric Casteleijn (thisfred) wrote :

Reproduced the ServerError: (500, ('json_encode', '{bad_term,<0.[some number].0>}')) myself. Attaching scrubbed log.

Changed in ubuntuone-servers:
status: New → Confirmed
importance: Undecided → High
Eric Casteleijn (thisfred) wrote :

Filipe D. Manana tells me this is due to a broken SSL implementation in erlang r13, and that we should switch to r14, or add this patch:

https://gist.github.com/603808

Changed in erlang (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Changed in desktopcouch:
status: New → Confirmed
importance: Undecided → High
Changed in ubuntuone-servers:
status: Confirmed → Invalid
Changed in desktopcouch:
status: Confirmed → Invalid
Eric Casteleijn (thisfred) wrote :

More specifically, replication in couchdb 1.0.1 and 1.0.2 will ONLY work with erlang r14A, r14B and r14B1, and emphatically *NOT* with r14B2 and r14B3. This should probably be expressed in the dependencies of the couchdb package.

couchdb 1.0.3 and 1.1.0 will work with all (released) versions of r14.

Changed in couchdb (Ubuntu):
status: New → Confirmed
importance: Undecided → High
Jason Gerard DeRose (jderose) wrote :

Here are logs from duplicate bug https://bugs.launchpad.net/ubuntu/+source/desktopcouch/+bug/786456

I stopped desktopcouch-service, deleted all it's configuration, log, and data files:

  ~/.local/share/desktop-couch/
  ~/.config/desktop-couch/
  ~/.cache/desktop-couch/

And then I started desktopcouch-service, watched the replication log file till I saw (I think) the first error related to replicating dmedia.

The attached is a tarball of ~/.cache/desktop-couch/

Eric Casteleijn (thisfred) wrote :

for completeness' sake, this is a patch that makes couchdb 1.0.1 or 1.0.2 work with erlang r14B2:

https://github.com/apache/couchdb/commit/9bdd8d9b981701d7c67f74ba70ad7637e866fc2c

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers