DC doesn't replicate, gets 500 status errors from server

Bug #463537 reported by Rodrigo Moya
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
desktopcouch
Invalid
Undecided
Unassigned

Bug Description

I started testing today replication of contacts to Ubuntu One server, but it doesn't seem to work for me (replaced tokens with '*' just in case, but they were all the same):

2009-10-29 16:22:25,576 DEBUG started replicating
2009-10-29 16:22:25,715 DEBUG replication of discovered hosts finished
2009-10-29 16:22:25,783 DEBUG static pairings are [('fa616caa-fb2c-474d-9d93-15ff366ee262', 'ubuntuone', True, True)]
2009-10-29 16:22:25,784 DEBUG Looking up prefix for service 'ubuntuone'
2009-10-29 16:22:25,784 DEBUG Looking up prefix for service 'ubuntuone'
2009-10-29 16:22:25,936 DEBUG skipping record {'push_to_server': True, 'ctime': '2009-10-29 16:00', 'service_name': 'ubuntuone', '_rev': '1-605bd54dc1cdddbec178e6b9565ddad8', 'pairing_identifier': 'fa616caa-fb2c-474d-9d93-15ff366ee262', 'record_type': 'http://www.freedesktop.org/wiki/Specifications/desktopcouch/paired_server', 'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}, '_id': 'c95747b1be245333d009c7b676fd7ee6', 'pull_from_server': True} with no excluded_names
2009-10-29 16:22:25,937 DEBUG found 0 excluded_names records
2009-10-29 16:22:25,983 DEBUG want to replipush 'u/1d7/f7a/154/apps-gwibber' to static host 'fa616caa-fb2c-474d-9d93-15ff366ee262' @ couchdb.one.ubuntu.com
2009-10-29 16:22:25,984 DEBUG creating 'u/1d7/f7a/154/apps-gwibber' couchdb.one.ubuntu.com:443 {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}
2009-10-29 16:22:27,530 ERROR can't create/verify 'u/1d7/f7a/154/apps-gwibber' couchdb.one.ubuntu.com:443 oauth={'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 212, in replicate
    oauth_tokens=target_oauth)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 196, in create_database
    oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server.py", line 55, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server_base.py", line 121, in __init__
    if database not in self._server:
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 124, in __contains__
    self.resource.head(validate_dbname(name))
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 981, in head
    return self._request('HEAD', path, headers=headers, **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in _request
    raise ServerError((status_code, error))
ServerError: (500, '')
2009-10-29 16:22:27,647 DEBUG asking 'http://localhost:49269/' to replicate apps-gwibber to {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fapps-gwibber', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}, using record {'source': 'apps-gwibber', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fapps-gwibber', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}}
2009-10-29 16:22:28,820 ERROR can't replicate 'apps-gwibber' 'http://localhost:49269/' <== {'source': 'apps-gwibber', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fapps-gwibber', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 252, 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 1029, in _request
    raise ResourceNotFound(error)
ResourceNotFound: ('db_not_found', 'could not open https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fapps-gwibber/')
2009-10-29 16:22:28,821 DEBUG want to replipush 'u/1d7/f7a/154/bookmarks' to static host 'fa616caa-fb2c-474d-9d93-15ff366ee262' @ couchdb.one.ubuntu.com
2009-10-29 16:22:28,821 DEBUG creating 'u/1d7/f7a/154/bookmarks' couchdb.one.ubuntu.com:443 {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}
2009-10-29 16:22:30,173 ERROR can't create/verify 'u/1d7/f7a/154/bookmarks' couchdb.one.ubuntu.com:443 oauth={'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 212, in replicate
    oauth_tokens=target_oauth)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 196, in create_database
    oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server.py", line 55, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server_base.py", line 121, in __init__
    if database not in self._server:
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 124, in __contains__
    self.resource.head(validate_dbname(name))
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 981, in head
    return self._request('HEAD', path, headers=headers, **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in _request
    raise ServerError((status_code, error))
ServerError: (500, '')
2009-10-29 16:22:30,180 DEBUG asking 'http://localhost:49269/' to replicate bookmarks to {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fbookmarks', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}, using record {'source': 'bookmarks', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fbookmarks', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}}
2009-10-29 16:22:31,057 ERROR can't replicate 'bookmarks' 'http://localhost:49269/' <== {'source': 'bookmarks', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fbookmarks', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 252, 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 1029, in _request
    raise ResourceNotFound(error)
ResourceNotFound: ('db_not_found', 'could not open https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fbookmarks/')
2009-10-29 16:22:31,058 DEBUG want to replipush 'u/1d7/f7a/154/contacts' to static host 'fa616caa-fb2c-474d-9d93-15ff366ee262' @ couchdb.one.ubuntu.com
2009-10-29 16:22:31,058 DEBUG creating 'u/1d7/f7a/154/contacts' couchdb.one.ubuntu.com:443 {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}
2009-10-29 16:22:32,131 ERROR can't create/verify 'u/1d7/f7a/154/contacts' couchdb.one.ubuntu.com:443 oauth={'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 212, in replicate
    oauth_tokens=target_oauth)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 196, in create_database
    oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server.py", line 55, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server_base.py", line 121, in __init__
    if database not in self._server:
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 124, in __contains__
    self.resource.head(validate_dbname(name))
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 981, in head
    return self._request('HEAD', path, headers=headers, **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in _request
    raise ServerError((status_code, error))
ServerError: (500, '')
2009-10-29 16:22:32,161 DEBUG asking 'http://localhost:49269/' to replicate contacts to {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fcontacts', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}, using record {'source': 'contacts', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fcontacts', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}}
2009-10-29 16:22:32,818 ERROR can't replicate 'contacts' 'http://localhost:49269/' <== {'source': 'contacts', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fcontacts', 'auth': {'oauth': {'consumer_secret': 'hammertime', 'token': '**********', 'consumer_key': 'ubuntuone', 'token_secret': '******************************************************************************'}}}}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 252, 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 1029, in _request
    raise ResourceNotFound(error)
ResourceNotFound: ('db_not_found', 'could not open https://couchdb.one.ubuntu.com/u%2F1d7%2Ff7a%2F154%2Fcontacts/')
2009-10-29 16:22:33,915 ERROR replication of services aborted
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/replication.py", line 178, in do_all_replication
    oauth_tokens=remote_oauth_data, service=True):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 115, in get_database_names_replicatable
    all_dbs = set([db_name for db_name in couchdb_server])
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 131, in __iter__
    resp, data = self.resource.get('_all_dbs')
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 978, in get
    return self._request('GET', path, headers=headers, **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in _request
    raise ServerError((status_code, error))
ServerError: (500, ('unknown_error', 'function_clause'))
2009-10-29 16:22:33,917 DEBUG finished replicating

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

BTW, I removed my previous tokens from the keyring and authenticated again with the u1-client-applet, as suggested by Joshua Hoover

Revision history for this message
Rodrigo Moya (rodrigo-moya) wrote :

Now it seems to work, so closing

Changed in desktopcouch:
status: New → Invalid
Revision history for this message
Huntly Cameron (huntly-cameron) wrote :
Download full text (9.4 KiB)

I'm getting the exact same issue:

huntly@ubuntu-desktop:/usr/lib/desktopcouch$ python desktopcouch-service
Desktop CouchDB is not running; starting it. Removing stale, deceptive pid file.
Apache CouchDB has started, time to relax.
...waiting for couchdb to start...
Browse your desktop CouchDB at file:///home/huntly/.local/share/desktop-couch/couchdb.html
2010-03-20 17:33:24,008 - can't create/verify 'u/091/e1a/41350/sundaytestdb' couchdb.one.ubuntu.com:443 oauth={'consumer_secret': 'c_secret', 'token': 'my_token', 'consumer_key': 'ubuntuone', 'token_secret': 'mysectoken'}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 212, in replicate
    oauth_tokens=target_oauth)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 196, in create_database
    oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server.py", line 55, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server_base.py", line 121, in __init__
    if database not in self._server:
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 124, in __contains__
    self.resource.head(validate_dbname(name))
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 981, in head
    return self._request('HEAD', path, headers=headers, **params)
  File "/usr/lib/pymodules/python2.6/couchdb/client.py", line 1035, in _request
    raise ServerError((status_code, error))
ServerError: (500, '')
2010-03-20 17:33:24,289 - can't replicate 'sundaytestdb' 'http://localhost:43578/' <== {'source': 'sundaytestdb', 'target': {'url': 'https://couchdb.one.ubuntu.com/u%2F091%2Fe1a%2F41350%2Fsundaytestdb', 'auth': {'oauth': {'consumer_secret': 'c_secret', 'token': 'my_token', 'consumer_key': 'ubuntuone', 'token_secret': 'mysectoken'}}}}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 252, 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 1029, in _request
    raise ResourceNotFound(error)
ResourceNotFound: ('db_not_found', 'could not open https://couchdb.one.ubuntu.com/u%2F091%2Fe1a%2F41350%2Fsundaytestdb/')
2010-03-20 17:33:24,726 - can't create/verify 'u/091/e1a/41350/mytestdatabase' couchdb.one.ubuntu.com:443 oauth={'consumer_secret': 'c_secret', 'token': 'my_token', 'consumer_key': 'ubuntuone', 'token_secret': 'mysectoken'}
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 212, in replicate
    oauth_tokens=target_oauth)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/pair/couchdb_pairing/couchdb_io.py", line 196, in create_database
    oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages/desktopcouch/records/server.py", line 55, in __init__
    server_class=server_class, oauth_tokens=oauth_tokens)
  File "/usr/lib/python2.6/dist-packages...

Read more...

Changed in desktopcouch:
status: Invalid → New
Revision history for this message
Roman Yepishev (rye) wrote :

I was able to reproduce this by creating a new account.
Replication fails but webui works.

Revision history for this message
Roman Yepishev (rye) wrote :

Setting to Invalid, further discussion is done in LP:542993
The reasons for the failure are different than they might be for OP.

Revision history for this message
Joshua Hoover (joshuahoover) wrote :

Marking as invalid again as Roman points to LP:542993 and all current issues with contacts sync is due to the CouchDB sync functionailty being turned off while we fix scaling issues.

Changed in desktopcouch:
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.